4 ms·
Why would you go with PHP+whateverframework instead of Ruby on Rails or Django? I haven't touched PHP since 5th version and I'm kind of sceptical it can offer
by konart 3y ago
Why would you go with PHP+whateverframework instead of Ruby on Rails or Django?
I haven't touched PHP since 5th version and I'm kind of sceptical it can offer anything RoR can't.
- pkphilip 3y agoPHP 8 is a vast improvement over PHP 5. Also, the frameworks have become much better - I especially love the Yii framework as well as the Codeigniter framework if you are looking at a Rails replacement.
- konart 3y agoI'm a Go dev these days and rather looking into TS and Rust. I was just curious to be honest. With RoR being what it is PHP frameworks has to offer something on the same level (at least) to be of any interest (as a I see it). Not to mention ecosystem\packages\gems\etc.
- pkphilip 3y agoIt is ridiculously easy to setup a full CRUD environment in frameworks such as Yii. It is as simple and selecting some options on a screen and then clicking on a button. The example below is from 7 years ago! https://www.youtube.com/watch?v=Xi0gH2izUy0 https://www.youtube.com/watch?v=Xi0gH2izUy0
- nologic01 3y agoI don't know why you are being downvoted, this is a very legitimate question. These server-side frameworks are all alive and kicking and very competitive. When some other smaller ecosystem comes up with a good idea (like elixir/phoenix) there is a rush to replicate which happens rather fast. I think in the end the competition will lead to specialization. Python will almost certainly capitalize on its data science / ML links but its not clear (to me at least) how php and ruby will differentiate themselves.
- cutler 3y agoRails console, metaprogramming, elegant blocks, procs & lambdas, Turbo/Hotwire. Concise Ruby language vs PHP framework code with hideous inlined fully-qualified method paths.
- mickael-kerjean 3y agoUse the right tool for the right job. I always use plain PHP for all those things I want to keep running forever without having to spend time and brain space to maintain. You can't beat putting a file on a LAMP server and forget it's running. I have tons of public endpoint that do all sort of stuff , aren't core to my business and don't want to deal with the operation hassle that would come to keep such framework working and running in the long run. Just a few examples of such PHP script: 1. an endpoint that is being called by my CI to send messages on IRC and telegram when a new build is ready 2. the analytics bit of my project so I know who does what without relying on google analytics but by storing all that stuff in a mysql db. It's under 25 lines of PHP code and has worked a lot better for me than any analytics tools I've tried: https://gist.githubusercontent.com/mickael-kerjean/289d3d0be8fab2f90e2ff541bc3415a6/raw/8e31ac2a72e22c7c9def201b804a7021b8fd925a/analytics.php https://gist.githubusercontent.com/mickael-kerjean/289d3d0be... 3. the target of the contact me form of my project 4. all the webhooks and other simple marketing automation stuff I need to process one way or another 5. all sort of online tools relevant to my niche to boost the SEO side of my OSS project 6. my status page which is an array of url I look after that is being curl around 7. crud cloud instance of my OSS project and many many more examples, got about a hundred random stuff running from a single cheapo VPS I don't have to maintain.
- konart 3y agoSounds like a scripted and slower (not trying to diminish) version of Go.
- tredre3 3y agoBut when he wants to add a feature he doesn't have to create a new microservice and a systemd file and a watchdog and setup the reverse proxy, all things needed for a go endpoint. He just drops a PHP file in a folder and be done with it, it just works.
- konart 3y agoYou don't have to create a new (micro-)service, you can just add new functions to an existing one. > it just works. Are you trying to tell me that modern PHP is so cool it does not require LAMP or whatever? I highly doubt it. You still need and use all the same stack, except you don't have to install thigs separately I guess.