Live data from Hacker News

Ask Hacker News: What Python web framework should I use?

news.ycombinator.com

31–40 of 41 posts

Re: Ask Hacker News: What Python web framework should I use?

#32

Just as a warning. Its not listed here, but stay away from Zope3/Plone for a while :).

Why, may I ask? I'm contemplating to skip Zope3 to learn Plone. I'm also tinkering with the idea of purchasing Plone 3 book by Martin Aspelli. I heard the book is good and it gives you enough information about Zope3 to learn Plone.

I wrote a lot about it in a blog post this summer.

http://thingsilearned.wordpress.com/2007/08/14/zope3plone-to...

Its a great CMS with a lot of awesome features. Its just incredibly difficult to pick up and work with, especially in its current state.

Re: Ask Hacker News: What Python web framework should I use?

#34
post #8
post #2

django.

what about TurboGears? I like the idea of having a larger unifying framework based on smaller independent projects. Btw, I should add that I'm asking from the perspective of somebody moving towards a Pythonic framework. I've spent the better part of today learning Python, and so far I love it!

I've used TurboGears around 2006 and moved away because it lacked pylons/django/weby like url dispatching, and I found it too hard/impossible to customize the widgets. Also, the main developers droped it in favor of pylons or something else, so, I thought it was pretty much the end of the project. I am suprised that it is still around.

Re: Ask Hacker News: What Python web framework should I use?

#35
post #28
post #2

django.

Could you explain why you would use django over the others? Does pylons have too much magic? I've never used django and am curious if you have used the other frameworks.

I have only used Django, Rails, CakePHP and raw PHP. Django has a superb ORM layer (beats Rails 10-0), where relations are really well implemented, as members of the model. Selects are easy, and can be chained (as filters). In Rails (even 2.0) I had to use find(:all, condition => . That is so not hiding the db layer. Generally, there is much less to none auto-magic. This is a thing I quite disliked in Rails, both as a beginner and beyond. I like to keep most things explicit. I find it baffling that Rails is considered easy to understand. Due to the auro-magic, I found the learning curve pretty steep.

Re: Ask Hacker News: What Python web framework should I use?

#37
mod_python + mako

Edit: I started with Pylons but was simply overwhelmed by the complexity. I checked out but didn't use TurboGears and Django so I don't have to much to say about them. web.py is nice, but it's immature and some things don't seem to work the way they should.

So I rolled my own (if you can call it that) using the db module from web.py along with Mako and mod_python.

Yes before the WSGI zealots freak out let me say that it is NOT a WSGI solution but I could care less. It just works.

Re: Ask Hacker News: What Python web framework should I use?

#38

Earlier quoted context omitted.

I stopped using web.py after I had to correct Aaron when he recommended a 'session' implementation that had a massive gaping security hole. http://groups.google.com/group/webpy/browse_thread/thread/2f... If he couldn't spot that when he posted, I don't trust him to spot any other problems with web.py

For a second I didn't get what the big deal was here. Sure you have to keep your pickled python objects in a secure place on your server. Sure you could have problems if someone could get at those, but they would need to crack your server first and then figure out how your app worked. If they could do that you're hosed anyway... Then it hit me. He was suggesting you give the pickled object back to the client in the s…

> He was suggesting you give the pickled object back to the client in the session cookie and load whatever the client sends later right back into the interpreter. Whee!

I've done that with signed cookies.

Re: Ask Hacker News: What Python web framework should I use?

#39
post #38

Earlier quoted context omitted.

For a second I didn't get what the big deal was here. Sure you have to keep your pickled python objects in a secure place on your server. Sure you could have problems if someone could get at those, but they would need to crack your server first and then figure out how your app worked. If they could do that you're hosed anyway... Then it hit me. He was suggesting you give the pickled object back to the client in the s…

> He was suggesting you give the pickled object back to the client in the session cookie and load whatever the client sends later right back into the interpreter. Whee! I've done that with signed cookies.

There wasn't any encryption involved in his suggestion. :D

Re: Ask Hacker News: What Python web framework should I use?

#40
post #38

Earlier quoted context omitted.

For a second I didn't get what the big deal was here. Sure you have to keep your pickled python objects in a secure place on your server. Sure you could have problems if someone could get at those, but they would need to crack your server first and then figure out how your app worked. If they could do that you're hosed anyway... Then it hit me. He was suggesting you give the pickled object back to the client in the s…

> He was suggesting you give the pickled object back to the client in the session cookie and load whatever the client sends later right back into the interpreter. Whee! I've done that with signed cookies.

I imagine you didn't store any per-session state on the server as well, so I'm curious about what you used to validate the cookie.
Post reply on HN