473,385 Members | 1,642 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.

abstract naming conventions

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
4 9935

"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: cmiddlebrook | last post by:
Hi there, I keep finding myself getting inconsistent with naming conventions for things like member variables, class names etc and I just want to find something that suits me and stick to it. I...
1
by: clintonG | last post by:
Does the use of DTD, XML Schema and similar constructs adopt the use of C# naming conventions? If so how do I make the distinction of how to apply C# conventions with XML elements, attributes and...
4
by: Mark Broadbent | last post by:
stupid question time again to most of you experts but this is something that continually bothers me. I am trying to get into the habit of naming variables and controls in an assembly as per...
3
by: clintonG | last post by:
Does the use of DTD, XML Schema and similar constructs adopt the use of C# naming conventions? If so how do I make the distinction of how to apply C# conventions with XML elements, attributes and...
5
by: rastaman | last post by:
Hi all, I know of the existence of Object Naming Conventions for Visual Basic 6. Now I'm reading some books about VB .NET, but the names used for the objects are button1, picturebox1, etc. I...
9
by: kevininstructor | last post by:
Greetings, I am in the process of creating naming conventions for VB.NET controls i.e. CheckBox -> chkShowThisOnStartup ListBoxt -> lstSomeList What I am looking for other developers...
1
by: D Witherspoon | last post by:
Coming up with a scenario here. For example there is the standard .NET MailMessage class. I am creating a project (let's call it CommonBase) that has the following 2 classes ...
35
by: Smithers | last post by:
Is it common practise to begin the name of form classes with "frm" (e.g., frmOneForm, frmAnotherForm). Or is that generally considered an outdated convention? If not "frm" what is a common or...
1
by: Philipp Post | last post by:
Marcello, Not a big surprise as naming conventions have a lot to do with personal prefernces. There are a lot of threads in comp.databases and the other database groups. Just do a search for...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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.