10 ms·
Not to conflate a framework and a language, but there’s something about Django that makes me feel like I’m writing PHP. What is this effect?
by mrcwinn 1y ago
Not to conflate a framework and a language, but there’s something about Django that makes me feel like I’m writing PHP. What is this effect?
- n3storm 1y agoLaravel keeps copying Django (I mean it in a good way)
- mgkimsal 1y agoWhat's been copied? I see some overlap/homage to rails and some .net, but not django.
- dsego 1y agoIt should copy the query builder, in many ways Laravel is nicer, but Django's query builder is way more powerful with fewer lines of code.
- codegeek 1y agoI think Laravel copied/inspired heavily from Ruby on Rails initially.
- j4mie 1y agoLaravel’s ORM was originally inspired by my now-long-dead PHP projects Idiorm and Paris: https://laravelpodcast.com/episodes/c7807d42/transcript https://laravelpodcast.com/episodes/c7807d42/transcript (Search for “Paris” to find the relevant section) https://github.com/j4mie/idiorm https://github.com/j4mie/idiorm https://github.com/j4mie/paris https://github.com/j4mie/paris Idiorm was started in early 2010 while I was still writing PHP professionally. I’d heard about Django from a talk @simonw gave at the FlashBrighton meet-up group in 2009 and immediately fell in love. Idiorm and Paris, although not direct attempts to duplicate Django’s ORM, came from frustration that such an elegant ORM and query builder didn’t exist in the PHP world. So in a roundabout way, Laravel’s ORM was absolutely inspired by Django. As a side note, I’m still doing Django 16 years later and love it more than ever.
- n3storm 1y agoI do love Django too! and my developtment with more users (not most deployed) is running on Django :)
- TiredOfLife 1y agoLaravel borrowed much from Rails, Django and others. But unlike them actually moved forward.
- octo888 1y ago> But unlike them actually moved forward. Right. I love Python and Django but the "batteries included" claim seems like an anachronism. Job queues, WebSockets/SSE, setter/modern form rendering, API framework, components, comprehensive CLI, frontend support etc are what the competition have better integrates and/or first party.
- n3storm 1y agoRight now that is my biggest pet peeve with Django, in the marketing area is a bit outdated and boring. What was about the Django Unicorn logo?
- ethan_smith 1y agoIt's likely the template-centric architecture with its own template language and the monolithic approach to web development - both Django and traditional PHP frameworks like Laravel share this pattern of tightly coupling views with server-side rendering.
- simonw 1y agoWhen Adrian and I first designed Django we were PHP developers switching to Python, so quite a few Django pieces were inspired by PHP. Django's request.GET and request.POST were directly influenced by $_GET and $_POST. Django's template language included ideas from the Smarty PHP template language.
- nojs 1y agoThis is surprising because the template language in particular feels so anti-PHP, it’s highly opinionated about not mixing code in with the template. I often wish it supported arbitrary Python. Anyway, thank you Simon :)
- simonw 1y agoYeah, the template language was strongly influenced by NOT wanting to allow arbitrary logic like PHP does. I was already a fan of Smarty - https://www.smarty.net/ https://www.smarty.net/ - which did a great job of separating out presentation logic in PHP. I've been using Jinja for my own projects for a few years because I wanted more expressive Python code in my templates! I think we didn't quite get the balance right for that in Django.
- robertlagrant 1y agoI think a great combo would've been Django's features, packaging and most importantly documentation, but with SQLAlchemy and Jinja2 technologies underneath.
- frankwiles 1y agoThat would have been hard since both of those projects came out after Django, but just an FYI Jinja2 templates are supported and nothing stops you from using SQLAlchemy. Granted you lose a lot of the tight intergration that makes Django great to use.
- 1y ago