views:

652

answers:

12

I am contemplating between three frameworks: Django, CakePHP and Zend. The project will include social aspect (members), will have a cart/checkout, lots of different forms and very heavy database usage. I would like to write most of my sql by myself but have only basic knowledge of web development. Both PHP and Python will be new languages to learn, I have programming experience with mostly C from the past.

What would you recommend for someone who starts from scratch and needs to learn a language/framework from scratch? I know both PHP and Python are strong languages for the web and Python is very strong for scripting which I will need as well (back end). Which framework will meet the needs of a large website (not just a simple blog) that might require caching in the future (memcached etc) and heavy db usage (mysql) so performance is important. I am not sure what will be an overhead of a framework. I will also need a db search functionality (Solr?)

Thanks for your help and advice!

+19  A: 

Django! It's great. Look up Django vs Rails.

"Which framework will meet the needs of a large website (not just a simple blog) that might require caching in the future (memcached etc) and heavy db usage (mysql) so performance is important."

Yes, Django.

Plus...since you are new, Django will teach you how to separate your layers of logic. Database, processing, presentation, etc.

TIMEX
A: 

Definitely Django.

grigy
Care to explain why?
rick
1. It's in Python, which is a solid OO language.2. I like the principles behind the design of Django.
grigy
+4  A: 

I suppose either Python and/or PHP can be a good choice in your case.

I'm more a PHP guy myself, and like Zend Framework -- both PHP and ZF would answer your needs ; but that's something other guys will say for other languages/framework they like... And it'll be true for them too ^^

  • meet the needs of a large website (not just a simple blog) : PHP+ZF = OK
  • caching in the future (memcached etc) : PHP+ZF = OK
  • heavy db usage (mysql) so performance is important : PHP+ZF = OK -- depending on how you design your application, models, queries, ...


At the end of the days, both languages/frameworks are good choice -- as it'll end as a matter of what one prefer, you are the one who should choose, really ; not us.

Pascal MARTIN
A: 

I think that you need make more attention not to a framework, but to optimization and caching. If you will handle this, your application would be fast with any of these frameworks.

Personally I prefer Zend Framework, but this is only my opinion, like I prefer Opera over Firefox and etc. :-)

Pawka
+6  A: 

If you have to learn a new language anyway, then go the Python route - its just so learnable.

You might want to consider getting help on a project of this size, if you have never done something similar before: The biggest problem will not be your framework, but your unfamiliarity with the chosen framework and web development in general.

Daren Thomas
+3  A: 

I'd suggest Django as well.

Keep in mind your not going to have to do much raw sql. Thats a bit 2004 for websites. django's orm is excellent, although multi db support might be a killer, there are alternatives.

Looks like someone may have solved your solr needs

http://www.screeley.com/entries/2009/feb/02/django-solr/

michael
A: 

if you want to write your own queries and the app will be db intensive, CakePHP drops out of the boat imo

Nicky De Maeyer
+1  A: 

There is more then one python framework and more then two php frameworks.

In my opinion you should first off decide on the language you want to use and the look at all of the framework options you have.

Most frameworks share the same goals, but try to reach them in different ways. You should should chose the one which seems most natural to you.

When I had to chose python framework, I chose Pylons instead of Django. And as JavaScript framework I use Prototype instead of jQuery. Why? Because I like their coding style and approach better then some other, maybe more popular, framework way of doing things.

Most python frameworks are very modular therefore you will be able to "plug in" any kind of code or modules you want to use. Just make sure you like the framework it self, try them out, you will have to live with it for quite some time =).

Maiku Mori
+2  A: 

What hosting is available to you? A lot of cheaper shared hosting will not be capable of hosting the Python frameworks so you'd be stuck with PHP in that case anyway. But if you have the flexibility to go with Python, I would recommend that instead.

Kylotan
A: 

I would suggest PHP if you are in a hurry because the syntax is "c-like".

Tomáš Fejfar
A: 

I'm currently playing around with Werkzeug, which, coupled with a template engine (e.g. GHRML) and a DB abstraction of one form or another can be whatever you want/need it to be.

But it really depends on what level of abstraction you can work with. If you're going to do a large-scale "normal" website (e.g. community, shopping), Django might be the better choice. If you're just slapping a few pages together, you might as well use pure PHP.

As others have said, it's like asking what's the best programming language -- it depends on your taste and experience, mostly. I've been using plain PHP for years before stumbling over Java Servlets and now finding Python. I use Python now because it gives me less headaches -- but YMMV, so stick with PHP if that's what you like to work with.

Find out what you're trying to do, write it all down and try to organise it. Then check out a few relevant frameworks and see which one suits your thinking best. Just because a framework works for someone, it doesn't necessarily work for you, even you're trying to use it for the same thing.

Alan