Skip to content

Instantly share code, notes, and snippets.

@fabsor
Last active April 6, 2023 06:48
Show Gist options
  • Save fabsor/f683ece3ceb256446b978f2c02da0af8 to your computer and use it in GitHub Desktop.
Save fabsor/f683ece3ceb256446b978f2c02da0af8 to your computer and use it in GitHub Desktop.
Stack battle

Stack battle

Feature Django Laravel Winner Comment
Authentication In core In Core Laravel Multiple starter kits available with ready-made templates for login, pw reset etc. Single sign on/two factor auth available.
Authorization In Core In Core Django Django has a built-in permissions system. Laravel has many concepts. Gates, Policies, etc. but requires more code. There's a popular permissions package that adds capabilities to laravel.
Templating system In core In Core Laravel Laravel has the concept of components which is easier to wrap your head around then extending the django templating system.
ORM In core In core Django The django ORM model definition is a lot easier to reason about, and offers automatic migrations. The Laravel query builder is a bit easeier and more SQL-like, but the ORM is really inefficient compared to Django.
Performance Ok Bad Django Laravel requires a lot more work to be performant.
Rest Toolkits DRF JsonApi Django Laravel has better support out of the box, but Django clearly wins when DRF is added. Laravel has the jsonapi package, but it's only for jsonapi.
Admin panel In core Filament TBD The Django admin is a proven piece of software but is sometimes a bit hairy to customize
CMS Wagtail Statamic TBD Wagtail is completely open source, but is it good? Statamic seems interesting but pricing can be steep for small projects
JS integration In core Django-vite Laravel Laravel has first-party support for vite and a clear way of handling js assets. This also supports typescript and many other things aout of the box. Django has nothing.
Full-stack framework Livewire Django-unicorn Laravel Livewire is officially blessed and widely more popular than django-unicorn.
Form system In core Filament TBD Django has a form system that works, but it can be quite tedious to work with whenever you have a more complex form to deal with.
Thumbnails sorl, easy-thumbnail glide Draw Both systems are equal
Hosting fly.io, DigitalOcean, any cloud vendor Anywhere with PHP support, Forge and Vapor are official offerings Laravel PHP is always the easiest to get going anywhere, from cheap hosting to more complex. There are ways of getting a Django app out there, but nothing is as easy as plain old PHP. The laravel corporation also provides options to easily set up highly scalable environments without the hassle.
Testing In core (pyunit) In core (browser testing, phpunit Laravel Factories, Better API testing tools, optional browser testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment