Db4o Mvc Application Architecture

Posted by Mac on Stack Overflow See other posts from Stack Overflow or by Mac
Published on 2010-03-29T22:50:20Z Indexed on 2010/03/29 22:53 UTC
Read the original article Hit count: 601

Filed under:
|

I am currently testing out Db4o for an asp.net MVC 2 application idea but there are a few things I'm not quite sure on the best way to proceed.

I want my application to use guessable routes rather than Id's for referencing my entities but I also think I need Id's of some sort for update scenarios.

so for example I want

/country/usa instead of /country/1

I may want to change the key name though (not perhaps on a country but on other entities) so am thinking I need an Id to use as the reference to retrieve the object prior to updating it's fields. From other comments it seems like the UUID is a bit long to be using and would prefer to use my own id's anyway for clean separation of concerns.

Looking at both the KandaAlpha project I wasn't too keen on some aspects of the design and prefer something more along the lines of S#arp architecture where they use things like the [domainsignature] and EntityWithTypedId, IEntityDuplicateChecker, IHasAssignedId, BaseObject and IValidatable in their entities to control insert/update behaviour which seems cleaner and more extensible, covers validation and is encapsulated well within the core and base repository classes.

So would a port of S#arp architecture to Db4o make sense of am I still thinking rmdbs in an oodb world?

Also is there a best practice for managing indexes (including Unique ones as above) in Db4o? Should they be model metadata based and loaded using DI in a bootstrapper for example or should they be more loaded more like Automapper.CreateMap?

Its a bit of a rambling question I know but any thoughts, ideas or suggested reading material is greatly appreciated.

Thanks Mac

© Stack Overflow or respective owner

Related posts about db4o

Related posts about s#arp-architecture