web guru advise needed.

Eric Williams s-rube at uselessbastard.net
Wed Nov 12 19:38:25 EST 2003


Raaijmakers, Vincent (IndSys, GE Interlogix) wrote:

> Thnx.
> 
> Regarding the SimpleTAL, can you give me an example of one of your heinous
> URLs and explanation why you had to do it that way?
> 
> Vincent


Sure, although I might embarass myself:

My setup is:

http://server/index.py is the main script

possible displayable objects are represented as story objects.
Each story has a unique id, stored in a PostgreSQL database with meta
information as SQL fields, and the object itself as a blob.

Generally, you only have to specify an ID for a story or category
URL:

http://server/index.py?story_id=40

The default method here would be the "show" method of the story, and will
fill in the blanks of which category you're in, etc.

so far so good.  What gets messy is when you want to perform other actions
on the story than showing, e.g.

/index.py?story_id=40&action=edit_story

so that simpleTALES knows to load and compile the edit_story.html template
instead of the show_story.html one, 

And, of course, if they've got cookies disabled

/index.py?story_id=40&action=edit&cmxsessid=742308039

The equivalent Zope URL, for example, would be something like:

http://server/Category/StoryId/EditStory.html

Which, in comparison, is a lot easier read to someone over the phone.

There's probably away around this kind of thing if you're good enough with
Apache rewriting, but I'm not, and it kind of takes care of itself.

I'd also be interested in what people consider the Right Way to Do It.
Although it works, it smells a little too much like php to me.

cya,
Eric


> 
> -----Original Message-----
> From: Eric Williams [mailto:s-rube at uselessbastard.net]
> Sent: Monday, November 10, 2003 1:25 PM
> To: python-list at python.org
> Subject: Re: web guru advise needed.
> 
> 
> Raaijmakers, Vincent (IndSys, GE Interlogix) wrote:
> 
>> 
>> 1) simple presentation layer processing. The HTML pages produced by
>> server will be more focused on presenting images (dynamic), rather that
>> fancy tables, frames, buttons. 2) the framework has to be robust and FAST
>> on performance. 3) runs only on Linux, well not really a requirement,
>> more a statement. 4) runs on Apache (and/or Tomcat)
>> 
>> What technology gives me the best performance?
>> I'm so afraid that adapters like WebKit kills my performance but because
>> of my jsp experience, psp seems the best option.
>> 
>> Vincent
> 
> FWIW, I recently complete a CMS project with the following constellation:
> 
> 1) Apache with mod_python
> 2) PostgreSQL for content storage, mostly in the form of blob'd Pickles
> 3) Templating using SimpleTAL (elegant and leightweight, but requires some
> downright heinous URLs)
> 4) Everything running behind Squid in accelerator mode
> 
> It's pretty dang snappy on performance, but you'd need a dedicated
> server/processor for dynamic images, I would think.
> 
> cya,
> Eric
> 

-- 
---
s- should be removed to contact me...




More information about the Python-list mailing list