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 -~----------~----~----~----~------~----~------~--~---
