I am trying to choose between django and yii for scalable, maintainable enterprise grade web-app with a database (preferably mysql) backend. The app is mainly focused with data entry but with custom workflows (beyond your basic autogenerated crud forms ) and custom reports. I have a CS background, familiar with MVC, programming background in c++, C#. 8 years ago built a similar app using php, mysql, perl/cgi and remember it being painful (doing everything from scratch with steep learning curve). Need to learn either python or php syntax again but I pick up languages fairly quickly. Read extensively online about django vs yii. Cannot go the .net mvc route due to need for open source. Dabbled in RoR , loved the language but i am not very comfortable with the magic that happens yet, especially for a production grade app. May be in the future. So back to Django vs yii -
Decision factors are:
1) easier learning curve
2)better suited framework for specific tasks that I would need - heavy db manipulations, custom UI flow (nothing too gfx intensive, just regular form elements but where i need to manipulate data over multiple tables via joins etc)
3)no nasty surprises with db connects (read but not fully understood all the gotchas with django orm and mysql).
4) something where I am not fighting the framework/language for basic things
5) scalable and fast run time (i know lot depends on how one architect the solution)
Please advice. Looking for help from someone familiar with having worked in both frameworks. thanks a lot
I know this is old but I feel like I can add to this, having used both frameworks.
Yii is a solid, fast framework. It isn't quite as secure out of the box as Django due to certain things (cross-site request forgery protection, for example) not being enabled or enforced by default. For me the single biggest advantage was the built-in code generator, because once you figure it out and start using it, it basically spits out a full-featured CRUD application in minutes.
Django is my framework of choice, because Python is Django's single biggest advantage. Not busting on PHP, I actually really like the language, but Python's clean object-oriented-ness (that a word?), class inheritance, etc. really shines with a framework like Django. There is no built-in code generator in Django, which was a deliberate choice by the developers. That is both a strength and a weakness. Yii's code generator can become a bit of a crutch if you're really trying to learn the framework, but with Django, once you learn how it works, you can go in and change anything, because you built it yourself, and it forces you to learn the framework well. With Yii, when you have your generated code and have to do a customization, THEN you may quickly begin fighting the framework.
Django's ORM is highly flexible, I'm a SQL guy myself and I think I've used raw SQL in my applications exactly once. Yii's is pretty good but I give Django a leg up in this regard as well, and Django's is extremely well documented.
Installation of Yii is slightly easier than Django, in my experience. Django takes a bit more work to get up and running. Django's tutorial is much, much stronger than that of Yii, at least it was when I started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With