Hacker News new | ask | show | jobs
by guitarbill 3355 days ago
I currently work for a large eCommerce site that uses Django/Python. Before that I worked with a large PHP CMS, though not Drupal. Some non-obvious, and practical things that Django does well:

* Dependency management is way easier with Python, so upgrading and deploying is less error prone

* Django scales really well thanks to excellent caching with e.g. Redis. Adding caching to views (pages) is child's play, and super easy to debug/purge.

* Speaking about scaling, writing a REST API or consuming a REST API is much easier in Django (django-rest-framework and requests, respectively)

* The Django ecosystem is great. If you have a problem you want to solve, someone has probably done it already and published a package

* The Drupal middleware is awful compared to Django middleware

* Testing

* The Django admin interface is amazing [0], and at least as good as any off-the-shelf CMS. It does permissions and custom actions. Your sales team needs to upload a CSV file of suppliers? No problem, just add it right in there.

* Debugging. The Django shell and pdb/ipdb are great tools.

Finally, thanks to some non-obvious pitfalls in PHP, you have to take more care when writing PHP to make it secure. Apart from the flame-wars, the only practical issue is when hiring. You need to make sure you hire PHP candidates who know the language inside out. With Django/Python, you can be a bit more lax - there's far fewer non-obvious pitfalls, especially with the templating system and ORM of Django. It also takes devs less time to do a thorough code review. IMO, it's easier to grow a Django team.

[0] https://docs.djangoproject.com/en/dev/ref/contrib/admin/