5 ms·
I'm really curious how you see laravel as a shining example of clean code? That thing is the epitome of a framework for frameworks sake. Pretty sure Most of M
by lugg 7y ago
I'm really curious how you see laravel as a shining example of clean code?
That thing is the epitome of a framework for frameworks sake.
Pretty sure Most of Martin's talks begin by complaining about this sort of thing?
- whycombagator 7y ago> That thing is the epitome of a framework for frameworks sake. Go on
- astrange 7y agoAny PHP framework is a case of inner-platform: https://en.wikipedia.org/wiki/Inner-platform_effect https://en.wikipedia.org/wiki/Inner-platform_effect PHP already is the "framework" and every time you load a page it's executing the script from scratch. You're wasting a lot of time loading a framework to handle control flow for your program which doesn't have any control flow in the first place.
- whycombagator 7y agoI'm not a PHP dev, but I've dabbled. And I'm not sure I follow. How is it a framework for frameworks sake? I take that to mean it's pointless/not useful. Whereas I'd say Laravel and it's ecosystem are far more productive and time saving than simply using just PHP. It's the opposite of wasting time. From their github repo[0] Laravel has: - Simple, fast routing engine. - Powerful dependency injection container. - Multiple back-ends for session and cache storage. - Expressive, intuitive database ORM. - Database agnostic schema migrations. - Robust background job processing. - Real-time event broadcasting. Not only is it a robust, pleasant, framework with batteries included but there's also an entire ecosystem/platform of related products that are pretty big time savers: spark[1], forge[2], envoyer[3], and horizon[4]. And, as an aside, the documentation is good and there are some pretty great tutorials too[5] What am I missing? [0] https://github.com/laravel/laravel https://github.com/laravel/laravel [1] https://forge.laravel.com/ https://forge.laravel.com/ [2] https://spark.laravel.com/ https://spark.laravel.com/ [3] https://envoyer.io/ https://envoyer.io/ [4] https://horizon.laravel.com https://horizon.laravel.com [5] https://laracasts.com/ https://laracasts.com/
- astrange 7y agoThese features don't make sense for PHP's execution model, your script is supposed to render one page and then exit. There's nowhere to put background tasks, event handlers, etc. Is it doing something else? I can't imagine turning PHP into an application server, and if you were, I'd suggest getting a different language. It's possible to have request routing if you want to have the same .php file serve every request on your site, but that's totally inner-platform. There's already a thing routing URLs and it's the web server.
- lugg 7y agoI'm not fully on board with all of Roberts views but this point about a framework for frameworks sake is one I agree with. https://youtu.be/o_TH-Y78tt4 https://youtu.be/o_TH-Y78tt4 starting at around 10:30 he gets into what I was getting at. > Whereas I'd say Laravel and it's ecosystem are far more productive and time saving than simply using just PHP. I'm not arguing a time thing. I'm arguing that a framework that forces its architecture onto your domain model is fundamentally broken by design. My domain should drive architecture choices and the framework should let me augment that with well worn libraries and modular patterns. Laravels architecture works for one thing: web sites. And for that, you're better off using WordPress. Laravel is better than older frameworks, like say, code igniter but it still fights you every step of the way if you want to step outside the box.
- whycombagator 7y ago> Laravels architecture works for one thing: web sites. From the github repo: “Laravel is a web application framework with expressive, elegant syntax”
- lugg 7y agoWeb applications are not websites.
- whycombagator 7y agoI want to understand your points more clearly. > Laravels architecture works for one thing: web sites. And for that, you're better off using WordPress. > Laravel is better than older frameworks, like say, code igniter but it still fights you every step of the way if you want to step outside the box. Can you provide actual examples of where it "fights you every step of the way"? > Web applications are not websites. So can I infer that a building a web application with Laravel would be stepping "outside the box"? If so, could you please give examples of how building a web application with Laravel "fights you every step of the way"?
- 0mbre 7y agoA software's usefulness is not correlated to how well it was architected. What I like about Laravel is that its fairly complex code base that is mostly composed of tiny and expressive functions
- lugg 7y agoI'm not sure I follow. We're not talking usefulness here we are talking about clean code. Architecture is not only correlated but causal in this situation. It's over architecture is the problem. It's nano functions are a positive side effect but don't change the indirection problems you face.