-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Grouping entities into different namespaces?
PostPosted: Thu May 10, 2007 12:49 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
This is more a general ORM question than NHibernate-specific, but anyway ...

We have a highly extensible application. We are thinking of encouraging or even requiring developers, both in-house and our customers, to organize classes first by "application module". Our off-the-shelf application has 5 or 6 "modules", and customers often add more functionality that are really new "modules" in themselves.

Currently, we are putting all of our product's entities into one namespace. To make the application more modular, should we divide up the entities into separate namespaces? The entity classes are generated, so tracking which module they are in, and which modules the entities they relate to, can be fairly complicated. The "modules" are not all independent -- they reference each other, so they'll still need to be in the same assembly at least.

Does anyone else divide up their entities into separate namespaces by "application module", even if the modules are not all independent? Does anyone else have highly extensible applications where they want to have some kind of modular structure as the application grows?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 4:37 pm 
Regular
Regular

Joined: Wed Jun 21, 2006 3:13 pm
Posts: 110
I always group things by logical separation... if they're all related domain objects, then it might make the most sense to just keep them in your current "core" assembly and namespace. However, if they're fairly distinct and you can draw clear divisions between responsibilities (even if certain responsibilities require domain objects from other responsibilities), then grouping them is nice.

System is a good reference... one assembly with some really nice groupings by responsibility.

Just don't get carried away ;-) I guess my rule of thumb is that if I can imagine them being in their own assemblies, they at least get their own namespaces for now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.