Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming classes
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01579528
Message ID:
01579617
Vues:
57
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I am wondering what principles do you use when naming classes (and their methods / properties)? Do you know a good article on this topic?
>
>Say, right now I am thinking of how to name a class. My colleague suggested to use 'CurrentCallObject' for the class name, but I am not sure I like it. On the other hand, I don't have a better idea.
>
>This class is going to be instantiated on each invoke call (this call comes from C++ application) and will hold attributes related to the call.
>
>Thanks in advance.

Current for a class does not makes sense to me, current will be an instance of a class, for example CurrentRecord (an instance of the class Record, which happens to be the current one), LastRecord (an instance of the same Record class which happens to be the last record) etc

Call does not makes sense to me for it introduces ambiguity and in the end we do not know what you are using the object for.

What about using a Bridge idea, as you are building a Bridge between the two applications.

CppToNetBridge or CppTo{Name of your Application}Bridge or {Cpp application}To{Name of your Application}Bridge

Now the instance of such object could be named after the name of the Cpp application, for example Current{Cpp Application Name}

I do not know, just a quick thought on it.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform