Re: ANNOUNCE: JOTWeb 1.11, preview of new web application system.
On Mon, Jun 23, 2003 at 11:20:35AM +1000, Dave Cole wrote:
>OK. I think I have been arguing the wrong issue :-)
Yeah, I think that may be the case... :-) It does really boil down to
a subjective issue, I don't like always having to have the python code
that calls into the template.
I would like to suggest that you include an example earlier on about
making the global name-space available and an example of the abbreviated
calling mechanisms. It was clear from my half hour of reading the docs
that I could get by with anything less than a dozen lines of code...
>I don't see how the Albatross approach is analogous to the above. Am
>I missing something? As far as I can tell the only difference in the
Most of it is that I'm working from an understanding of Albatross which
is much shallower than yours. The examples in the documentation are
rather unlike the shorter examples you've provided here. I mean, based
on a half hour of looking at the docs, it looked like a typical
Albatross page handler would be:
from albatross import SimpleContext, ApplicationError
script_name = os.environ['SCRIPT_NAME']
request_uri = os.environ['REQUEST_URI']
page = request_uri[len(script_name) + 1:]
if not page:
page = 'main.html'
ctx = SimpleContext('templ')
ctx.locals.page = page
templ = ctx.load_template(page)
templ = ctx.load_template('oops.html')
print 'Content-Type: text/html'
Had integration with Apache and the example:
been more clear, I probably would have looked further at Albatross at
the time. I didn't *WANT* to build another web application thingy... I
wanted to build web applications...
One thing that I do like in JOTWeb is the cascading of modules and HTML
templates. I set up a "templates.html" page in the top-level directory,
and sub-directories can reference the templates within it, ditto for
code or variables, etc...
It seems likely that I could do something similar with Albatross, now
that we've had this discussion, as I said in a previous message.
I'm half tempted to either incorporate the ability to do this with
Albatross in addition to SimpleTAL into JOTWeb, or look at switching
over to Albatross... However, I really want to be building sites right
>remove the requirement for page modules. Consider the mixin classes
>in this section.
I had looked at the mixin reference quickly when I first looked at the
docs, but I couldn't really understand how they were of use... Examples
in this section of the document would be extremely useful to new
>I wonder if the real difference between JOTWeb and Albatross is that
>the Controller is mostly implicit in JOTWeb but explicit in Albatross.
Yes, that's probably fair to say...
The important thing is not to stop questioning. Curiosity has its own
reason for existing. -- Albert Einstein
Sean Reifschneider, Member of Technical Staff <firstname.lastname@example.org>
tummy.com, ltd. - Linux Consulting since 1995. Qmail, Python, SysAdmin
|All times are GMT. The time now is 05:02 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.