开发者

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