4 ms·
Fat-Free might be your best bet if you really want to go with a framework, but another possibility is using libraries that will do what you want rather than a f
by chipotle_coyote 4y ago
Fat-Free might be your best bet if you really want to go with a framework, but another possibility is using libraries that will do what you want rather than a framework, e.g.:
Routing - FastRoute
Light DB abstraction - if PDO alone can't cut it, maybe Doctrine DBAL (without the ORM)
Templating - rolling your own is pretty easy if you feel you have the discipline not to stuff business logic in there
Part of me appreciates how PHP is being driven forward by Laravel and friends; another part of me wonders if PHP has become a cargo cult version of Java to the point where many frameworks, and even libraries, are tremendously over-engineered.
- nobleach 4y agoI haven't used PHP in a lot of years. I just took over a team that uses it so I thought, "let's play with it a bit". After looking at Symfony (and not hating it) I thought, "this looks so much like Java+Perl (with some C++ thrown in) why not just write Java/Kotlin SpringBoot at this point??"
- wwweston 4y agoThese things stand out to me: (1) Dead-simple deployment story across a wide variety of needs. You want to throw your app's filetree in a directory on $10/mo hosting via SFTP? Easy peasy. You want turnkey autoscaling cloud deployments you don't have to build infra for? People will sell it to you. (2) Beginner/junior friendly culture. Really, everywhere along the learning curve. Both have long been PHP strengths. #2 was also a weakness for a long long time, that's how a lot of bad practices and blind-leading-the-blind happened. In the last 10 years that's been very much changed. Java has also changed, of course, and selling people easy deployment has become industry-wide bread and butter, so you're probably correct that some gaps have narrowed, but AFAICT they haven't gone away.
- nobleach 4y agoYes, with Java, the advent of the "fat-jar"/"uber-jar" deployments with an embedded server is far different than the massive deployable war to an application server stuff from yesteryear. And I can see that. PHP definitely allows one to "ladder up" a whole lot easier than some other languages. Once we get into these large "batteries included" frameworks like Symfony and to a little lesser extent Laravel, it almost seems like that simplicity disappears.