Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

As a long time PHP developer, I am now starting to explore the Python world.

I have narrowed the choice of framework down to Django and Pyramid, probably no big surprise there. I have played a bit both both frameworks.

I really like Djangos admin, and the fact that everything is already integrated. My concern with Django, however, is that it appears more difficult to break out of doing things the way that they want you to. For a large complex site, that could be problematic down the road. Is this a valid concern?

What really caught my eye is that the community for Django seems MUCH larger. Let alone the massive number of docs and tutorials for Django (couldnt fine much for Pyramid outside the official docs?). Of biggest concern is the sheer number of apps that have been built specifically for Django: south, tastypie, multi-tenancy, registration, etc. Am I right to assume that these apps are (mostly?) Django specific, and that they cant be used in Pyramid? Where are the Pyramid specific apps? Or, will they interoperate just fine?

share|improve this question
1  
I do not know too much about Python but youtube.com/watch?v=v1gTI4BOPUw did you know this guy? He is talking about Python, Django and scalability :D –  user827992 Jul 12 '12 at 12:21
    
And here's Mozilla's PHP to Django success story. pyvideo.org/video/59/… –  user16764 Jul 13 '12 at 19:45
    
Pity that they started off with one of the worst performing php frameworks. But this is very useful, thanks! –  JonoB Jul 15 '12 at 17:36
add comment

1 Answer

up vote 3 down vote accepted

The short answer is to learn both. It's always good to have a lot of tools in your tool belt.

The long answer, though, is to learn Django first and then add Pyramid in later.

Your first reaction to the breadth of Django documentation and resources available is the right one. As you're picking up python, you'll find more help for building, deploying, and scaling your Django apps than you will your Pyramid apps. You'll learn how to do pythonic web development and how to use the language to efficiently meet your business requirements.

Lots of large applications use django - Instagram and Disqus come to mind first. So you don't have to worry about how complex a django app can be. Here are the dev blogs for both of those companies:

http://instagram-engineering.tumblr.com/

http://code.disqus.com/

Coming from PHP, you'll find a few things about Django that will be more obvious as well. Take, for example, retrieving POSTed form data:

PHP

$foo = $_POST['bar']

Django Python

foo = request.POST['bar']

Pyramid Python

foo = request.params['bar']

Once you've built a few Django apps and shipped a thing or two, then go and learn Pylons or Flask and add SQLAlchemy to your tool belt as well.

share|improve this answer
    
Thank you, makes sense. –  JonoB Jul 12 '12 at 17:54
1  
Do note that that is not the best way to get form data in Django. The usual pattern is to use the POST data to instantiate a Form object and then retrieve data from the Form's cleaned_data dictionary. –  user16764 Jul 13 '12 at 17:15
    
@user16764 This is very true. One should never deal with raw form data directly when the framework of choice has a method of cleaning it - Django's method being the one you described. See the forms documentation for more: Django Forms –  MrOodles Jul 13 '12 at 20:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.