Turbogears2 migration: tests: "cannot import name meta"

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun Sep 25 15:06:52 UTC 2016


On Sep 25, 2016 16:49, "Mads Kiilerich" <mads at kiilerich.com> wrote:
>
> On 09/25/2016 04:37 PM, Thomas De Schampheleire wrote:
>>
>> On Sun, Sep 25, 2016 at 4:10 PM, Mads Kiilerich <mads at kiilerich.com>
wrote:
>>>>
>>>> (It should thus perhaps not be in lib but in model?)
>>>
>>> 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.
>>>
>>>
>>> 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.
>>
>> In a traditional MVC model-view-controller split, 'model' is one of
>> the three pillars. In that view, I think it shouldn't be 'stuffed
>> away' in lib.
>>
>> I don't know if you should try to put model and lib on the same scale.
>> I think they are in some way orthogonal, especially things like
>> lib.{helpers,utils}. For me, the core of 'model' is the definition of
>> the data model, thus the database tables, and perhaps very related
>> set-up code.
>>
>> 'lib' is currently (but maybe logically) a 'trashbin', a collection of
>> code that does not really fit elsewhere, but can be considered
>> 'libraries', i.e. each being standalone and doing some job that helps
>> someone else. 'utils'/'helpers' is even more a trashbin collection
>> that did not even fit in logically named files.
>
>
> Does that mean that lib neither is "below" nor "above" model

Yes

> ...but it is ok that they have mutual dependencies? That seems
unfortunate.

In any case I think mutual dependencies are bad and should be eliminated.
But I don't think we should treat 'lib' as one thing and dictate that it
should only have inward or only have outward dependency arrows. Rather, I'd
look at the individual entities inside lib, e.g. Annotate.py,
paster_commands, helpers, vcs, ...
For each of them, we should decide whether it can depend on model , or if
model can depend on it (but not both).

>
> While I agree that the model is special and "very different", I still
think we have to decide whether it is below or above lib. Or perhaps lib
should be split up in low and high level parts.

Yes, I think this lines up with what I wrote above.

>
> It also sounds like your investigation and experiments show a different
than my initial idea. Great! :-)

So far, all I did was the two patches I sent to the list, and theorize with
you via email. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160925/4388cc00/attachment-0001.html>


More information about the kallithea-general mailing list