Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: ANNOUNCE: JOTWeb 1.11, preview of new web application system.

Reply
Thread Tools

Re: ANNOUNCE: JOTWeb 1.11, preview of new web application system.

 
 
Sean Reifschneider
Guest
Posts: n/a
 
      06-23-2003
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:

#!/usr/bin/python
import os
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
try:
templ = ctx.load_template(page)
except ApplicationError:
templ = ctx.load_template('oops.html')

templ.to_html(ctx)

print 'Content-Type: text/html'
print
ctx.flush_content()

Had integration with Apache and the example:

import code

def page_display(ctx):
ctx.run_template('time.html')

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
now. <sigh>

>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
Albatross users.

>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...

Sean
--
The important thing is not to stop questioning. Curiosity has its own
reason for existing. -- Albert Einstein
Sean Reifschneider, Member of Technical Staff <(E-Mail Removed)>
tummy.com, ltd. - Linux Consulting since 1995. Qmail, Python, SysAdmin

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to preview c# 2005 mobile web application without a device? arnie ASP .Net Mobile 3 08-17-2007 08:01 PM
Preview: Dystopia Preview Silverstrand Front Page News 0 02-05-2006 03:15 AM
Select Checkboxes in Datagrid and preview in new window Angela ASP .Net 0 11-16-2004 05:01 PM
Preview of a Stackless Zope Application Christian Tismer Python 5 12-16-2003 11:59 AM
Re: ANNOUNCE: JOTWeb 1.11, preview of new web application system. Sean Reifschneider Python 0 06-23-2003 11:31 PM



Advertisments