By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,290 Members | 1,263 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,290 IT Pros & Developers. It's quick & easy.

Namespace best practice

P: n/a
Is it best to separate the layers within an app (for example business logic
layer) into separate .dlls or just use namespaces to logically divide the
app?
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Nak
> Is it best to separate the layers within an app (for example business
logic
layer) into separate .dlls or just use namespaces to logically divide the
app?


That's all a matter of personal preference. It is a good idea to seperate
parts of the application into DLL's, parts that are reusable and could be
used in other applications. For example, I have a DLL wich contains all of
my reusable classes and user controls, this way I can update the DLL and as
long as I don't change the interface I can *update* the application without
having to replace everything (Though I'm sure you knew that anyway).

It's a good idea to employ suitable name spaces too though of course, for
example my namespace root is my full name, and my application components
come under that.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #2

P: n/a
Hello,

"Ed Crowley" <cu******@pacbell.net> schrieb:
Is it best to separate the layers within an app (for example
business logic layer) into separate .dlls or just use namespaces
to logically divide the app?


I would place them in separate DLLs.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

P: n/a

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
Hello,

"Ed Crowley" <cu******@pacbell.net> schrieb:
Is it best to separate the layers within an app (for example
business logic layer) into separate .dlls or just use namespaces
to logically divide the app?


I would place them in separate DLLs.


Thought so. I've read advice from MS saying to put everything into one .exe
for best performance, but I may want to use my business layer for a web
front-end, so I guess DLLs are the best way to go.

Thanks.
Nov 20 '05 #4

P: n/a
Ed,
In addition to Nak's & Herfried's comments I tend to use a combination of
both.

Some of my projects have multiple assemblies per layer, where there are
logical groupings within that layer. Also I tend to have one or two
'Framework' assemblies that are somewhat layer indifferent (they apply to
all layers or multiple layers).

The problem that tends to come into play is when two layers (in two
assemblies) both need to know about the other, which is where the Separated
Interface Pattern is handy.

http://www.martinfowler.com/eaaCatal...Interface.html

Hope this helps
Jay

"Ed Crowley" <cu******@pacbell.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Is it best to separate the layers within an app (for example business logic layer) into separate .dlls or just use namespaces to logically divide the
app?

Nov 20 '05 #5

P: n/a
Thanks to everyone for the information!

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:O#**************@TK2MSFTNGP11.phx.gbl...
Ed,
In addition to Nak's & Herfried's comments I tend to use a combination of
both.

Some of my projects have multiple assemblies per layer, where there are
logical groupings within that layer. Also I tend to have one or two
'Framework' assemblies that are somewhat layer indifferent (they apply to
all layers or multiple layers).

The problem that tends to come into play is when two layers (in two
assemblies) both need to know about the other, which is where the Separated Interface Pattern is handy.

http://www.martinfowler.com/eaaCatal...Interface.html

Hope this helps
Jay

"Ed Crowley" <cu******@pacbell.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Is it best to separate the layers within an app (for example business

logic
layer) into separate .dlls or just use namespaces to logically divide the app?


Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.