25 ms·
Laravel has something like this called Livewire. It's excellent. Laravel is so much better than Django, but I just can't go back to PHP at this point. https:/
by leetharris 2y ago
Laravel has something like this called Livewire. It's excellent.
Laravel is so much better than Django, but I just can't go back to PHP at this point.
https://livewire.laravel.com/ https://livewire.laravel.com/
- pier25 2y ago> I just can't go back to PHP at this point Same. During 2024 I evaluated multiple backend platforms/frameworks to get away from Node. Laravel is great and modern PHP (the language) is also surprisingly good but betting on PHP feels like betting on coal and the steam engine. The runtime and execution model are extremely outdated and resource hungry. There are some efforts like FrankenPHP and Swole that package a PHP app to have a persistent execution model. But IMO unless PHP officially adopts this model this will always feel like a hack to me.
- rob 2y agoWhat did you end up going with if not PHP/Laravel?
- pier25 2y agoDotnet for backend and SvelteKit for frontend.
- cjohnson318 2y agoI'm not sure why this has been downvoted so much, this guy states something that might upset some people, but then goes on to provide a pretty sober list pros and cons. This is the kind of content that we want to encourage on HN.
- gjsman-1000 2y agoIt’s downvoted because even if PHP has hacky behavior; he’s running with the assumption other frameworks don’t have their own hacky behavior, or other frameworks are worse. This is not necessarily warranted. Modern PHP is faster than Ruby in many benchmarks; and Rails is still running GitHub and Shopify. Square uses Laravel in a backend serving 100M+ requests per day, with no plans to rewrite. To compare it to a Steam engine and Coal; that’s unfair stereotyping. On that note, JavaScript’s amount of churn could be an entire discussion by itself. I’ll take some quirky behavior that just keeps working over mindless churn any day.
- morbicer 2y agoThe job market for php devs is also weird. Very few talented people. Because php jobs on average pay the worst, people who are motivated and smart often learn another language and abandon php. There are some very practical oriented and clever people willing to do php but you have to look very hard.
- joshlemer 2y agoSounds like a great market for motivated, practically minded devs then right?
- lawn 2y agoAnd Phoenix/Elixir has LiveView, also excellent.
- adamrt 2y agoI've heard people complain about Django many time on HN. I started using it back in the 0.96 version, so maybe its just a familiarity thing. But I built 3 large successful applications in it in that time. I loved it. I don't use it regularly anymore since I mostly moved away from webdev, but I recently came back into contact with my largest project I build in 2018/2019 and its been running perfect this whole time and was a pleasure to dive back into. Django just felt logically organized, documentation was on point, core was very readable (at least then). I always just felt so productive in it. I know everyone has different opinions, experiences and products they are building, but I'm always surprised with the negative comments. I definitely prefer SSR with its reasonable though, so maybe thats part of it.
- oooyay 2y agoMost of the complaints I've read about Django on HN have to do with ASGI support - which Django added. They're valid but outdated complaints.
- airstrike 2y agoASGI support for Django landed in 2019. Those comments are very outdated https://docs.djangoproject.com/en/5.1/releases/3.0/#asgi-support https://docs.djangoproject.com/en/5.1/releases/3.0/#asgi-sup...
- black3r 2y agotbf it was borderline unusable until they added async DB query support in 4.1 (2022) - before that you had to wrap every DB query with sync_to_async, async_to_sync and it generated too much boilerplate code..., and even in 4.1 the DB queries themselves were still sync/blocking, not truly async because at that point they didn't yet rewrite their database "backends" to use async querying, and I believe that as of now the Django's DB engine still doesn't support natively async DB queries/cursors/transactions/... Also, lots of the "batteries included" into Django don't have async interfaces yet.., for example the default auth/permission system will get async functions like acreate_user, aauthenticate, ahas_perm only in 5.2 which is expected in April 2025, so as of now these still have to be wrapped in sync_to_async wrappers to work...
- nop_slide 2y agoI thought the same. I evaluated the "big 3" (Laravel, Django, Rails) last year and decided to go all in on Rails for solo side web projects. Was really wanting to like Django since I'm a python dev for my day job, but it didn't have nearly the amount of DX and tools baked in as Laravel/Rails. Rails has been super fun, I hadn't touched it in 10 years and the additions that versions 7/8 have brought are awesome.
- 7bit 2y agoI tried Latavel, but there were some points that made me want to drop it very fast. I work on Windows and I chose a PHP variant (don't remember, maybe one that supports threads or async) that did not work on Windows very well. Starting up a Latavel server took minutes. Took me hours to finally find that the PHP binary itself was the root cause. It should not be that way. Then installing Compose on Windows was horrible. I believe I had to install PHP and compose in C:\php or it just would not work. The compose "installer" did a bunch of stuff to my Windows which I did not want. Installing it manually was a pain in the ass. All in all, the experience was exactly the same as in the 2000's (horrible). After I setup my first Latavel project and had some question, it was really difficult to get answers. The docs are really good, but also fragmented as hell with all the approaches one could take to rendering content, depending on what you choose and how you approach it. The forums - although big - seemed dead when I stated my question. I don't know man, my experience with Django is so much better.
- graemep 2y agoYou are not likely to deploy it to Windows in production, so develop on Windows? Does WSL not solve this problem? Or a VM of any sort?
- 7bit 2y agoI could solve these issues with the suggestions you made, but why? I can develop stuff in many languages directly in Windows just fine, and I frankly am not willing to jump through hoops so I can do the same stuff with PHP -- that I can conveniently with Python, JS, dotnet, Java, Elixir, Rust, C/C++ and many other languages. I never found anything so complex and buggy as PHP.
- graemep 2y agoCertainly if you do not like PHP. However, if you wanted to use it there is no real reason not to. My usage of PHP has been using software written by other people but customising - and there is a lot of useful stiff written in PHP. I prefer Python if doing something from scratch, but I would rather write a small amount of PHP to add a bit of functionality rather than write 10× the amount of Python because I need to write everything from scratch.