Discussion:
Best Practise - layers
(too old to reply)
Craig Lister
2010-02-07 07:26:56 UTC
Permalink
Could someone tell me the common/best practise for a solution layout.
That is, I intend to develop a well designed 4 layered application
(WinForms, .Net 3.5, Database app). I have had the habit of putting
all the layers into one project, in one solution. But should I be
splitting the UI into a Windows Forms project, then add a new project
(Maybe a Class Library project) to the solution for the business
layer.. then a new project for the service layer, and a new layer for
the data access layer? So, the solution has 4 projects.

Hope someone can guide me in best practise.
David Webber
2010-02-07 18:00:36 UTC
Permalink
Post by Craig Lister
Could someone tell me the common/best practise for a solution layout.
That is, I intend to develop a well designed 4 layered application
(WinForms, .Net 3.5, Database app). I have had the habit of putting
all the layers into one project, in one solution. But should I be
splitting the UI into a Windows Forms project, then add a new project
(Maybe a Class Library project) to the solution for the business
layer.. then a new project for the service layer, and a new layer for
the data access layer? So, the solution has 4 projects.
Hope someone can guide me in best practise.
I don't know about best practice, but I have a number of executables which
do similar things using common DLLs.

Each exe has its own menus and tool bars.
Otherwise most of the heavily windows-dependent stuff (drawing code,
dialogues, etc) is in one DLL.
Font management stuff is in another
Utility code (including the maths) which uses the C-run-time but is
completely independent of Windows is in a lower level DLL.
MIDI event management is in another.

I find this clarifies my ideas on the program structure. I find it helpful.

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
Craig Lister
2010-02-07 23:54:49 UTC
Permalink
Thanks Dave. That's helpful. So, using separate projects (and
therefore, DLLs and EXEs) is a good way for managing code separation
and managability then. Also, if I decided to change my ideas to a web
based application, simply creating a new web application, and then
referencing my existing DLLs would be a simple task?

Sounds like the right way to go to me! :)
David Webber
2010-02-08 18:25:53 UTC
Permalink
Post by Craig Lister
Thanks Dave. That's helpful. So, using separate projects (and
therefore, DLLs and EXEs) is a good way for managing code separation
and managability then. Also, if I decided to change my ideas to a web
based application, simply creating a new web application, and then
referencing my existing DLLs would be a simple task?
Sounds like the right way to go to me! :)
I have never written a Web application as such - but modularity is usually a
good idea in my book :-)

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
Continue reading on narkive:
Loading...