[ckan-dev] "context" reasoning?
friedrich.lindenberg at okfn.org
Mon Aug 8 09:17:30 BST 2011
On Fri, Aug 5, 2011 at 10:35 AM, William Waites <ww at styx.org> wrote:
> * [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...
Ok, this is seriously messed up, though - isn't it? Suddenly my
"data=" is also your "data=" and my "force=True" becomes someone
else's "force=True" - if it walks like a global variable, it smells
like a global variable, it's too close for me.
> And yeah, sqlalchemy and objects and such are so last millenium...
> 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
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/
More information about the ckan-dev