Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django from the point of view of Zend Framework developer

I mostly work in ZF. However, for next project I want to try Django. Does anyone have experience of moving from ZF to Django?

What are the most striking differences or difficulties in the switch from ZF to Django (except programming language)? Was it easy to change or not?

like image 240
user594791 Avatar asked Jul 06 '11 08:07

user594791


People also ask

Can Django replace PHP?

Django is a great and popular framework with support for advanced technologies like machine learning. On the other hand, PHP is an easy-to-learned programming language that can create web applications. This article included a detailed comparison of both technologies. You can choose according to the project requirement.

Which is better PHP or Django?

Both PHP and Django provide a backend to the world's biggest companies. Product-based companies like Google, Facebook, Instagram prefer Django. Websites like Wikipedia, Tumblr, Yahoo run PHP in the backend. So, both of these technologies have proven themselves, although, Django is highly scalable in comparison to PHP.

Will Django come under Python or PHP?

Django is a high-level Python framework which provides support for web applications. PHP is a server-side scripting language. 3.


1 Answers

I'm currently porting an application written in ZF to Django. In my experience the main difference between the two frameworks is the coupling between their internal components. ZF takes it's concept of loose coupling to the extreme where you have to figure out the best way to fit them together. Django on the other hand provides a seamless process of developing a web application where each of its components fit together in a defined order. For example when you define a model in Django ORM it provides so much functionality to the other components of the framework such as views, templates, forms etc., that it's hard to imagine using them without the models. In some sense tight coupling is one of Djangos strengths in making web development less cumbersome and more efficient. But this sometimes makes Django less flexible.

Also after using ZFs db abstraction layer(Which for some queries produces very unmaintainable code) you'll find Djangos ORM a heaven sent :). Although some ORM solutions exist for PHP(or ZF), Djangos ORM is way better.

Another big difference is Djangos URL confs, which makes it extremely easy and flexible to provide cruft free, user friendly(SE friendly) URLs. With Django, URLs are an integral part of the application not some http sever configuration you get stuck with.

Another very important part of the comparison is the documentation. Djangos documentation is extremely well written and maintained. All though ZFs documentation is good enough, I found it very hard to search through for something.

I think you've taken a good decision to tryout Django. Hope it turns out to be the right solution for you.

like image 163
vim Avatar answered Oct 25 '22 16:10

vim