I often have to write small web databases - nothing too fancy, just a table or 2 and a few forms/reports. Sometimes it's just a web frontend to a program othertimes more like a database for tracking items. I have used Python and MySQL in CGI but it seems quite long winded. I have used Zope/Plone but it is quite a heavyweight solution for a small app and quite slow unless you do a lot of caching. I have looked at Ruby/Rails but it seems a shame to loose what experience I have in Python by switching to a new language. Does anyone have any experience in this field and/or can suggest what I might try or look at to continue developing in Python? TIA Simon
Simon Faulkner wrote:
I often have to write small web databases - nothing too fancy, just a table or 2 and a few forms/reports. Sometimes it's just a web frontend to a program othertimes more like a database for tracking items.
I have used Python and MySQL in CGI but it seems quite long winded.
I have used Zope/Plone but it is quite a heavyweight solution for a small app and quite slow unless you do a lot of caching.
I have looked at Ruby/Rails but it seems a shame to loose what experience I have in Python by switching to a new language.
Does anyone have any experience in this field and/or can suggest what I might try or look at to continue developing in Python?
CGI is only longwinded if you do it all from scratch; there are many nice frameworks and paradigms to give you a head start. I have been playing with Django (www.djangoproject.com) and it's beautiful. You essentially declare the database schema in the Python model, and you get a very nice web interface for add/edit/delete stuff autogenerated for you. Be prepared to spend half a day setting up though. The other well-documented approach at the moment is Turbogears which includes CherryPy for the web app and SQLObject for database management. Nothing 'for free' but a very clean approach. Hope this helps, - Andy Robinson
Andy Robinson wrote:
CGI is only longwinded if you do it all from scratch; there are many nice frameworks and paradigms to give you a head start.
I have been playing with Django (www.djangoproject.com) and it's beautiful. You essentially declare the database schema in the Python model, and you get a very nice web interface for add/edit/delete stuff autogenerated for you. Be prepared to spend half a day setting up though.
The other well-documented approach at the moment is Turbogears which includes CherryPy for the web app and SQLObject for database management. Nothing 'for free' but a very clean approach.
Cheers Andy, Just the sort of advice I am looking for. I have just written a Sage Line 100 front-end so engineers can enter jobs on a GPRS PDA. It works wonderfully but it's hard adding extra functionality because it's all raw python and cgi. If I change the database I have to troll the whole app! I will go and take a read now ty... Sim
Simon Faulkner wrote:
functionality because it's all raw python and cgi. If I change the database I have to troll the whole app!
Well, you are using an OO language, it is kinda up to you to take advantage of it and make sure the SQL is maintained in some central place so you can easilly change databases ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
functionality because it's all raw python and cgi. If I change the database I have to troll the whole app!
Well, you are using an OO language, it is kinda up to you to take advantage of it and make sure the SQL is maintained in some central place so you can easilly change databases ;-)
I think I still use Python too much like basic :-(
Simon Faulkner wrote:
Well, you are using an OO language, it is kinda up to you to take advantage of it and make sure the SQL is maintained in some central place so you can easilly change databases ;-)
I think I still use Python too much like basic :-(
*slap* *slap* snap out of it man, you have a fully featured OO language here, it's there to make your life easier ;-) *grinz* Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Simon Faulkner wrote:
I often have to write small web databases - nothing too fancy, just a table or 2 and a few forms/reports. Sometimes it's just a web frontend to a program othertimes more like a database for tracking items.
I have used Python and MySQL in CGI but it seems quite long winded.
I have used Zope/Plone but it is quite a heavyweight solution for a small app and quite slow unless you do a lot of caching.
I have looked at Ruby/Rails but it seems a shame to loose what experience I have in Python by switching to a new language.
Does anyone have any experience in this field and/or can suggest what I might try or look at to continue developing in Python?
I'm surprised you haven't had a flood of emails replying to this. :-) The usual choices (with Python) are : Turbogears Subway Django Karrigell (plus others - albatross ?) For smaller apps Karrigell probably has the easiest learning curve. Turbogears and subway are both based on the CherryPy application server, which has a very good reputation. Turbogears probably has the most active user community and momentum. Django uses it's own ORM (database) - but has very good, ready built, admin/authentication systems. It's a cross between an application server and CMS, so more obviously suited to applications that lean in that direction. The above solutions are *basically* multi-threaded solutions (although turbogears can run as multi process and karrigell can run in asynchronous mode I believe). A *great* option - that doesn't seem to be getting much mileage at the moment - is a Twisted based solution. In conjunction with Axiom (database) and Nevow (templating) and possibly even Mantissa (ready built application server under heavy development) it is an asynchronous solution that is highly scalable. I hope that helps. Fuzzyman http://www.voidspace.org.uk/python/index.shtml
TIA
Simon
_______________________________________________ python-uk mailing list python-uk@python.org http://mail.python.org/mailman/listinfo/python-uk
Michael Foord wrote:
A *great* option - that doesn't seem to be getting much mileage at the moment - is a Twisted based solution. In conjunction with Axiom (database) and Nevow (templating) and possibly even Mantissa (ready built application server under heavy development) it is an asynchronous solution that is highly scalable.
+1 for that, although it isn't for the faint of heart. twisted.web, nevow and axiom is a really fabulous system for building web apps, and the guys in #twisted.web are very helpful. It's probably almost completely unlike anything you have ever used before though. Cheers, Doug. -- doug@isotoma.com / Isotoma, Open Source Software Consulting Tel: 020 7620 1446 / Mobile: 07879 423002 / Fax: 020 79006980 Skype: dougwinter / http://www.isotoma.com Lincoln House, 75 Westminster Bridge Road, London, SE1 7HS
Michael Foord wrote:
Simon Faulkner wrote: [snip..] The usual choices (with Python) are :
Turbogears Subway Django Karrigell (plus others - albatross ?)
Oh... not forgetting the 'not-quite-vapourware' web.py, which they have just used to rewrite reddit.com :-) I'm sure there are plenty more as well. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml
_______________________________________________ python-uk mailing list python-uk@python.org http://mail.python.org/mailman/listinfo/python-uk
Simon Faulkner wrote:
I have used Zope/Plone but it is quite a heavyweight solution for a small app and quite slow unless you do a lot of caching.
Well, what you say applies to Plone ;-) Zope can be pretty lightweight if you just use plane ZPT, python scripts and ZSQL methods. When building those kinds of apps, I've never needed to do any explicit caching. But, for what you're talking about here, maybe running a seperate appserver is a step too far... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Zope can be pretty lightweight if you just use plane ZPT, python scripts and ZSQL methods. When building those kinds of apps, I've never needed to do any explicit caching.
Yeah! But you've got 'Asbestos Underwear'! LOL Just read your "Living Hell" presentation - wished I could hear the whole thing. Opened my eyes a little. I only use Plone as a simple Intranet server although I have played about with my own site in Plone as an experiment. It's a complicated world out there...
Simon Faulkner wrote:
Zope can be pretty lightweight if you just use plane ZPT, python scripts and ZSQL methods. When building those kinds of apps, I've never needed to do any explicit caching.
Yeah! But you've got 'Asbestos Underwear'! LOL
Just read your "Living Hell" presentation - wished I could hear the whole thing.
Ah yes, it was certainly interesting giving that talk at the Plone Conference. It's confusing really, the people in the Plone community mainly came from the original "Zope Community" and they're great people. Just makes me wonder why they rally around such shitty software ;-)
Opened my eyes a little. I only use Plone as a simple Intranet server although I have played about with my own site in Plone as an experiment.
...which is about all you can use it for without having to really think hard about scalability. That's what it looses over plain Zope... Plain Zope will scale a fair old way, and even when you need to take it further, it's not "hard", you just throw more boxes into the cluster or add some "standard" front end caching with something like squid.
It's a complicated world out there...
Only when made so by certain "Froducts" ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
It's confusing really, the people in the Plone community mainly came from the original "Zope Community" and they're great people.
It's confusing really, the people in the Zope community mainly came from the original "Python Community" and they're great people. I'll stop there ;-) - Andy
participants (6)
-
Andy Robinson -
Chris Withers -
Doug Winter -
Fuzzyman -
Michael Foord -
Simon Faulkner