2009/3/19 Andreas Jung <[email protected]>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 19.03.2009 6:49 Uhr, Arthur Pemberton wrote: > >> >> SQLAlchemy needs a concept of Data Transfer Objects so that it can be >> easily transmitted and reconstituted as necessary and everyone doesn't >> have to reimplemented the idea themselves. There are many cases where >> one might want to transfer a model from a data source on a server side >> to a client, and vice verse. > > Which usecases? If you want to transfer objects over the wire from one > app to another, you can also attach the database directly. You you work > with serialized > versions of the objects in some way...should be sufficient enough for most > cases.
Any use case when the client doesn't have access to the database, but the client app needs to manipulate the data of the model but not the model itself. Client requests something Server uses SQLAlchemy to query data Server sends resulting entity collection to client via some form of RPC Only the entity data is transmitted Client makes modification, and wants to save the changes Model, with changes is sent back to server Server remaps it and saves it The client shouldn't be able to save the entity from their end. But the developer shouldn't have to worry about making the entity lighter every time as well. I made two attempts at a similar question myself: http://www.mail-archive.com/[email protected]/msg10642.html http://www.mail-archive.com/[email protected]/msg12582.html -- Fedora 9 : sulphur is good for the skin ( www.pembo13.com ) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
