Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming convention for common controls
Message
 
 
To
01/05/2009 15:54:47
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01397515
Message ID:
01397528
Views:
35
Thanks, Michel.

I know we have few .NET applications here, but I haven't had a chance to look at them yet. I don't think we have much of a standard here. I know we use MereMortals framework for few .NET app, but I checked the mobile sample app and it was basically nothing specific related to MereMortals except for utilizing Web Service. In my app I want to keep things simple and use database (CE) directly.

I was looking at the article John Baird pointed me earlier, but it doesn't go deep into such little details as naming convention, etc. I'm working with the copy of the article I printed.

>>Can you please refer me to the naming convention of Windows Forms (or Mobile app) controls?
>>
>>I'm working with the TabControl right now, first I found no convenient way (as in VFP) to set properties for each page (had to do through the collection) and also how should I name the TabControl itself?
>>
>>I see that it offers tabPage1, tabPage2 for the pages, so I gave them tabName1, tabName2.
>
>I always kept this kind of reverse hungarian notification when I moved to .NET. I would say the good convention is the one you are you co-workers all agree on and feel comfortable to work with.
>
>Basically, in the .NET world, I haven't seen much of that since I got to use to a standard way in VFP, as this was pretty much the same for all developers all over the world. In .NET, I do not know how many times I have seen those samples on the Internet with variable name such as i, j or k. Those wouldn't have last long under my team.
>
>The minimum is to have one, as I said. So, at least, you can rely on a standard way of working on those projects. As for me, I always liked the fact to add a scope and a type to variables and properties. So, if I have oDataProvider versus loDataProvider, or oDataProviderMember versus loDataProviderMember, which would give a better representation of which table the data provider object refers to, this allows me to know that loDataProvider is scope to the method where oDataProvider is scope to the class.
>
>Basically, when I moved to .NET, I kept the same naming convention. This has been adopted to several enterprises I have been involved with. Some would prefer to use a three character representation of the type and some would also prefer to apply the same for the field naming in a table, which I prefer to only rely on the proper casing logical representation such as FirstName, LastName, LastDateOfOccurence, ExpirationDate and so on.
>
>This is a topic that can discussed for years and as the IT world evolves, I do not think it would change that much as it relies a lot on personal choices and corporate standards.
>
>As for your tab pages, as those are pages, I think it is good to use the number representation at the end. As for the start of the name, I wouldn't have any idea as I do not use those on Web applications.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform