Web Development with Python

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Web Development with Python

Simon Faulkner
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

_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Andy Robinson-2
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
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Simon Faulkner
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
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Michael Foord
In reply to this post by Simon Faulkner
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
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-uk
>
>
>

_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Tim Golden
In reply to this post by Simon Faulkner
[Michael Foord]

> Simon Faulkner wrote:
[... snip re web app ...]

> I'm surprised you haven't had a flood of emails replying to this. :-)

Might be worth pointing out to Simon that this is the
UK Python list, and while I'm quite you'll get
helpful answers, this list tends to be used for very
UK-specific things such as meetups, jobs etc. Not
saying there's anything wrong with posting general
Python questions here; just that you'll probably get
a wider response from the main Python mailing list /
newsgroup / Google Group (they all mirror to each other,
so take your pick):

http://mail.python.org/mailman/listinfo/python-list
usenet - comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en

Tim Golden

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Simon Faulkner
>>I'm surprised you haven't had a flood of emails replying to this. :-)

Ha ha!  Everyone has their favorite!

> Might be worth pointing out to Simon that this is the
> UK Python list, and while I'm quite you'll get
> helpful answers, this list tends to be used for very
> UK-specific things such as meetups, jobs etc. Not
> saying there's anything wrong with posting general
> Python questions here; just that you'll probably get
> a wider response from the main Python mailing list /
> newsgroup / Google Group (they all mirror to each other,
> so take your pick):

Cheers Tim,

I appreciate the difference but also find that I sometimes get a more
measured, mature response from the UK specific groups without anyone
yelling "Like, d00d, use PHP man!"

I am also hoping to get to attend a Python event or 2 and thought I
would like to know who's who before pitching up.

Are there any event's 'ooop north'?

Sim
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Doug Winter
In reply to this post by Michael Foord
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.

--
[hidden email]   / 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
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Tim Golden
In reply to this post by Simon Faulkner
[Simon Faulkner]
| [Tim Golden]
| > Might be worth pointing out to Simon that this is the
| > UK Python list, and while I'm quite you'll get
| > helpful answers, this list tends to be used for very
| > UK-specific things such as meetups, jobs etc. Not
| > saying there's anything wrong with posting general
| > Python questions here; just that you'll probably get
| > a wider response from the main Python mailing list /
| > newsgroup / Google Group (they all mirror to each other,
| > so take your pick):
|
| I appreciate the difference but also find that I sometimes get a more
| measured, mature response from the UK specific groups without anyone
| yelling "Like, d00d, use PHP man!"

My own experience is that the main Python group is
remarkably mature and uninfested with script-kiddies
and so on. I wouldn't say there are never spats, but
even those tend to be remarkably controlled, and often
informative (in a heated kind of way). By all means
stick to the UK list, but you might want to dip your
toe in the waters of the main list just to see...

| Are there any event's 'ooop north'?

There was talk of one recently, can't remember
where, in addition to the usual Oxford one.
(Which I've never managed to get to!)
Does this mean you're based up there (says the
Londoner). 'Cos we seem to be going through
a phase of regular meetups in London at the
moment, ie getting together in a pub along
with various other interested parties. You
might want to come along... or organise a
northern equivalent!

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Andy Robinson-2
In reply to this post by Simon Faulkner
> I appreciate the difference but also find that I sometimes get a more
> measured, mature response from the UK specific groups without anyone
> yelling "Like, d00d, use PHP man!"

As one of the respondents I maintain that this group has a superb
signal-to-noise ratio and gives correct answers to reasonable questions
almost instantly ;-)


> I am also hoping to get to attend a Python event or 2 and thought I
> would like to know who's who before pitching up.
>
> Are there any event's 'ooop north'?
John Pinner has been hinting at organising a proper community
conference in Birmingham next autumn, which is probably half way for
some peoples' definitions of North.   John, is this still looking likely?


- Andy Robinson
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Michael Foord-5
In reply to this post by Michael Foord
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
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-uk
>
>
>

_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Simon Faulkner
In reply to this post by Tim Golden
> My own experience is that the main Python group is
> remarkably mature and uninfested with script-kiddies
> and so on. I wouldn't say there are never spats, but
> even those tend to be remarkably controlled, and often
> informative (in a heated kind of way). By all means
> stick to the UK list, but you might want to dip your
> toe in the waters of the main list just to see...

You are correct of course.  In fact, I usually get the correct answer to
my programming problems within minutes.

> There was talk of one recently, can't remember
> where, in addition to the usual Oxford one.
> (Which I've never managed to get to!)
> Does this mean you're based up there (says the
> Londoner). 'Cos we seem to be going through
> a phase of regular meetups in London at the
> moment, ie getting together in a pub along
> with various other interested parties. You
> might want to come along... or organise a
> northern equivalent!

I'm in staffordshire.  I might take a trip to Oxford next year :-)
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Tim Golden
In reply to this post by Simon Faulkner
[Simon Faulkner]
|
| [re my suggestion to use c.l.py]
|
| You are correct of course.  In fact, I usually get the
| correct answer to my programming problems within minutes.

Ah yes. Now I take the trouble to Google a bit, you
obviously *have* used the main list. Sorry, I took
you for someone who'd mistakenly thought that python-uk
was the English-speaking version of the main Python list
(or something).

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Simon Faulkner
In reply to this post by Andy Robinson-2
> As one of the respondents I maintain that this group has a superb
> signal-to-noise ratio and gives correct answers to reasonable questions
> almost instantly ;-)

You are correct.  One of the best things about Python :-)

> John Pinner has been hinting at organising a proper community
> conference in Birmingham next autumn, which is probably half way for
> some peoples' definitions of North.   John, is this still looking likely?

Sounds like fun...
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Chris Withers
In reply to this post by Simon Faulkner
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
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Chris Withers
In reply to this post by Simon Faulkner
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
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Simon Faulkner
>>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 :-(
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Simon Faulkner
In reply to this post by Chris Withers
> 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...
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Chris Withers
In reply to this post by Simon Faulkner
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

_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Chris Withers
In reply to this post by Simon Faulkner
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

_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk
Reply | Threaded
Open this post in threaded view
|

Re: Web Development with Python

Andy Robinson-2
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
_______________________________________________
python-uk mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-uk