[SQLObject] Re: SQLObject & Webware FormKit Integration
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: David B. <db...@fi...> - 2004-01-13 19:03:23
|
Ian Bicking <ia...@co...> writes:
> On Tue, 2004-01-13 at 10:43, David Bolen wrote:
(...)
> > What I find attractive about PyProtocols (and probably the others) is
> > that you still get the "Does it quack?" approach, but you do so with a
> > single adaptation call ("adapt" with PyProtocols"). And that's an
> > often discussed topic in the Python arena - just how do you ask "Does
> > it quack?"
>
> Interfaces answer "Does it quack" -- adaptation goes a bit further,
> saying "Give me something that quacks".
Definitely - I oversimplified a bit much. I'd probably rephrase that
instead of asking "Does it quack?" the adaption says "Could you
quack?" :-)
> > The typing really isn't that much. Yes, you need to define an
> > interface, but to be honest, you should be doing that anyway as a way
> > of documenting the "duck" that your object expects.
>
> And if you are just writing an "application" (vs. a framework), you
> probably won't define any interfaces at all.
Depending on your definition of "application" I'd agree. To this
point much of my own use of PyProtocols has been within our own
application, but at the layer of core components within the
application (not really a framework, just central component
definitions). These components are expected to interface in various
ways over time, so while I don't have the need to define many adapters
beyond the interfaces yet, I can envision using that facility down the
road.
So I'd expect that most applications would at least have an
opportunity to use interface definitions at some level, unless they
really are just a thin glue layer above other libraries of objects.
-- David
|