MVC-type Framework in Python

DH no at sp.am
Wed Mar 3 17:13:55 EST 2004


> I'm looking for something that can help build
> interface-independent applications, with all logic in a central place.
> There would typically be a GUI interface, character interface and
> web-based interface, all accessing the same python logic.
> The interfaces need not be python-specific. I would like, for example, to
> have an existing PHP website access the same logic.

If you want a PHP website to be able to access it as well as a python 
web or desktop application, you might try something like XML-RPC.
Some python examples:
http://www.pythonware.com/products/xmlrpc/
http://www.quixote.ca/qx/XmlRpcInterface
That last example uses the python-based Quixote web framework.

An alternative to XML-RPC is REST:
http://www.rexx.com/~dkuhlman/rest_howto.html


> Is it feasible to have python extract validation rules from the database
> (e.g. a varchar(20) field) and pass that through to a gui interface that
> would limit the amount of characters entered to 20? If you then change the
> database field to a varchar(30), the change should be
> detected without having to change any other code.

Usually the validation is separate from the database.  For example, how 
would you specify that a field contains an email address or a phone number.

To make a quick web front-end to a database without any programming you 
can use the PHP-based dadabik: http://www.dadabik.org/

But in python, see formencode & SQLobject:
http://formencode.org/
http://sqlobject.org/



More information about the Python-list mailing list