4 ms·
I worked the opposite way round. I built my own custom PHP frameworks for each project for 15(ish) years until Laravel and then I was finally convinced it was b
by jv22222 6y ago
I worked the opposite way round. I built my own custom PHP frameworks for each project for 15(ish) years until Laravel and then I was finally convinced it was better to use someone else’s framework than mine.
I liked doing it this way round because when I did Finally use a framework I had a pretty good idea of how it was all put together and also really appreciated the elegance and design choices they had made.
I’m not sure I would have appreciated it so much if I had started out with the framework and not learned all the things it takes to build one under the hood.
- todotask 6y agoAbout the same as mine, I have started writing PHP code as my first project a decade ago without any web framework and not even a PHP proficient. Until Laravel first appeared in the PHP world when MVC approach was easy to pick up for a small site. I'm no longer find MVC approach sufficient for all projects and move on to Javascript, Swift, etc, finally settled on Go just before it turns 10th. I'm really appreciate I could build without web framework today.
- motogpjimbo 6y agoLaravel isn't an MVC framework. I often see people make this point and it puzzles me because even the creator of Laravel argues that it's not MVC. Laravel has a "Model" abstraction, but its models are Active Record objects, i.e. database row proxies. The M in MVC is not supposed to be in 1:1 correspondence with your database tables. Laravel's Model class is poorly named. The closest Laravel would come to being MVC would be by adding your business logic to service classes and adding them to Laravel's service container - an approach that the Laravel documentation mentions as a possibility but doesn't make a big deal of. Indeed, the documentation largely encourages the use of controllers to contain business logic.
- PaulDavisThe1st 6y agoSounds as if you prefer the Microsoft take on MVC, where they introduced the "UI Model" as an additional component. (Real) Model -> fetch -> UI Model -> build -> View ^ | v build/modify ^ | v Controller The UI Model serves as a simplified version of the "real" model that can also use the data structures/objects used by the technology used in the View. In "original" MVC (outside of the use of this term in webdev), the "M" in MVC absolutely did refer to a 1:1 correspondence with the data at the core of the application. This works too, but when using various UI toolkits, adding the UI Model can make things feel a bit more natural.
- lukaszkups 6y agoSame for me, but in my case it was JavaScript + until I've learned about Vue.js (v2+)
- heavenlyblue 6y agoFor the last 15 years PHP didn’t have a framework that wasn’t a pile of dysfunctional code. I can totally understand why you never considered a switch.
- tasuki 6y agoWhat about Symfony? PHP is a terrible language but Symfony is the most pleasant framework I've ever used. I've been out of PHP for some years. How is Laravel better than Symfony?
- jv22222 6y agoAFAIK Laravel is built on Symphony components. Also, PHP is probably not a terrible language or that's subjective at a minimum :)