[ckan-dev] "context" reasoning?

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Mon Aug 8 08:17:30 UTC 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.

- Fr.

> 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
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>



-- 
Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/

http://twitter.com/pudo
http://pudo.org




More information about the ckan-dev mailing list