Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 713543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:58:23+00:00 2026-05-14T04:58:23+00:00

I’ve recently reorganized a solution-in-progress from 24 projects to 4. To keep the copious

  • 0

I’ve recently reorganized a solution-in-progress from 24 projects to 4.

To keep the copious files organized in the “main” project, things are in folders in folders in folders. I think I’ve preserved a logical, discoverable arrangement of the solution content.

As a result, of course, I end up with namespaces like AppName.DataAccess.NHibernate.Fluent.Mappings.

Is there any compelling reason that I should care about flattening out the namespace hierarchy when my project has a somewhat deeply nested folder structure?

(I am not concerned about resolving or managing using directives; I let ReSharper do all the heavy lifting here.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:58:23+00:00Added an answer on May 14, 2026 at 4:58 am

    I would only flatten where there is a distinct maintenance advantage to do so.

    Namespaces are more for organizational purposes with the added benefit of helping to reduce naming conflicts. I tend to keep my namespaces in-line with the .NET Framework and other major library namespaces. This helps others to find classes easier. (As you say, discoverable arrangement.) For instance, my path utilities are under Missico.IO.Path, my data access library under Missico.Data, my application’s data access under AppName.DataManager (which uses Missico.Data and all other data namespaces).

    I always use my last name or the company’s name at the root namespace. (Any noun will do.) This allows the user (programmer) to easily resolve naming conflicts with a simple name change in source code or an using alias for library references.

    using Company = Missico;
    String x = Company.IO.Path.CommonPath("", "");
    

    I try to keep a folder for each namespace. Nesting the folders if the namespaces are nested. This helps me and others to find source code quicker because they are familiar with the namespace structure. Why make them learn two structures. Each folder contains all the source files for that namespace, except for complex classes. They get there own subfolder (without changing the namespace.) I may end up with a namespace folder that contains four or five subfolders for complex classes and supporting classes.

    Note that since defining a System namespace will cause all kinds of trouble, I use Core as my “system/global” namespace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.