On Tue, Nov 25, 2008 at 03:55:17PM -0600, Shawn Walker wrote:

>> server/api.py:
>>   - In general, this looks nice, though I'd question why this is being 
>> done
>>     as a separate module, rather than massaging the underlying modules to
>>     do the right thing.  Adding a layer to fix problems in lower layers is
>>     wrong.  I suppose it's just a matter of running out of time?
>
> I'm not sure I understand you here.  My whole purpose in creating the 
> server API was two-fold:
>
> 1) provide a stable interface to the request, catalog, and configuration of 
> the server that unknown clients (i.e. random user) can use in templates
>
> 2) abstract away and hide various parts of the api that shouldn't be used 
> by anyone but the server internally (i.e. destroy_catalog, etc.)
>
> 3) prevent major internal changes from breaking template consumers or allow 
> us to completely change the web back-end (i.e. BaseHTTP to CherryPy) 
> transparently
>
> I thought these were the same reasons that moved us to create a client API. 

They are.  I just think that adding a layer to do this, rather than simply
doing it in the existing layers, is the wrong way to go about this.  I'm
simply registering my dislike of the method, just like I did for the client
API.  I don't expect to win this argument, either.

> Remember that the templates provided by the depot are completely 
> customisable, and it is intended that anyone can write their own set of 
> depot facing pages using the API provided instead of relying on ours.

True, but that doesn't mean that we're opening it up for other people to
use right now, either.

>  Perhaps pkg.server.client.api?

Meh.  Keep it what it is now; if it turns out that it was the wrong choice,
it can be changed.

>> Is there a standard way for editors to recognize a file as a mako 
>> template?
>
> None that I've found.  I did find a vim syntax thing for Mako, but I've
> had to do "set ft=mako" each time I edit a file.  It's annoying.

Hm.  Perhaps putting "# vim: ft=mako" down at the bottom would work, but
that's a bit annoying.  If there's no standard header or footer in the
file, or filename extension that indicates mako, then that would be the
best we can do.  :-/

> Note that the '-*- coding: utf-8 -*-' line at the beginning tells Mako
> what the encoding of the file is -- it isn't for vim.

It could be both, of course, if the mako syntax file chose to read that.
But this is *well* beyond the scope of the code review.  :)

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to