HighTechTalks DotNet Forums  

Namespace Management

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Namespace Management in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Don Wash
 
Posts: n/a

Default Namespace Management - 08-05-2004 , 08:55 AM






Hi There!

I just need some advice on Namespace management for creating reusable VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many different
VB.NET files and projects. For example, I need to manually type in Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class files.

Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don



Reply With Quote
  #2  
Old   
Ken Tucker [MVP]
 
Posts: n/a

Default Re: Namespace Management - 08-05-2004 , 09:10 AM






Hi,

In the projects properties you can set the root namespace.


Ken
----------------
"Don Wash" <don (AT) wash (DOT) com> wrote

Hi There!

I just need some advice on Namespace management for creating reusable VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many different
VB.NET files and projects. For example, I need to manually type in Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class files.

Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don




Reply With Quote
  #3  
Old   
Don Wash
 
Posts: n/a

Default Re: Namespace Management - 08-05-2004 , 09:31 AM



Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks like
following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using 'MyCompany'
namespace. It will just be a wrapper Namespace which will wrap the actual
applications such as 'MyApplication1' and children. So do I need to create a
dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb2ae (AT) bellsouth (DOT) net> wrote

Quote:
Hi,

In the projects properties you can set the root namespace.


Ken
----------------
"Don Wash" <don (AT) wash (DOT) com> wrote in message
news:us$wAuueEHA.2028 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi There!

I just need some advice on Namespace management for creating reusable
VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many
different
VB.NET files and projects. For example, I need to manually type in
Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class files.

Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don






Reply With Quote
  #4  
Old   
Greg Burns
 
Posts: n/a

Default Re: Namespace Management - 08-05-2004 , 09:42 AM



Can't you just set the root to MyCompany.MyApplication1 ?

Greg

"Don Wash" <don (AT) wash (DOT) com> wrote

Quote:
Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks like
following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using 'MyCompany'
namespace. It will just be a wrapper Namespace which will wrap the actual
applications such as 'MyApplication1' and children. So do I need to create
a
dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb2ae (AT) bellsouth (DOT) net> wrote in message
news:OXpck2ueEHA.556 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi,

In the projects properties you can set the root namespace.


Ken
----------------
"Don Wash" <don (AT) wash (DOT) com> wrote in message
news:us$wAuueEHA.2028 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi There!

I just need some advice on Namespace management for creating reusable
VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many
different
VB.NET files and projects. For example, I need to manually type in
Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class
files.

Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don








Reply With Quote
  #5  
Old   
Don Wash
 
Posts: n/a

Default Re: Namespace Management - 08-05-2004 , 11:32 AM



Yes, I could. But then again, I have to set this information to every
application I develop which is very redundant and really a pain when I need
to change company name.

Any other methods?

Thanks,
Don

"Greg Burns" <greg_burns (AT) DONT_SPAM_ME_hotmail (DOT) com> wrote

Quote:
Can't you just set the root to MyCompany.MyApplication1 ?

Greg

"Don Wash" <don (AT) wash (DOT) com> wrote in message
news:uCU7WCveEHA.332 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks
like
following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using
'MyCompany'
namespace. It will just be a wrapper Namespace which will wrap the
actual
applications such as 'MyApplication1' and children. So do I need to
create
a
dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb2ae (AT) bellsouth (DOT) net> wrote in message
news:OXpck2ueEHA.556 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi,

In the projects properties you can set the root namespace.


Ken
----------------
"Don Wash" <don (AT) wash (DOT) com> wrote in message
news:us$wAuueEHA.2028 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi There!

I just need some advice on Namespace management for creating reusable
VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many
different
VB.NET files and projects. For example, I need to manually type in
Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class
files.

Is there anyway to define a namespace on the Root directory and all
the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don










Reply With Quote
  #6  
Old   
Scott M.
 
Posts: n/a

Default Re: Namespace Management - 08-05-2004 , 12:26 PM



I do a lot of work with a Global insurance company that has a standard that
all applications will start with the company name followed by other company
specific information.

Developers are simply told that when they create a new project, set the root
namespace to Companyname.otherInfo.etc. It isn't really a big deal because
they are not making new projects every 2 seconds and it only takes 2 seconds
to set the root namespace.


"Don Wash" <don (AT) wash (DOT) com> wrote

Quote:
Yes, I could. But then again, I have to set this information to every
application I develop which is very redundant and really a pain when I
need
to change company name.

Any other methods?

Thanks,
Don

"Greg Burns" <greg_burns (AT) DONT_SPAM_ME_hotmail (DOT) com> wrote in message
news:%23f5CMIveEHA.1644 (AT) tk2msftngp13 (DOT) phx.gbl...
Can't you just set the root to MyCompany.MyApplication1 ?

Greg

"Don Wash" <don (AT) wash (DOT) com> wrote in message
news:uCU7WCveEHA.332 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks
like
following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using
'MyCompany'
namespace. It will just be a wrapper Namespace which will wrap the
actual
applications such as 'MyApplication1' and children. So do I need to
create
a
dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb2ae (AT) bellsouth (DOT) net> wrote in message
news:OXpck2ueEHA.556 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi,

In the projects properties you can set the root namespace.


Ken
----------------
"Don Wash" <don (AT) wash (DOT) com> wrote in message
news:us$wAuueEHA.2028 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi There!

I just need some advice on Namespace management for creating
reusable
VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many
different
VB.NET files and projects. For example, I need to manually type in
Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class
files.

Is there anyway to define a namespace on the Root directory and all
the
VB.NET files in the child directory automatically inherits the
parent
Namespace?

Thanks in advance!

Don












Reply With Quote
  #7  
Old   
Andy Becker
 
Posts: n/a

Default Re: Namespace Management - 08-05-2004 , 12:34 PM



"Don Wash" <don (AT) wash (DOT) com> wrote

Quote:
Yes, I could. But then again, I have to set this information to every
application I develop which is very redundant and really a pain when I
need
to change company name.

Any other methods?

Thanks,
Don
That's pretty much the limit of your choices, I'm afraid. Nothing that
can't be handled with a good program editor's file search/replace
functionality - on those rare occasions when the company name changes. :-)

Best Regards,

Andy




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.