I'll prefix by saying that I understand that both Code Analysis and StyleCop are meant as guidelines, and many people chose to ignore these anyway. But having said that, I'd like to see what the general consensus is with regard to these two rules.
Rule CA1500 says don't make parameter names and private field names the same.
Rule SA130...
I try to name a class (also members, properties and so forth) as exact as I can. But sometimes I’m not sure if this is so clever if the class name becomes huge (50 chars and more). The handling is so what uncomfortable and the code becomes difficult to read.
The question occured for me seldom and therefore I don’t have much experience ...
Hi,
What kind of convention do you (or your company) run on filenames and CSS class names? For example, let's say you have these class names: window, window top, window top left, window top right. How do you name those class names (and such filenames)?
Currently I am doing the following:
.window {
background: url(images/window.png);
...
I have a factory class I'm making in PHP. Each instance represents a row from a database table.
Since I'll be dealing with dozens of database rows, it would be silly to have each instance do a select on instantiation. So I have a method to just dump values in to the object, for use in conjunction with a database query that returns a lo...
A little while ago, I saw a question answered here regarding the fine-grained organisation of java packages. For example, my.project.util, my.project.factory, my.project.service etc.
I can't find it now, so I may as well ask the question.
Are there best practices with regards to the organisation of packages in Java and what goes in th...
There is Microsoft names of assemblies guideline but personally I don't like lengthy names in solution tree. When there are dozen of lengthy names it's hard to pick the project you want.
Do you keep project name same as assembly name or short it somehow?
For example if there is MyCompany.MyProject.Dal.dll assembly maybe it's more use...
Coming from the world of HTML, XML and PHP its a new way of thinking when making web applications using ASP.NET. I'd like to use the following code in my MasterPage:
<div id="leftnav">
<asp:ContentPlaceHolder ID="leftnav" runat="server">
</asp:ContentPlaceHolder>
</div>
But since leftnav in this example is used twice, Visual S...
Hi folks,
I'm a beginner in programming web apps with jee. How do you name your packages?
I often saw stuff like com.abc.commons... is there a standard or a common way to do that?
cheers
Thanks to seanizer, I gonna use your approach: com.mycompany.myproject.api
...
I'm building an Objective-C wrapper for a nasty legacy C-library. Assume I have two Objective-C classes A and B wrapping some related legacy structures. Now I would like to provide a function that converts a given object of class A into an object of class B. The problem is, that the conversion process destroys the internal state of the s...
I'm working with java keystores for the first time. Is there a standard extension / suffix for a keystore? Are they typically named .ks? If it's a java keystore am I supposed to use .jks? I would like to follow a naming convention if one is generally accepted.
...
Are there any good articles on naming comprehensive naming conventions?
I'm looking to clean up some code... everything from assets to models (Codeigniter) to HTML and CSS.
I'm also curious how to structure the CSS... is it better to give everything a unique class ie search-bar-icon or is it better to repeat classes like .search span.i...
I'm using PHP 5.2 to make a website
I like to have explicit names for my classes
I also have a convention saying 'the path and name of a file' match the 'name of the class'
So a class called:
ABCSiteCore_Ctrlrs_DataTransfer_ImportMergeController
would sit in my svn working copy at:
C:\_my\websrv\ABCCoUkHosting2\webserve\my_library\...
I have a database table named 'abuses'. While baking the application the bake command named it's controller classname as "abuses" and filename as "abuses_controller.php" but when I baked the model the filename was "Abus.php" and classname was "Abus".
Is that a bug in cakePHP ? or did I miss something ?
Has anyone encountered the same p...
PROBLEM:
Build a web-application that allows a human-being to create a new username, but where the username does not reveal any personal information about that individual. Moreover, the username should be easy for the individual to remember whenever they visit the website.
QUESTION:
What is the best approach for creating a name that ...
Question abou naming standards, following .NET standards.
How would you name a control that shows a grid of order objects? It is not an editor, but allows selection of one / more orders.
OrderGrid
or
OrdersGrid ?
Basically: Singular for the object shown, or plural?
We are in some quarrels here.
Note: the name is exposed to the...
ReSharper extension of VS suggest me to use PascalCase in below property.
public Color Color { get; private set; }
Here Color is Enum type. I would never thought this can be possible because it is same name with type. But it is valid. Is it something suggested by general rules ? Do I have to listen ReSharper always ? Would be apprecia...
could any one please tell me what is the naming convention the Hibernate developers fallowing to give names for DAO calass, Sesgleton class which create Single SessionFactory and retuns Session throug a static method, hibernate mapping files etc
...
I have Login form,forget password form and register form in a single page.. What can be the name given to the webpage? Any suggestion..
...
From what I've read I'm not sure if I've got the naming convention for events and handlers correct. (there seems to be some conflicting advice out there).
In the two classes below can anyone tell me if I've got the naming right for the event, the method that raises the event and the method that handles the event?
public class Car
{
/...
On a related note to this question, which just came up:
I commonly follow the naming convention LibraryClass <-> LibraryClassTests for my unit tests. However, when renaming LibraryClass using the default rename/refactor functionality in either Visual Studio, R# or CodeRush (I have tested both) the test file is not renamed, meaning I mig...