PC Review


Reply
Thread Tools Rate Thread

Assemblies vs. Namespace

 
 
Richard Brown
Guest
Posts: n/a
 
      5th Sep 2003
I think I might be on track to a misnomer that I keep running into.

A lot of the assemblies that I reference are named "System",
"System.Drawing", etc. There are dlls, ie, system.dll and
system.drawing.dll", etc. However, in my Imports statements, I also use
Import System and Import System.Drawing, which I assume are 'namespaces'.

So, is it that Microsoft just wanted to confuse us by naming them the same,
or is there some direct relation?

For example, if I have...

Begin Namespace MyNamespace.SubSpace

End Namespace

Can I put that in an assembly called 'core.dll'. So I would reference Core,
but Import MyNamespace.SubSpace?
Although not a big deal, I think I would like to keep the dll names a little
bit different than the actually namespaces, such as "spcore", "spui",
"spetc"...


 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      5th Sep 2003
"Richard Brown" <(E-Mail Removed)> schrieb
> I think I might be on track to a misnomer that I keep running
> into.
>
> A lot of the assemblies that I reference are named "System",
> "System.Drawing", etc. There are dlls, ie, system.dll and
> system.drawing.dll", etc. However, in my Imports statements, I also
> use Import System and Import System.Drawing, which I assume are
> 'namespaces'.
>
> So, is it that Microsoft just wanted to confuse us by naming them the
> same, or is there some direct relation?


No, they wanted to make it easier. If you are looking for a namespace,
simply set a reference to a assembly with the same name (usually).

> For example, if I have...
>
> Begin Namespace MyNamespace.SubSpace
>
> End Namespace
>
> Can I put that in an assembly called 'core.dll'. So I would
> reference Core, but Import MyNamespace.SubSpace?


Exactly.

> Although not a big deal, I think I would like to keep the dll names a
> little bit different than the actually namespaces, such as "spcore",
> "spui", "spetc"...


I think different. ;-)


--
Armin

 
Reply With Quote
 
Richard Brown
Guest
Posts: n/a
 
      5th Sep 2003
Thank you Armin, this has cleared up a big misunderstanding on my part.
I would normally agree with you regarding keeping base namespaces the same
as assembly names, however, he have very big, powerful and sneaky
competitors who would love to get ahold of our proprietary scheduling
algorithms, so my bosses are just a little panicky. -- thus, I have also
been looking into the dotfuscator from preemptive software.

All of our assemblies will be private assemblies, so there is not an issue
with 3rd parties having to use them.
Now, here is a question...

Can you have a library of private assemblies in your app directories, but
create a global assembly that provides a wrapper around the private
assemblies -- such to expose certain code to 3rd parties who may want to
integrate?

"Armin Zingler" <(E-Mail Removed)> wrote in message
news:eulEh0$(E-Mail Removed)...
> "Richard Brown" <(E-Mail Removed)> schrieb
> > I think I might be on track to a misnomer that I keep running
> > into.
> >
> > A lot of the assemblies that I reference are named "System",
> > "System.Drawing", etc. There are dlls, ie, system.dll and
> > system.drawing.dll", etc. However, in my Imports statements, I also
> > use Import System and Import System.Drawing, which I assume are
> > 'namespaces'.
> >
> > So, is it that Microsoft just wanted to confuse us by naming them the
> > same, or is there some direct relation?

>
> No, they wanted to make it easier. If you are looking for a namespace,
> simply set a reference to a assembly with the same name (usually).
>
> > For example, if I have...
> >
> > Begin Namespace MyNamespace.SubSpace
> >
> > End Namespace
> >
> > Can I put that in an assembly called 'core.dll'. So I would
> > reference Core, but Import MyNamespace.SubSpace?

>
> Exactly.
>
> > Although not a big deal, I think I would like to keep the dll names a
> > little bit different than the actually namespaces, such as "spcore",
> > "spui", "spetc"...

>
> I think different. ;-)
>
>
> --
> Armin
>



 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      6th Sep 2003
