Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > SV: Choosing the right framework

Thread Tools

SV: Choosing the right framework

Carsten Gehling
Posts: n/a
> -----Oprindelig meddelelse-----
> Fra: Removed)
> [mailto(E-Mail Removed)]På vegne af David McNab
> Sendt: 17. juli 2003 01:32
> Til: (E-Mail Removed)
> Emne: Re: Choosing the right framework

> I've been working on an HTML generation framework called 'pyWeb'. Just
> posted to this ng yesterday, calling for testers.
> You might like to visit and have a
> look.

This I did - to be honest, I'm no real fan of frameworks where you make
objects/functions to represent html-tags. It's IMHO not a good way to
seperate logic and presentation. I'm more to the kind of templates where you
write your own html snippets and embed som sort of template markers inside.

But thanks anyway.

I actually did this myself in PHP, but in a greater level of abstraction. I
needed a fast way of creating "user interfaces" (dialog forms etc.), so I
created a class hierarchy with tab-pages, layout managers, input controls,
etc. that all conformed to the general design.

The complete script for an dialog form to edit eg. an article would look
like this (mind you - it's PHP):
$dlg = new UI_TabDialog("Edit article");
$dlg->form_action = "artikel_update.php";
$dlg->add_hidden_field("id", $id);

$page = new UI_TabPage("Article");

$layout = new UI_Layout_row(array(
array(50, 50),

$c = new UI_Control_static("Edit your article and click on "Save");

$c = new UI_Control_input("title", "Header", "");

$c = new UI_Control_textarea("body", "Main article text", "", 190);

$c = new UI_Control_date("releasedate", "Release the article on",

$c = new UI_Control_date("expiredate", "Expire the article on",

$c = new UI_Control_image("image_id", "Attach image to article", "");
$c->url_template = IMAGE_UPLOAD_PATH . "image_%d.jpg";




- Carsten

Reply With Quote

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
Choosing framework Mark Levison Ruby 4 05-24-2008 05:36 AM
Choosing the right framework Carsten Gehling Python 9 11-27-2003 10:05 AM
Need help choosing the right router. Robert Le Feve Cisco 3 11-19-2003 02:31 AM
Re: Choosing the right training company S. O'Brien MCSE 0 09-05-2003 01:58 PM
SV: Choosing the right framework Carsten Gehling Python 0 07-16-2003 02:54 PM