473,385 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

General Design Question - Class Name

I'm in need of some suggestions. Currently, we have a class that is named
StringValidator. It has methods such as ValidateMaxLength,
ValidateMinLength, IsNumber, IsMatch, ValidateNumeric, ValidateInteger, etc.
There is custom validation for each method (such as IsNumber compared to
IsNumeric) and overloads (lots) for each that allow passing a string, a
DataRow and ColumnName, a DataColumn and DataRow, etc. The suggestion(s) I
am in need of is a class name that better suits it.

StringValidator just doesn't sound right to us and I would like some
alternative ideas for it :)

Our namespace is MCIS.Libraries.Validation and the class would go under this
(which will probably be changed to MCIS.Libraries.Data.Validation). So
Validation would not be a good name for the class either :)

Thanks,
Mythran

Apr 27 '06 #1
3 978
Tim
"class1" always works for me :-)

Apr 27 '06 #2
"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote:
I'm in need of some suggestions. Currently, we have a class that is named
StringValidator. It has methods such as ValidateMaxLength,
ValidateMinLength, IsNumber, IsMatch, ValidateNumeric, ValidateInteger, etc.
There is custom validation for each method (such as IsNumber compared to
IsNumeric) and overloads (lots) for each that allow passing a string, a
DataRow and ColumnName, a DataColumn and DataRow, etc. The suggestion(s) I
am in need of is a class name that better suits it.


I'd get rid of it...

Instead have a family of static functions which produce Regex strings
to check for MaxLength, MinLength, IsNumber, ...

As for DataRow/whatever, what you're doing is unrelated to validation.
Instead you're producing "map/fold"-like adapters which work over
various kinds of data structures. So these could be more abstracted.

--
Lucian
Apr 27 '06 #3
How about Checker, Conformity, or Rational, or variants thereof?

"Mythran" wrote:
I'm in need of some suggestions. Currently, we have a class that is named
StringValidator. It has methods such as ValidateMaxLength,
ValidateMinLength, IsNumber, IsMatch, ValidateNumeric, ValidateInteger, etc.
There is custom validation for each method (such as IsNumber compared to
IsNumeric) and overloads (lots) for each that allow passing a string, a
DataRow and ColumnName, a DataColumn and DataRow, etc. The suggestion(s) I
am in need of is a class name that better suits it.

StringValidator just doesn't sound right to us and I would like some
alternative ideas for it :)

Our namespace is MCIS.Libraries.Validation and the class would go under this
(which will probably be changed to MCIS.Libraries.Data.Validation). So
Validation would not be a good name for the class either :)

Thanks,
Mythran

Apr 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: syd | last post by:
In my project, I've got dozens of similar classes with hundreds of description variables in each. In my illustrative example below, I have a Library class that contains a list of Nation classes. ...
2
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx....
105
by: Christoph Zwerschke | last post by:
Sometimes I find myself stumbling over Python issues which have to do with what I perceive as a lack of orthogonality. For instance, I just wanted to use the index() method on a tuple which does...
3
by: Claudia | last post by:
Hi all... I'm working on a project that uses MSMQ as its core for inter-process communication. At the moment there is a single process that listens for inbound TCP-based messages on a socket,...
12
by: Jeff | last post by:
I'm just getting up to speed on OOP patterns (e.g, MVC) and I'm wondering how closely they are followed out in the real world. Do those of you who use them try to follow them as closely as possible...
3
by: Mythran | last post by:
I'm in need of some suggestions. Currently, we have a class that is named StringValidator. It has methods such as ValidateMaxLength, ValidateMinLength, IsNumber, IsMatch, ValidateNumeric,...
13
by: John Kraft | last post by:
Friends, I'm working on some crud stuff, and I was looking for opinions on the subject. Below, I have pasted some VERY simple sample code. Class2 is a "traditional" crud type object. In a...
5
by: virtualadepts | last post by:
I have code here that explains my object oriented design model. I've been reading about other design models from what is documented on wikipedia about the key book on the subject:...
6
by: Stephen Torri | last post by:
I am trying to produce a singleton class that I can use throughout my library to write tracing information to a file. My intent was to design such that someone using the library in its debug mode...
3
weaknessforcats
by: weaknessforcats | last post by:
Design Pattern: The Singleton Overview Use the Singleton Design Pattern when you want to have only one instance of a class. This single instance must have a single global point of access. That...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.