Agreed.. data persistence should never be tied to the domain model.  That's
precisely the problem with ActiveRecord (sic Django/RoR)
style of db development.  It's treated as an afterthought when in fact, the
database is the most common point of contention within any web application
and usually requires the most optimization (from 'back to front'.. not
'front to back').

Moreover, deviating from this approach presents incredible problems with
development, requiring forks from the prescribed pattern..


On Wed, Jan 21, 2009 at 4:20 AM, Paweł Stradomski <[email protected]>wrote:

>
> W liście Jan Koprowski z dnia środa 21 stycznia 2009:
> > In MVC *M*odel should be abstract layer of data and hide data
> > representation and real method access giving: universal, good
> > described, readable and simple interface to manage this data: add,
> > remove, get all, get one etc... methods.
> >
> One could say that Active Record (django style) is a more leaky
> abstraction,
> as it ties persistence to the domain model. Read more on orm patterns
> (Active
> Record, Table/Row Gateway and Data Mapper in Fowler books).
>
> Model layer should not be (IMHO) monolithic - data persistence should not
> be
> tightly coupled to your domain model, while Active Record does exactly
> that.
>
> So your model should have a low-level layer that does the persistence, and
> high-level domain logic layer that deals with your application logic.
>
> Also, your controllers should probably not use session object at all - you
> could wrap all the high-level processes (eg. user creation, posting an
> article etc.) in functions (maybe classmethods) or classes in the model
> layer.
>
> Just out of curiosity... which University of Technology? The Kraków one
> (AGH)?
>
> --
> Paweł Stradomski
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
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