Many of them come down to personal preference, but I'll take a picture:
- What are the advantages of using different assemblies for different parts of the application, instead of using only one DLL containing ALL.
If you need to maintain DLLs separately or if you need to distribute different versions of code, then it makes sense to isolate them. If you have the ability to dynamically load assemblies and want to exclude some DLLs from different distributions (for example, to add or remove functions depending on user licensing), this provides a convenient way to do this without relying on flag compilations or various layout configurations - just remove the dlls that you don't want the user to have.
Saving code size for individual libraries may affect JIT, but I'm not sure about that. Maybe someone else can call back.
- Is it good to separate DAL from logic using another project (cq assembly / dll).
The visibility of the layer should look like this: each layer can see everything below it, but nothing higher:
UI Controller layer (populates the UI, interacts with the logic/business objects) Business objects DAL Database.
In general, each layer should only talk to the one below it, and should only be called to the one above it.
Now imagine that you have a set of applications like this:
[asp.net web site] [Winforms client] [windows service] [web service] | | | | web business objects desktop logic service logic | | | \-------------------|--------------------/ | | | generic business objects (BL) / | / DAL ---------------------------------- | SQL
By dividing common objects and DAL into separate assemblies, it is easy to refer to them from different projects or solutions. In this case, the web service application (possibly intended for calling from non-NET clients or third-party websites) can go directly to the DAL if it does not need BL, while other applications can go to BL, then through other layers.
The ability to share code between different types of applications, written in .NET, is a very, very powerful feature unique to .NET. Web code can be stored in its own collection of libraries, as well as code on the desktop, etc. Dividing each layer into one or several assemblies allows you to fix new projects anywhere in the pipeline, which makes sense, and guarantees that t should include, say, system.web when distributing the client application only so that the application compiles.
- Perhaps you have some sources of information about the organization’s project in VisualStudio or the SDK design.
I will try to find some links after my boss stops looking at me, typing during a meeting.