By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,985 Members | 2,884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,985 IT Pros & Developers. It's quick & easy.

abstract naming conventions

P: n/a
We are having a debate in our organization about naming conventions for
abstract classes. The three proposed methods are:

1) Prefix the class name with abstract. Example: AbstractUser
2) Prefix the class name with a: Example aUser
3) Don't do anything to the class name.

I would appreciate hearing what everyone else is doing for naming abstract
classes.

Thanks!
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"Shemp" <st**********@mchsi.com> wrote in message
news:btRec.30344$rg5.48802@attbi_s52...
We are having a debate in our organization about naming conventions for
abstract classes. The three proposed methods are:

1) Prefix the class name with abstract. Example: AbstractUser
2) Prefix the class name with a: Example aUser
3) Don't do anything to the class name.

I would appreciate hearing what everyone else is doing for naming abstract
classes.

Thanks!


Usually the name of a class would indicate some of it's characteristics. It
being abstract is just one, don't see why that should neccesarily be encoded
in its name. The second option seems in contradiction with the convention
that classnames start with an uppercase letter.

Silvio Bierman
Jul 17 '05 #2

P: n/a
Silvio Bierman wrote:
"Shemp" <st**********@mchsi.com> wrote in message
news:btRec.30344$rg5.48802@attbi_s52...
We are having a debate in our organization about naming conventions for
abstract classes. The three proposed methods are:

1) Prefix the class name with abstract. Example: AbstractUser
2) Prefix the class name with a: Example aUser
3) Don't do anything to the class name.

I would appreciate hearing what everyone else is doing for naming abstract
classes.

Thanks!


Usually the name of a class would indicate some of it's characteristics. It
being abstract is just one, don't see why that should neccesarily be encoded
in its name. The second option seems in contradiction with the convention
that classnames start with an uppercase letter.


I agree, if you have an abstract factory that makes, i don't know
aircract. You say AbstractAircraftFactory. i think that's pertty clear.
Poeple know exactly what that does. Even though the factory is a
Singleton, i sometimes omit the singleton for clarity.

An implementation of AbstractAircraftFactory could be AircraftFactoryCSV
that loads aircraft data from a CSV file.

If you want an example of this kind of naming scheme check out the
school project report i did, it has tons of patterns and java names like
that. http://andre.bonin.ca under projects and "BoninsoftATC"
Jul 17 '05 #3

P: n/a
Shemp wrote:
We are having a debate in our organization about naming conventions for
abstract classes. The three proposed methods are:

1) Prefix the class name with abstract. Example: AbstractUser
2) Prefix the class name with a: Example aUser
3) Don't do anything to the class name.

I would appreciate hearing what everyone else is doing for naming abstract
classes.

Thanks!


Option 3 is the best choice. Do not be tempted to go down the path of
overloading the class name with attributes of the class (which could,
perhaps, change over time). Look at the problems that the debate is
trying to resolve. There may be some other issue hidden here
(documentation and training on the classes being used for new
developers? fuzzy or imprecise or improper class decomposition for the
system being created? other?).

Regards,
ErstwhileIII

Jul 17 '05 #4

P: n/a
ErstwhileIII <er**********@netscape.net> wrote in message news:<3-********************@comcast.com>...
Shemp wrote:
We are having a debate in our organization about naming conventions for
abstract classes. The three proposed methods are:

1) Prefix the class name with abstract. Example: AbstractUser
2) Prefix the class name with a: Example aUser
3) Don't do anything to the class name.

I would appreciate hearing what everyone else is doing for naming abstract
classes.

Thanks!


Option 3 is the best choice. Do not be tempted to go down the path of
overloading the class name with attributes of the class (which could,
perhaps, change over time). Look at the problems that the debate is
trying to resolve. There may be some other issue hidden here
(documentation and training on the classes being used for new
developers? fuzzy or imprecise or improper class decomposition for the
system being created? other?).

Regards,
ErstwhileIII


For what it's worth, GoF's design patterns does nothing with the
abstract class name, but prefixes the implementation class with,
"Concrete".

..ed

www.EdmundKirwan.com
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.