473,548 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SV: Choosing the right framework

> -----Oprindelig meddelelse-----
Fra: py************* **@python.org
[mailto:py****** *********@pytho n.org]På vegne af David McNab
Sendt: 17. juli 2003 01:32
Til: py*********@pyt hon.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("E dit article");
$dlg->form_action = "artikel_update .php";
$dlg->add_hidden_fie ld("id", $id);

$page = new UI_TabPage("Art icle");

$layout = new UI_Layout_row(a rray(
array(100),
array(100),
array(100),
array(50, 50),
array(100)
));

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

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

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

$c = new UI_Control_date ("releasedat e", "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_imag e("image_id", "Attach image to article", "");
$c->url_template = IMAGE_UPLOAD_PA TH . "image_%d.j pg";
$layout->add_control($c );

$page->add_control($l ayout);

$dlg->add_page($page );

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

- Carsten
Jul 18 '05 #1
0 1677

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

Similar topics

9
2041
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: One language to fit it all (instead of having one language for webprogramming, one for batches, etc...) I stand now at the point where I must choose...
0
682
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 this is also the way I would configure Zope. > Note, however, that Twisted is *not* a web framework. It has a web
11
9580
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. What I call "shaking the broken tree" :) I chose to make my UT-generator in Python 2.4. However, I am now encountering problems in choosing the...
13
1725
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 page web site that can take a few orders... INCLUDE THE ISP charges..developer, software...
2
1086
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 don't know which technology and/or design pattern is the best for me. I need to design a web site, which can process a large amount of user's...
2
1735
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 "WINDOWS\Microsoft.NET\Framework" Ex: my webserver has following ASP folders
4
1245
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 less salary which i cant live with.Now i got an offer from an MNC with 5 times of current salary but to work in Sharepoint server 2007,Infopath,SQL...
19
2559
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 the right environment for this - running a wide variety of PHP applications. I realise that security is also important, but for now flexibility is...
3
1258
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 dimension solutions. Suggestions? Thanks.
0
7512
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7707
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3495
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.