473,394 Members | 1,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Assemblies vs. Namespace

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"...
Nov 20 '05 #1
10 2833
"Richard Brown" <rb****@easylift.org> 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

Nov 20 '05 #2
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" <az*******@freenet.de> wrote in message
news:eu**************@TK2MSFTNGP09.phx.gbl...
"Richard Brown" <rb****@easylift.org> 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

Nov 20 '05 #3
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
Nov 20 '05 #4
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" <fi******@tesco.net> wrote in message
news:Oa**************@TK2MSFTNGP10.phx.gbl... 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

Nov 20 '05 #5
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?
Nov 20 '05 #6
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" <fi******@tesco.net> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
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?

Nov 20 '05 #7
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
Nov 20 '05 #8
Haha... yeah, of course.... I think I get a weekend off if it goes well ;-)

"Fergus Cooney" <fi******@tesco.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #9
LOL, Aw boo.

Fergus
Nov 20 '05 #10
Richard,
I tend to follow what the Framework does.

I name the assembly for the namespace it contains, complete with the periods
in the dll names!
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"... As Armin stated, your naming convention is acceptable also.

Interesting enough I do not see in the .NET Design Guidelines for Class
Library Developers any guidelines for naming the Assembly.

http://msdn.microsoft.com/library/de...guidelines.asp

In fact the guides specifically state "Finally, note that a namespace name
does not have to parallel an assembly name. For example, if you name an
assembly MyCompany.MyTechology.dll, it does not have to contain a
MyCompany.MyTechnology namespace." (which supports your convention).
http://msdn.microsoft.com/library/de...guidelines.asp

Hope this helps
Jay
"Richard Brown" <rb****@easylift.org> wrote in message
news:eB**************@TK2MSFTNGP11.phx.gbl... 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"...

Nov 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dan | last post by:
I am creating a c# class library project to be used by some exe clients. This library needs to be localized for its text messages using satellite resource-only assemblies; I have created the...
12
by: Mark Broadbent | last post by:
Hi guys, just going through remoting at the moment and a couple of questions relating to .net in general has surfaced. Firstly I have seen in the designer that for the namespace and many of its...
7
by: thechaosengine | last post by:
Hi all, Can anyone tell me if it is advisable (or even possible) to define a namespace across 2 or more assemblies? For example, consider the namespace SampleApplication.Data.Providers ...
5
by: Raterus | last post by:
I'm just throwing this error out for my sanity, I've seen posts about this, but never solutions. I'm using VS.NET 2003, Framework 1.1, and I'm getting a random error about every 1 out of 10 times...
5
by: Welman Jordan | last post by:
I have developed several assemblies for my own site. They are in different namespaces, e.g. MySite.Web; MySite.Web.UI; MySite.Web.UI.HtmlControls; MySite.Web.UI.WebControls; I would like...
7
by: Steve | last post by:
Hi all, I'm designing my DAL layer(s) for our suite of applications and I'm designing myself in circles, it's gotten to the point where each idea just mixes me up more :) We have 3 loosely...
5
by: bhattpiyush | last post by:
Hi All, I have a class Transaction in 2 different assemblies having different namespaces totally. I have an ASP.Net(1.1) page. In the codebehind .cs file I references/imports one of those...
1
by: icfai | last post by:
hi friends.... I have got a problem regarding loading of multiple assemblies, actually its required for an editor which implements the intellisenseas in vb or dotnet. for that it is required to...
7
by: WTH | last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference the same interface from the same file in two different projects the types are actually incompatible. I found this out...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.