naming-conventions

Does the "Cartridge" pattern exist?

AndroMDA uses the term "cartridge" (e.g. for out-of-the-box NHibernate support). As I understood it, it takes an API/component, wrapps it, never adds new features, simplifies it, often taking away "the full power", but works well for most cases. My questions: Is the term widely used? Can one properly define it? Should the suffix "Cart...

Naming conventions with web service / WCF and no overload

Hi there, Currently have the task of designing a web service ( i am going to wcf but principles still apply) in c#. Problem is there is no overloading of methods which i am aware of so i need to name web methods with different names. I would really like some input on naming conventions, there just doesn't seem to be anything out there...

Functional Server Naming Conventions

I've seen "The Coolest Server Names," and I've seen another smaller-ish question related to mine, which was unfortunately closed. It's a serious question though, as I'm on an internal applications dev team that manages the apps on a couple dozen servers. The networking folks typically don't care what we call the servers as long as they ...

Conventions for immutable objects

When you design immutable classes, do you prefer: Layer.ColorCorrect ( layer ) or layer.ColorCorrect ( ) To me #1 seems more intuitive, instead of #2, which looks like it modifies the object that's referenced, since it's an instance method, it might as well change the internals, right? ...

Python naming conventions for modules

I have a module whose purpose is to define a class called "nib". (and a few related classes too.) How should I call the module itself? "nib"? "nibmodule"? Anything else? ...

What is the best practice for naming private and static private methods in C#?

I'm trying to figure out what is the smartest way to name private methods and private static methods in C#. Background: I know that the best practice for private members is underscore-prefix + camelcase. You could argue this with me, but trust me I've seen enough code from hardcore pros that follow this convention, it is the skilled in...

How should business level objects be named?

We are building a service-oriented system where we have separated the application into several layers: SOAP web services (e.g., BuildingService.asmx) Business logic layer (e.g., BuildingXXX) Data Access layer (e.g, BuildingProvider) Types (e.g., Building) The SOAP web services simply instantiate an object of type BuildingXXX from th...

Prefixing abstract classes with "A" like interfaces are prefixed with "I"?

It seems to me that it'd be useful to be able to tell at a glance that a class is abstract and not meant to be directly instantiated just like it's useful to be able to easily identify an interface. My question is, why didn't "AFourLeggedAnimal : IAnimal" catch on? Is it simply because of the possible confusion (which I just noticed wh...

How do you name 'back-reference' properties ?

I'm working on a project which has a rich domain-model. Some of my classes have collections of other types, and those other types have a property that refers back to their 'owner'. This sounds maybe a bit cryptic, so a code example would help: public class Product { private IList<ProductPrice> _prices = new List<ProductPrice>(); ...

LINQ Code Generation Property Names

Hi, I am using LINQ To SQL to handle data access in a project. For a case where I have multiple foreign keys in a table to the same table (for e.g. CustomerUserId, TechnicianUserId) , it generates the property names like ApplicationUser and ApplicationUser1. Is there a way to tweak the code generator to produce easier to read names. I...

Is the name IsFemale inappropriate for a database column?

Just browsing our db schema and found a field named 'IsFemale' Is the name good, or is it kinda laughable? ...

Namespace for Reverse Phone, Reverse Zip, and Reverse IP Lookup services

I'm looking for ideas/suggestions on a namespace. I have 3 objects that do the following: Object 1: Reverse Phone Lookups Object 2: Reverse Zip Code Lookups Object 3: Reverse IP Address Lookups Currently, they are in the following namespaces: (CompanyName).Utilities.PhoneTools (CompanyName).Utilities.AddressTools (CompanyName).Uti...

Library name for x32 vs x64

I have a C++ static library that supports both x32 and x64 platforms. My question is: should I name the .lib file different depending on which platform? i.e. MyLib32.lib vs MyLib64.lib Intel Math library and TBB handle this using folder name to differentiate between the 2 libraries instead. i.e. x32\Math.lib vs x64\Math.lib Is there...

When to join name and when not to?

Most languages give guidelines to separate different words of a name by underscores (python, C etc.) or by camel-casing (Java). However the problem is when to consider the names as separate. The options are: 1) Do it at every instance when separate words from the English dictionary occur e.g. create_gui(), recv_msg(), createGui(), recvM...

Parameter naming: filename or fileName?

I try to be grammatically correct in my naming*. I've always used filename instead of file*N*ame. The java convention also seems to use this, but FxCop prefers fileName. There's a discussion on WikiPedia about it. The more I read, the more I feel I'm right (which is quite usual! :) ). Does anyone have a definitive answer or is this ...

Prefix/suffix for classes

When you write an app that will have vast number of classes, do you use prefixes/suffixes for your class names? Or should I just rely on the namespaces I already define? In my case, I have classes like: Blur Contrast Sharpen Invert ... I just don't know what I might have tomorrow, and want to be collision free as possible with the fr...

Should executables contain version numbers in their names?

I develop a certain server. Till now, two versions could not be installed at the same time. We're now changing that, and the question came up: should the version number be appended to the server components or not? The server contains 3 exes and 5 dlls (some COM, some native VC++). Should any or all have their name contain the version (Se...

DDD, NHibernate, and Project Structure / Naming

What do you recommend as the proper project structure for a WebForms solution that is utilizing NHibernate and trying to bring in some DDD concepts? Assuming the root namespace and solution name is Sample Sample.Domain - contains my domain objects and my mapping files Sample.Repositories - contains my repositories and nhibernate...

Naming: Pricelist vs. PriceList

Which is more correct, "PriceList" or "Pricelist"? FxCop says: CA1702 : Microsoft.Naming : The compound word 'PriceList' in type name 'PriceList' exists as a discrete term. If your usage is intended to be single word, case it as 'Pricelist'. Edit: This is an object with Title, Start/End date etc. ...

OOP Naming: TCP vs.Tcp prefix

I'm creating a C# library and am going to be prefix most of the public classes with the protocol they use (TCP, UDP, etc) and I came to a little dilemma: should it be TCPXxxx or TcpXxxx? There doesn't seem to be a standard in the .NET framework (IPAddress versus TcpClient). Which you would prefer when working with a lirbary: TCPXxxx or...