473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SV: Choosing the right framework

> -----Oprindelig meddelelse-----
Fra: py***************@python.org
[mailto:py***************@python.org]På vegne af David McNab
Sendt: 17. juli 2003 01:32
Til: py*********@python.org
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 http://www.freenet.org.nz/python/pyweb and havea
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(100),
array(100),
array(100),
array(50, 50),
array(100)
));

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

$c = new UI_Control_input("title", "Header", "");
$layout->add_control($c);

$c = new UI_Control_textarea("body", "Main article text", "", 190);
$layout->add_control($c);

$c = new UI_Control_date("releasedate", "Release the article on",
date("Y-m-d"));
$layout->add_control($c);

$c = new UI_Control_date("expiredate", "Expire the article on",
date("Y-m-d"));
$layout->add_control($c);

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

$page->add_control($layout);

$dlg->add_page($page);

$dlg->draw();
-------------------------------------

- Carsten
Jul 18 '05 #1
0 1665

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Carsten Gehling | last post by:
Oh how often this subject may come up... The thing is, I've come to the decision of abandoning PHP as much as possible (old projects still remain...), and use Python for all purposes. Reason:...
0
by: Carsten Gehling | last post by:
> Fra: python-list-admin@python.org > På vegne af Moshe Zadka > Sendt: 16. juli 2003 16:33 > Why, did Apache's reverse proxy module stop working suddenly? Sorry - you're right :-) In fact...
11
by: Jean de Largentaye | last post by:
Hi, I need to parse a subset of C (a header file), and generate some unit tests for the functions listed in it. I thus need to parse the code, then rewrite function calls with wrong parameters....
13
by: nospam | last post by:
DEAR MICROSOFT: WOULD YOU PLEASE put up a web page showing the price list of EXPECTED COSTS for MOM & POP when choosing between MySql/PHP and .NET. FIRST: Show INITIAL COSTS for like a 5-10...
2
by: shesh | last post by:
Hi All, I need your advice, since I'm a programmer of windows forms for some times, but never had any real experience in web applications. I need to design a new system for web purposes, but I...
2
by: asnowfall | last post by:
I am new to web technologies. Pls clarify these basic doubts. When there are mutliple ASP version installed on the same machine there will be corresponding directories under...
4
by: Madi | last post by:
Dear all, Im in a confusion about choosing a job offer.Right now im working in ..Net 3.0 components(Workflows,WCF),asp.net 2.0 webparts and all.Im having a good exposure here but with a very...
19
by: hansBKK | last post by:
Upfront disclaimer - I am a relative newbie, just starting out learning about PHP, mostly by researching, installing and playing with different scripts. I am looking for a host that will provide...
3
by: Stefano | last post by:
Hello, I would like to learn a PHP5 framework: I found many but I'm a little confused: which could be "the right one"? I need a good community and an easy to use solution to implement medium...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.