[ckan-dev] "context" reasoning?

William Waites ww at styx.org
Fri Aug 5 08:35:50 UTC 2011


* [2011-08-02 00:25:54 +0100] David Raznick <kindly at gmail.com> écrit:

> > I've never seen that done anywhere before.. (save CLOS perhaps). Also:
> > why isn't dictization in the model?
> 
> This should definitely not be in the model but it is also misplaced where it
> is, probably should be in logic.  I really hate model code as it ties you to
> using sqlalchemy objects for everything. The model code should not mix with
> the how the data is internally represented.   This way we could much more
> easily change data store if we wanted to.

One place this type of thing is done a lot is in twisted, there's a
lot of passing around *av and **kw for generic operators and only at
the lowest level of the stack will they be inspected. It's nice
because if you decide you need to thread a new parameter through the
call graph you don't need to go change all of the function signatures.

Some days I think that every function and method should just take *av
and **kw since we don't have any type checking anyways...

And yeah, sqlalchemy and objects and such are so last millenium...

-w

-- 
William Waites                <mailto:ww at styx.org>
http://river.styx.org/ww/        <sip:ww at styx.org>
F4B3 39BF E775 CF42 0BAB  3DF0 BE40 A6DF B06F FD45




More information about the ckan-dev mailing list