• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Any naming convention for a class

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is related to naming convention of classes.

Any naming convention for a class:

1. Which holds XML file (data structure classes hold XML file's data).
2. Which are used to store the data that is displayed on FE (a kind of bean).
3. Which stores form parameters (represent a form).
4. Which replicate database objects.

Is there any standard prefix for them or some other way of differentiating them from other classes.

I am asking this because I am facing lot of similar name issues.

Thanks.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One problem might be that you have only described your class in terms of the data it holds. Usually it makes more sense to describe a class in terms of its behaviour rather than its data.

What does your class do? What do its collaborators ask it or tell it?
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Carver:
One problem might be that you have only described your class in terms of the data it holds. Usually it makes more sense to describe a class in terms of its behaviour rather than its data.

What does your class do? What do its collaborators ask it or tell it?



These kind of classes are mean to store data only (data structure objects like list, map etc). They doesn't perform any action as such...
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ankur rathi:
These kind of classes are mean to store data only (data structure objects like list, map etc). They doesn't perform any action as such...



Martin Fowler: Anemic Domain Model
Agile Modeling: Class Responsibility Collaborator (CRC) Models
Beck & Cunningham: A Laboratory For Teaching Object-Oriented Thinking
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ankur rathi:


These kind of classes are mean to store data only (data structure objects like list, map etc). They doesn't perform any action as such...



Well, if you look at lists, maps etc. from the JDK, you will notice that there actually *are* operations implemented on them.

What kind of operations will your objects have?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic