I can only speak for me and my preferences. 

I have a domain model and a Resource Model(i guess that is what it is)

The resource model is similar to the domain model but there are differences 
because they both serve different purposes. 

I use the domain model for persistence and retrieval, and I use the 
resource model to provide access to the domain model OR expose other 
services to the views, sometimes a resource model objects serves both 
purposes, other times the resource is mostly wrapping what's on the domain 
model. 

I have no idea if I'm doing it right. But my unit tests still pass :)
 
On Monday, March 5, 2012 3:27:33 PM UTC-5, Jasper wrote:
>
> I have a question for the traversal users: 
>
> do you 
>
> a) load your model from data (i.e. sqla) and add the resource properties 
> (request, __parent__) in the parent?
>
> or
>
> b) have a separate domain model class and a resource class that wraps the 
> former with the above properties?
> (i.e. BlogModel and BlogResource)
>
> B seems to be the cleaner version if you have a non-http API as well, but 
> A is clearly simpler.
>
> Thanks for sharing your experience.
>
> Jasper
>
> -- 
> [email protected]
> http://ilogue.com/jasper
>
> I'd love to see your attachment, but please use OpenDocument, not a 
> proprietary format like docx. It's an international standard, endorsed by 
> the EU, and implemented in many office suites, such as LibreOffice, and 
> commercial products from Oracle, Sun, IBM and Microsoft (from 2007).
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/L-3rp7kwu3cJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to