Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to organize a large project with solutions/projects/folders?

We are working on a very large VS project.

We want the project structure to "hint" developers on the logical components and design.

For this purpose, which is best:

  1. One project with many subfolders and namespaces
  2. Split to multiple projects based on logical grouping of classes. Have all projects in the same solution with solution folders.
  3. Same as #2 but have multiple solutions instead of a single with subfolders.
like image 449
Yaron Naveh Avatar asked Oct 11 '22 10:10

Yaron Naveh


1 Answers

My projects are huge.

We separate each "module" in different assemblies, creating Class Libraries. Something like this:

Client.ProjectName (Solution)
    Client (Class Library)
        - SectionHandler...
        - ComponentModels...
        - Utilities...

    Client.Web (Class Library)
        - Handelrs
        - Extenders

    Client.Net (Class Library)
        - MailQueue

    Client.Blog.WebControls.UI (Class Library)
        - TopContent.ascx
        - PostsList.ascx

    Client.News.WebControls.UI (Class Library)
        - TopContent.ascx
        - PostsList.ascx

    Client.Website

Each Class Library is a project under the solution Client.ProjectName or under some other shared solution.

The file system looks like this:

Client
|- Framework
   |- Client
      |- files...
   |- Client.Web
      |- files...
   |- Client.Net
      |- files...
|- SolutionName
   |- Client.Blog.WebControls.UI
   |- Client.News.WebControls.UI
   |- Website

Shared client libs goes immediately under the Client\Framework folder, it is meant to be used on all projects for this client. Specific projects goes under the solution. We also have a folder called Company where we keep projects that can be used in any other project for any client, it is like the company framework.

The solutions we use:

  • One for the company framework
  • One for a client framework
  • One for each client solution

The same project can be referenced in multiple solutions, so you don't necessarily need to create all those solutions.

With this format we could use a lot of things on other projects simply referencing a DLL. Without this structure some projects wouldn't be possible in the given time.

like image 77
BrunoLM Avatar answered Oct 19 '22 00:10

BrunoLM