Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / April 2005

Tip: Looking for answers? Try searching our database.

Namespace Naming Guidelines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
clintonG - 28 Apr 2005 03:39 GMT
Microsoft recommends CompanyName.TechnologyName[.Feature][.Design] and it
all comes down to not breaking the inheritence model if I am not mistaken.
VSN2003 however tells the compiler to use the name of the project as the
name of the .dll the project compiles to.

Developing on XP Pro in the Default Website would most commonly result in a
file system path such as...

InetPub/wwwroot/CompanyName.TechnologyName/default.aspx

...if I named the directory containing the project's files the same as the
name of the project itself, i.e the name of the project being
CompanyName.TechnologyName and the name of the directory where its file
resources are located also CompanyName.TechnologyName.

That seems to make sense to me but only on the local XP Pro development
'server.' This naming schema breaks down when deploying the project's
directory and file resources to the production web server which is provided
as a hosted service.

Its clumsy to request a page from the production server as http://
companyname.com/companyname.technologyname/default.aspx. I've never seen it
done. So how do you resolve Namespace naming, project naming and so on?
After all this time 1.1 has matured I still don't get it and haven't found
any documents that discuss this context.

<%= Clinton Gallagher

[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp

Scott M. - 28 Apr 2005 04:05 GMT
I think you are confusing the names of the project, solution, project
folder, assembly and namespace.

When you create a new project, you are asked to provide a name for that
project.  The name you supply is the name that VS.NET uses for the solution,
project, project folder, root namespace and assembly.  HOWEVER, you can
change these values after the project has been created.  So, you could just
make a new project called what you'd like the project folder to be called
and then after the project is created, you can easily change the assembly
and root namespace names as well as the project and solution names.

Also, just because your local directory is called one thing, doesn't mean
that when you copy the project to the production server, you must use the
same directory name.

> Microsoft recommends CompanyName.TechnologyName[.Feature][.Design] and it
> all comes down to not breaking the inheritence model if I am not mistaken.
[quoted text clipped - 26 lines]
> [1]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp
clintonG - 28 Apr 2005 04:15 GMT
Thanks for your comments Scott.

If I create a new project using the name ArbitraryProjectName I could then
rename the root namespace to CompanyName.TechnologyName easily enough but
VSN2003 will name the assembly ArbitraryProjectName.dll. That's where I am
still hung up. What am I missing?

<%= Clinton Gallagher

>I think you are confusing the names of the project, solution, project
>folder, assembly and namespace.
[quoted text clipped - 42 lines]
>> [1]
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp
David Young - 28 Apr 2005 16:05 GMT
You can also change the assembly name.
Right click on the project and select properties.  This will open the
property pages window.  Under "Common Properties" -> General:  You'll see
where to change the Assebmly Name and the Default Namespace. (if you change
the default namespace here you'll need to update existing files).

Dave

> Thanks for your comments Scott.
>
[quoted text clipped - 50 lines]
> >>
> >> [1]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp

clintonG - 28 Apr 2005 17:34 GMT
Thanks, I'll try some of that but I sure wish somebody with a job who is
getting paid to sit around would have written some best practice articles
:-)

<%= Clinton Gallagher

> You can also change the assembly name.
> Right click on the project and select properties.  This will open the
[quoted text clipped - 78 lines]
>> >>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp
Scott M. - 30 Apr 2005 02:30 GMT
You would rename the assembly in the same location that you would rename the
root namespace, the project's properties dialog window.

> Thanks for your comments Scott.
>
[quoted text clipped - 51 lines]
>>> [1]
>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp
clintonG - 01 May 2005 00:09 GMT
Thanks. I think I got it all straightened out. This MSDN document [1] helped
describe the heirarchy.

<%= Clinton Gallagher

[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp


> You would rename the assembly in the same location that you would rename
> the root namespace, the project's properties dialog window.
[quoted text clipped - 54 lines]
>>>> [1]
>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconnamespacenamingguidelines.asp

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.