<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/25/2016 04:04 PM, Thomas De
Schampheleire wrote:<br>
</div>
<blockquote
cite="mid:CAAXf6LVupTe+S0hgicdA=b3wBBzdfmsUFan0TdQ0_2EiHaZA4Q@mail.gmail.com"
type="cite">
<p dir="ltr">On Sep 25, 2016 15:42, "Mads Kiilerich" <<a
moz-do-not-send="true" href="mailto:mads@kiilerich.com">mads@kiilerich.com</a>>
wrote:<br>
><br>
> On 09/25/2016 03:32 PM, Thomas De Schampheleire wrote:<br>
>><br>
>> A question that also needs to be answered is: what
belongs in kallithea/lib/helpers.py and what in
kallithea/lib/utils.py and what in kallithea/lib/utils2.py.
Where is the split? <br>
><br>
><br>
><br>
> Yes, it is a mess. I guess that is where experiments must
show what is feasible improvements.<br>
><br>
> I would say that helpers is what is available in templates
as 'h' and could/should thus be quite high level and might
depend on Pylons and the database.</p>
<p dir="ltr">So actually, anything in helpers that is _not_
directly used from a template should be moved elsewhere (utils,
or maybe helpers2? ;-) )</p>
</blockquote>
<br>
I guess that could make sense. Unless we consider helpers the very
high level library that can be used from anywhere.<br>
<br>
<blockquote
cite="mid:CAAXf6LVupTe+S0hgicdA=b3wBBzdfmsUFan0TdQ0_2EiHaZA4Q@mail.gmail.com"
type="cite">
<p dir="ltr">> (It should thus perhaps not be in lib but in
model?)</p>
<p dir="ltr">I think the web framework, like tg2 does, may expect
helpers to be in lib. We can tell it about another location, but
I don't know if that's worth it.</p>
</blockquote>
<br>
Hmm. That suggests that my idea of lib as low level and model as
more high level doesn't work. That model perhaps should be
considered an internal part of lib ... or something like that.<br>
<br>
<blockquote
cite="mid:CAAXf6LVupTe+S0hgicdA=b3wBBzdfmsUFan0TdQ0_2EiHaZA4Q@mail.gmail.com"
type="cite">
<p dir="ltr">><br>
> It seems like utils2 generally is quite low level and
almost doesn't depend on model. It could thus seem like a/the
"real" lib utils.<br>
><br>
> utils depend much more on model, and parts of it should
thus perhaps move to a more high level model utils ... but there
are probably also "good" parts of it that can stay in lib.<br>
></p>
<p dir="ltr">It may perhaps be easier to step away from monolithic
files and use topic files like foo_utils and such.</p>
</blockquote>
<br>
Agreed, that would make it less of a mess. Also, some of the utility
functions might be quite high level and doesn't have a natural
topic. Except that then that could be the topic ... ;-)<br>
<br>
/Mads<br>
<br>
</body>
</html>