Hi Richard,

|| Can you have a library of private assemblies in your app
|| directories, but create a global assembly that provides a
|| wrapper around the private assemblies.

I would imagine that all direct references in a global assembly would have to be to other global assemblies. It kind of breaks
the spirit of being global, otherwise.

That said, there is no reason why you shouldn't hook up to your private assemblies dynamically. The next question is how. (and
it's not for me)

Regards,
Fergus


 
Reply With Quote
 
Richard Brown
Guest
Posts: n/a
 
      6th Sep 2003
Note sure what you mean by this...

> That said, there is no reason why you shouldn't hook up to your

private assemblies dynamically. The next
> question is how. (and it's not for me)


You mean, somehow do a LoadAssembly call to the private assemblies?
Basically, I don't plan on doing this, but was just wondering, in the event
that we write all this as private assemblies and decide later to expose some
sort of public assembly for other people to tie into our app.

"Fergus Cooney" <filter-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Richard,
>
> || Can you have a library of private assemblies in your app
> || directories, but create a global assembly that provides a
> || wrapper around the private assemblies.
>
> I would imagine that all direct references in a global assembly would

have to be to other global assemblies. It kind of breaks
> the spirit of being global, otherwise.
>
> That said, there is no reason why you shouldn't hook up to your

private assemblies dynamically. The next question is how. (and
> it's not for me)
>
> Regards,
> Fergus
>
>



 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      6th Sep 2003
Hi Richard,

|| You mean, somehow do a LoadAssembly call
|| to the private assemblies?

If that'll do it, yes. That or whatever. (Not my area, you see :-))

Regards,
Fergus

ps. About those 'very big, powerful and sneaky competitors'. Have you vetted your cleaning staff? Especially that one who seems to
know an awful lot about computers?


 
Reply With Quote
 
Richard Brown
Guest
Posts: n/a
 
      6th Sep 2003
Yeah, well, we screened all the cleaning staff.... none of them speak
english ;-)
Nah, we're just a small transportation company that wrote this software and
sell it at ridiculously cheap prices comparatively, and just so happened to
luck into a really nifty algorithm (the original developer was on something
really good I think) -- thats all. We our software goes for 20k and
competitors goes for 80k, you kinda get the idea, no use in losing the small
market we have.

"Fergus Cooney" <filter-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Richard,
>
> || You mean, somehow do a LoadAssembly call
> || to the private assemblies?
>
> If that'll do it, yes. That or whatever. (Not my area, you see :-))
>
> Regards,
> Fergus
>
> ps. About those 'very big, powerful and sneaky competitors'. Have you

vetted your cleaning staff? Especially that one who seems to
> know an awful lot about computers?
>
>



 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      6th Sep 2003
Hi Richard,

Just joking, of course. :-) More power to you. I hope it goes well for the company and you get a nice fat bonus!!

Regards,
Fergus


 
Reply With Quote
 
Richard Brown
Guest
Posts: n/a
 
      6th Sep 2003
Haha... yeah, of course.... I think I get a weekend off if it goes well ;-)

"Fergus Cooney" <filter-(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi Richard,
>
> Just joking, of course. :-) More power to you. I hope it goes well for

the company and you get a nice fat bonus!!
>
> Regards,
> Fergus
>
>



 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      6th Sep 2003
LOL, Aw boo.

Fergus


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
phantom namespace across assemblies Dan Holmes Microsoft C# .NET 1 21st Nov 2007 07:54 PM
Hide 'empty' namespace from extarnal assemblies. Michael S Microsoft C# .NET 3 27th Aug 2007 07:03 PM
A namespace implemented over several different assemblies? thechaosengine Microsoft Dot NET Framework 7 9th Aug 2005 11:54 PM
A namespace implemented over several different assemblies? thechaosengine Microsoft C# .NET 7 9th Aug 2005 11:54 PM
Classes with the same name, in the same namespace, but different assemblies hantheman Microsoft Dot NET Framework 0 27th Oct 2003 12:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:11 PM.