[lively-kernel] Code reorganization in Webwerkstatt - please check your js files
Fabian Bornhofen
fbornhofen at googlemail.com
Thu Nov 3 17:54:50 CET 2011
:p ok first of all, thanks Jens for fixing that.
So there are two ways of thinking about that idea.
First, if we do it, we have to be careful that we're not exaggerating
the whole configuration thing.. I don't want Lively config to look
like apache.conf or some Java stuff.
On the other hand, it could be very useful as long as we still need to
map (a) module names to files and (b) files to module names. Case (a)
is easy, (b) always tends to be a mess. I think Jens' idea would
simplify at least that. But then again, the only real solution is to
nail files.
Oh and about "go and implement"... I like prototyping ;)
Cheers,
Fabian
On Thu, Nov 3, 2011 at 9:39 AM, Roeder, Marko
<Marko.Roeder at student.hpi.uni-potsdam.de> wrote:
> Jens just "deployed" a solution for the SCB that is using the list implementation :-). So it should work now - as long as it is a list (he just told me that it can only work with a list, not an object).
> So I guess his question was more a "what do you think" than "go and implement" :-p
>
> - Marko
>
>
> On Nov 3, 2011, at 17:27 , Fabian Bornhofen wrote:
>
>> That would probably work and make everything related to module lookup
>> more explicit.
>> Do you have any immediate use cases? (I'm inclined to first fix the
>> SCB regression introduced by the current solution :) ).
>>
>> Best,
>> Fabian
>>
>>
>> On Thu, Nov 3, 2011 at 9:11 AM, Jens Lincke
>> <Jens.Lincke at hpi.uni-potsdam.de> wrote:
>>> Hi, Fabian
>>> thanks for implement the paths so that there is no searching any more.
>>> Currently you implemented it as a list:
>>> Config.modulePaths // [users/, projects/]
>>>
>>> but I thought more of it like a mapping:
>>> Config.modulePaths // {
>>> users: "../users", projects: "../projects",
>>> externlsite: "http://externlsite/path/to/repos", codeDB:
>>> "http://couchdb.lively...."}
>>>
>>> What do you think?
>>> Best,
>>> Jens
>>> On 02.11.2011, at 23:51, Fabian Bornhofen wrote:
>>>
>>> Hi Jens -
>>>
>>> On Fri, Oct 28, 2011 at 5:52 AM, Jens Lincke
>>> <jens.lincke at hpi.uni-potsdam.de> wrote:
>>>
>>> I would also opt for extending this codebase only on a per path basis...
>>>
>>> e.g. mapping "users.*" to
>>>
>>> "http://lively-kernel.org/repository/webwerkstatt/users/"
>>>
>>> That would make the query if something exists in one codebase or another
>>>
>>> unnecessary, because we would know before loading where we have to look for
>>>
>>> everything that begins with "users".
>>>
>>> Implemented. Paths can be specified in the Config object of a world
>>> (Config.modulePaths).
>>> Defaults are users/ and projects/ (to be found in bootstrap.js). That
>>> means that modules with names starting with 'users.' or 'projects.'
>>> will be found. There's no probing any more, no 404s, just plain
>>> loading.
>>>
>>> Please let me know if anything breaks because of that.
>>>
>>> Best,
>>> Fabian
>>>
>>>
>> _______________________________________________
>> lively-kernel mailing list
>> lively-kernel at hpi.uni-potsdam.de
>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>
> _______________________________________________
> lively-kernel mailing list
> lively-kernel at hpi.uni-potsdam.de
> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>
More information about the lively-kernel
mailing list