Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the real world differences between Zend Framework and Django? [closed]

I am a long time PHP user when it comes to web applications and am mostlz comfortable with it. However, I have a one semi-large project whose maintenance / extensibility has reached its end of a life cycle. I was weighing on different PHP frameworks (there were no when the project originated), since it is the way to go for this project, and I came to conclusion the ebst option would be to do it with Zend Framework.

  • Symfony seemed to complicated (I don't like setting up database model as that
  • CakePHP seemed murky
  • Igniter I liked at first, but then it seemed to me it is more like Zend with less features and no Zend behind it
  • Zend I like the system of that I can use only what I like and not being tied into a specific directory structure, and of course there is Zend behind it. Performance is what potentially bothers me

Now, after this little rationale behind choosing Zend, there are several things I see as a deal breaker when choosing a framework.

  • I haven't used ORM in the past because I am more than comfortable writing SQL directly, so I still need to be convinced to use ORM
  • Not too much abstraction going on from the guts
  • Flexible directory structure

As long as this project is going to be written anew, I just as might write it in Python/Django, since I am quite familiar with Python, but not with Django. So, I would like to know if there is someone that worked with both Zend Framework and Django frameworks and if can outline a few key point differences?

I must also say that this project is made as a standard site/admin dual project. That is, it is basically two sites in one. One is for frontend and users, other is for data administration in the backend. I must and will build backend on my own, some scaffolding methods would be cool, but full automatic scaffolding is as good as nothing in this case.

I am still quite not sure how one approaches building basically two applications within a directory structure of, what is supposed to be, one application. Do you just make two separate applications and rely on URL scheme from there on to separate them? www.example.com and all of the /* being one application and www.example.com/admin/* being a second application.

Sorry for the long question(s), but as you can see - everything is pretty much related to one problem - I need to start a project anew, it has already established database+data which I can remodel, but would like to keep that kind of work at minimum.


Ok, thank you everybody - looks like I'll try and implement this stuff with Zend, gives me most flexibility out of the package (I did tests with both), and we'll see how it goes.

like image 714
Keyframe Avatar asked Mar 17 '09 11:03

Keyframe


2 Answers

Well Django is more fullstack framework than Zend. It's more similar to symfony than Zend.

Django can reverse engineer your database into ORM classes. and has a cli tool that help you do stuff ( admin and model generators, project skeleton generation etc.)

Zend is more of a component framework. it has its own MVC and ORM implementation but you need to write that stuff alone. Its approach is to use only stuff that you need without imposing some directory structure.

In your case Django will have some advantages because of its great admin generator module, and Django itself is pretty fast (faster than most PHP frameworks).

I'm personally using symfony with Zend framework for some stuff I need (Mail, OpenID, Lucene search), but have played a bit with Django and I like it.

like image 74
deresh Avatar answered Oct 20 '22 00:10

deresh


Zend doesn't include a real ORM. It provides some helper classes but you are mostly on your own in modelling your database and writing your own SQL queries. So you would have full freedom there. As Deresh says, Zend is modularized so you can pick and choose the parts you want.

Personally I use Zend together with DB_DataObjects from PEAR as by ORM. It can auto-generate your skeleton code. It is a very simple solution for handling simple queries but I can always write custom SQL where necessary.

Regarding separation of the two admin and frontend I would suggest putting them on different domains, e.g.: admin.yoursite.com (backend) and www.yoursite.com (frontend). You can probably work it with having them both on the same URL but it is not really a use-case that is supported by Django or Zend.

like image 30
Niklas Avatar answered Oct 20 '22 00:10

Niklas