views:

682

answers:

8

Possible Duplicates:
Recommendation for straight-forward python frameworks
Python Webframework Confusion

I am starting two projects for my company that will eventually become linked together. The first is an in-house reservations and management system for arranging exhibitions and conferences for delegates and the second a website which will allow delegates to access information regarding the conferences and their own 'accounts' and itineraries.

I have been programming in Python for a while in my company but almost solely in a procedural style; my knowledge of object-orientated programming is limited (previously my work was done in C and Lisp-procedural). Most of the Python frameworks seem to dive straight into objected oriented structures straight away which is leaps and bounds over the level I am learning from courses and books.

What I am looking for is a Python framework that is quick to grasp (as pythonic and procedural as possible), uses standard HTML style templating (my HTML/CSS skills are extensive) and will give me reasonably simple interfacing to a Postgresql database and a MySQL database (both required unfortunately). The upper-management have insisted that the main application be hosted on in-house servers. The in-house system does not have to be super fast as it will be restricted to less than 70 staff users. The website will have to be able to cope with around 1000 users an hour.

Which Python frameworks would you recommend and why? Please be as specific as possible. If you would like to leave information about frameworks being suitable for other projects as well that is fine as it will help others in the future.

Many, many thanks for your recommendations.


Great responses thank you. Having looked through the home pages of many of the current framework projects I've decided to go for two frameworks. Django is probably going to be the shortest learning curve to getting the in-house system running. Someone on a mailing list has already indicating that I can probably create a small python app which will grab the figures I need from the in-house database and pass it onto the MySQL database automatically. As the financial integration won't take place for another 5 months I can also hang on for the multiple database support in Django.

As for the website, I'm going for Pylons. This will give me experience with both frameworks and Pylons doesn't seem so difficult to scale up, possibly because it looks like there is more flexible interfacing with independent components.

At some stage I will give Juno and web.py a whirl but probably on my own website. Please do not stop adding comments as it will be helpful in the future to myself and many others embarking on their first web projects with Python. Thank you everyone.

A: 

django is your friend

erenon
Can Django deal with both databases? The main information storage would be Postgresql but the financial accounts software uses MySQL and I have to put figures into that as well.
adam.ec
It should handle both, since it uses SqlAlchemy as it's database interface. It's just a matter of creating a connection for each database in a variables, and handing off the appropiate variable to your business logic code.
DoxaLogos
This is not true. Django uses its own database interface. Pylons uses SqlAlchemy. In addition, Django can't currently cope with two databases at once, although it is equally at home with MySQL or Postgres.
Daniel Roseman
I stand corrected. Must have gotten confused. Thanks.There is work being to to replace Django's ORM with SqlAlchemy.
DoxaLogos
+6  A: 

As frameworks/CMSs go, my advice is usually to just pick a popular one and learn it. You're not describing anything that any popular framework can't do, and they all have their strengths and weaknesses.

The two most popular Python frameworks are probably Django and Pylons, with Django definitely being the framework of the moment.

For VERY small applications, usually just demos, and usually if persistence is not necessary, I also like to use cherrypy/mako.

Triptych
Would a CMS in preference to a framework perform this function? If so, does anyone know of the skill level required for Plone?
adam.ec
+1 for Django. Its use of objects are usually just for data models, all views are functions.
Soviut
+1 they all do what you want. Take the most famous one, better safe than sorry.
e-satis
+1  A: 

I played around with Django a while back and as Python web frameworks go (there don't seem to be too many of them) it seemed pretty mature. Here is an overview of the framwork.

Conrad
+1  A: 

I don't think a scaling issue will be a problem regardless of which one you pick... They are all scaled about the same way... atleast the first million users/month.

Both of them really give you features will make your life much much easier. In both, your fear of not knowing OO programming shouldn't be a big deal, as your data is an object and you are working off of each.

As for my recommendation, I personally use Django for many of my projects... The ORM is, in my opinion, incredible, and the automatic administrative area is incredible at saving time.

phillc
A: 

A framework I liked was Juno. I think you would learn it quickly. It's pretty minimal and it's easy to use ( and pretty procedural I might add ).

Geo
A: 

Web.py is another option. I can't imagine there's a simpler framework out there. The tutorial explains almost everything you need to know in a single web page.

Daniel Straight
A: 

I'm currently in progress on my 3rd project using Pylons. Before starting it I looked into Django because, as stated before, it seems to be the python framework of the moment. Although some aspects of it are nice, I found I much prefered Pylons. I come from a C background as well and the flow and style of it are not too hard to grasp. The best part about it is how easily other python packages integrate with it. SQLAlchemy is by far my favorite ORM toolkit and it deals with Postgresql and MySQL easily. Also, I've started using repoze instead of Authkit and it seems much more polished. The Pylon docs are getting much better and the community has been really helpful to me. I'd highly recommend it.

dwelch
A: 

I'm having difficulty seeing how you can program in Python without touching objects...

In any case, you simply won't be able to avoid objects when dealing with databases. This is why all the major frameworks use what's known as an ORM - an object-relational mapper, that is something which converts data between the relational format used in a database, and the object-oriented format used in Python code.

Django uses its own ORM, but Pylons uses the third-party SqlAlchemy library. I'm usually a supporter of Django, but in this case you will probably find Pylons is your best bet as Django can't currently deal with more than one database at a time, although this is being worked on this summer.

On the other hand, if you can limit yourself to just one database somehow, you may find that Django's built-in admin application meets most of your requirements, since it appears you just need an interface for internal users to manage data. Django more or less does this out of the box, whereas most other frameworks will need quite a bit of configuration and template writing.

Daniel Roseman