473,387 Members | 1,664 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,387 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 1142
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,...
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...
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: 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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.