Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django, Turbo Gears, Web2Py, which is better for what?

I got a project in mind that makes it worth to finally take the plunge into programming.

After reading a lot of stuff, here and elsewhere, I'm set on making Python the one I learn for now, over C# or java. What convinced me the most was actually Paul Graham's excursions on programming languages and Lisp, though Arc is in the experimental stage, which wouldn't help me do this web app right now.

As for web app fast, I've checked out Django, Turbo Gears and Py2Web. In spite of spending a lot of time reading, I still have no clue which one I should use.

1) Django certainly has the nicest online presence, and a nicely done onsite tutorial, they sure know how to show off their thing.

2) Web2Py attracted me with its no-install-needed and the claim of making Django look complicated. But when you dig around on their website, you quickly find content that hasn't been updated in years with broken external links... There's ghosts on that website that make someone not intimately familiar with the project worry if it might be flatlining.

3) Turbo Gears ...I guess its modular too. People who wrote about it loved it... I couldn't find anything specific that might make it special over Django.

I haven't decided on an IDE yet, though I read all the answers to the Intellisense code completion post here. Showing extra code snippets would be cool too for noobs like me, but I suppose I should choose my web frame work first and then pick an editor that will work well with it.

Since probably no framework is hands down the best at everything, I will give some specifics on the app I want to build:

It will use MySQL, it needs register/sign-in, and there will be a load of simple math operations on data from input and SQL queries. I've completed a functional prototype in Excel, so I know exactly what I want to build, which I hope will help me overcome my noobness. I'll be a small app, nothing big.

And I don't want to see any HTML while building it ;-)

PS: thanks to the people running Stackoverflow, found this place just at the right moment too!

like image 316
Tsais Avatar asked Sep 05 '10 12:09

Tsais


3 Answers

You should look at the web2py online documentation (http://web2py.com/book). It comes with a Role Based Access Control (the most general access control mechanism) and it is very granular, you can grant access for specific operation on specific records. It comes with a web based IDE but you can use WingIDE, Eclipse and PyCharm too. It comes with helper system that allows you to generate HTML without using HTML. Here is an example of a complete app that requires users to register/login/post messages:

db.define_table('message',Field('body'),Field('author',db.auth_user))
@auth.requires_login()
def index():
    db.message.author.default=auth.user.id
    db.message.author.writable=False
    return dict(form=crud.create(db.message),
                messages=db(db.message.id>0).select())

The web2py project is very active as you can see from the list of changes http://code.google.com/p/web2py/source/list

If you have web2py related questions I strongly suggest you join the web2py mailing list: http://groups.google.com/group/web2py/topics

We are very active and your questions will be answered very quickly.

like image 86
mdipierro Avatar answered Sep 25 '22 15:09

mdipierro


I have to say as not particularly skilled developer, the speed at which I have been able to create using web2py has blown my mind. In large part due to the amazing community and the core value Massimo has of making the framework accessible.

When I started I had written 0 lines of code in Python Never heard of web2py

I've been at it seriously for about a month and have progressed (in my usual fashion) from asking questions that no one could answer (because they didn't make any sense) to coding for hours at a time without picking up a book or asking a question.

I'm really impressed.

like image 21
Lorin Rivers Avatar answered Sep 24 '22 15:09

Lorin Rivers


I've had positive experiences with Django.

  • Built-In Authentication and easy to use extensions for registration
  • Very good documentation
  • You probable write your HTML templates mostly in base.html, then just use template inheritance (Note: You'll need to write at least a little bit of HTML)
  • In contrast to Turbogears, Django is more 'out-of-the-box'
  • I don't have any experience with web2py, but from my impression, it tries to do a little to much 'out-of-the-box'
like image 25
miku Avatar answered Sep 24 '22 15:09

miku