[Openstack] using objects returned from DB layer
Johannes Erdfelt
johannes at erdfelt.com
Thu Dec 15 16:54:22 UTC 2011
On Thu, Dec 15, 2011, Kevin L. Mitchell <kevin.mitchell at rackspace.com> wrote:
> 2. However, I violently disagree with the idea that the DB layer
> must return dicts. It does not, even if you start talking about
> allowing use of other kinds of databases. We can, and should,
> wrap these things in objects, upon which we can call methods
> that do thingsāi.e., we should, you know, actually use
> object-oriented programming.
What kinds of things?
I'm not against returning back a standardized object that provides
__getattr__ so we don't have to use dict notation. Any database backend
can do something similar easily.
I'm just trying to better understand what is object-oriented about the
data returned from a database? What methods would we want to use?
JE
More information about the Openstack
mailing list