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 3281778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:51:13+00:00 2026-05-17T19:51:13+00:00

I come from a Java background, and I see a lot of people say

  • 0

I come from a Java background, and I see a lot of people say namespaces = packages, but looking around at available code it doesn’t seem to me that people use namespaces like they used packages.

Currently I’m working on a DLL to manage all my data access to a database to be shared between two Windows Applications. So far I have been creating packages like I would for Java so I have a Domain, Services, DAO (I call it Repositories) sub namespaces off my top level. Is this correct? Has anyone written a best practice for namespaces? I assume this is probably a very minor point, but I don’t want to go off going against the grain so to speak.

  • 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-17T19:51:14+00:00Added an answer on May 17, 2026 at 7:51 pm

    Slightly subjective, there is no “definitive, correct” answer to this.

    Here’s how i do it, with the intention that assemblies can be shared amongst projects.

    Consider i have a company name called FooBar (+1 for originality anyone? 🙂

    All your assemblies start from this root namespace. We have many shared assemblies.

    Things like:

    • MVC (UI) HTML Helpers. These go in one assembly.
    • Generic Repository. Repository pattern implemented with generics, for re-use.
    • LINQ Extension methods (paging, general syntactic sugar factory). Again, these go in one assembly.

    So, our FooBar Namespace Universe might look like this:

    FooBar
    |
     ---- FooBar.Common.Mvc
    |
     ---- FooBar.Common.DataAccess
    |
     ---- FooBar.Common.Linq
    |
     ---- FooBar.ProjectOne (ASP.NET MVC Web Application)
    |     |
    |      --- FooBar.ProjectOne.Repository (makes use of FooBar.Common.DataAccess)
    |     |
    |      --- FooBar.ProjectOne.WebMvc (makes use of FooBar.Common.Mvc)
    |
     ---- FooBar.ProjectTwo (WPF Application)
          |
           --- FooBar.ProjectTwo.Repository (makes use of FooBar.Common.DataAccess)
          |
           --- FooBar.ProjectTwo.BindingServices (makes use of FooBar.Common.Linq)
    

    Know what i mean?

    Setup your namespaces in a way that it ‘feels right’ putting common logic into common areas, based on the heterogeneous namespace.

    You’ll find a lot of companies with multiple shared projects follow this trend.

    Your thinking of ‘sub-namespaces’ is correct (in my opinion).

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

Sidebar

Related Questions

I come from a Java background, where packages are used, not namespaces. I'm used
I come from Java Background and so used to Debugging using Eclipse but have
I'm new to PHP but come from a Java background and I'm trying to
I come from a java background, but I'm working on a django-based website. To
I'm new to Kohana but come from a Spring/Java background. In Spring I'm used
I come from a Java background, but I learned C++ after and have been
I come from a Java background, and am very used to wrapping code into
I come from a java background. But I would like a cross-platform perspective on
I come from a Java background. Please have a look at the code below
I come from a Java background and am getting more into .NET, what are

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.