On Jan 21, 2:00 am, Jan Koprowski <[email protected]> wrote:
> 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.
>
> Commonly I use Pylons. In the last lesson of my University of
> Technology our lecturer show us Django and IMHO Django Models is much
> more coherent then SQLAlchemy based model. Why ? In Django i "see"
> only class methods like save or get etc... where i don't know what is
> happend under the class method. This could be database, object
> database or simple text file or even binary file. All what I need is
> use the save method and when I want to move my database from,

The difference between myobject.save() and somepersistencething.add
(object); somepersistencething.commit()  is that the latter allows
abstraction of the concept that your objects are even "saved" at all -
they are not part of any particular hierarchy tied to their
persistence implementation.   As a bonus, the latter API allows an
atomic demarcation of many persistence operations whereas the former
does not.  Neither example indicates the slightest thing to do with
what "happened under the method" and I don't see what you're referring
to.   So I say SQLAlchemy's model is "more coherent".

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