Namespace Naming Guidelines

  • Thread starter Thread starter clintonG
  • Start date Start date
C

clintonG

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/d...enref/html/cpconnamespacenamingguidelines.asp
 
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.
 
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



Scott M. said:
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.


clintonG said:
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/d...enref/html/cpconnamespacenamingguidelines.asp
 
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

clintonG said:
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



Scott M. said:
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. 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/d...enref/html/cpconnamespacenamingguidelines.asp
 
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

David Young said:
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

clintonG said:
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



Scott M. said:
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. 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/d...enref/html/cpconnamespacenamingguidelines.asp
 
You would rename the assembly in the same location that you would rename the
root namespace, the project's properties dialog window.


clintonG said:
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



Scott M. said:
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.


clintonG said:
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/d...enref/html/cpconnamespacenamingguidelines.asp
 
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/d...enref/html/cpconnamespacenamingguidelines.asp



Scott M. said:
You would rename the assembly in the same location that you would rename
the root namespace, the project's properties dialog window.


clintonG said:
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



Scott M. said:
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.


message 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/d...enref/html/cpconnamespacenamingguidelines.asp
 
Back
Top