7 ms·
Personally, I liked Laravel when I was first investigating it years ago, but was always a touch put off by the pervasive "I am beautiful, adore me" undercurrent
by chipotle_coyote 5y ago
Personally, I liked Laravel when I was first investigating it years ago, but was always a touch put off by the pervasive "I am beautiful, adore me" undercurrent throughout its design, documentation, and even comments. I'll be the first to admit that's not a rational critique.
Having said that, though, Laravel is relatively unusual among major frameworks in that it doesn't seem to have been developed in tandem with a real-world project like Rails and Django were (e.g., BaseCamp and the Lawrence World Journal's internal CMS), but rather developed just to be "a better framework." Each successive release of Laravel seems to push even harder at tying you up with other Laravel add-ons, some of which are paid services. Rails and Django are open-source projects, but Laravel is an open-source product. Again, not necessarily bad, but there's an increasing feeling that the Laravel commercialization model is "give us sufficient money and you'll barely have to write any code."
My other nitpick with Laravel is that learning to develop with it is often learning to develop specifically for Laravel rather than learning to develop for PHP. This is a charge leveled against Rails and Django, too, but Python and (perhaps especially) Ruby are just better languages for developing DSLs in. Laravel has to jump through a lot of hoops behind the scenes to do what it does, leaving you with a framework that isn't particularly nimble and design patterns that often aren't particularly applicable to the rest of the PHP world.
If you're willing to hop fully on board with the Laravel train, none of this may be an issue for you. But at this point I'm not convinced that smaller PHP projects, at least, might not be better off without frameworks at all. Use Composer to pull in specific packages that you really need, and ask "if I can get the functionality I need from this package with an afternoon's work, is the package bringing anything to the table that I still want" before adding them. (Sometimes the answer is "yes," but not always, and I tend to be wary of packages that primarily just wrap other packages.)
- unfocussed_mike 5y agoFWIW I have never once interacted with Laravel's commercial model, or felt that I am being engineered into it. I just don't give it another thought.
- chipotle_coyote 5y agoI haven't interacted with it, either. "Engineered into it" would be too strong a phrasing, but it's hard not to get the impression Laravel's creator(s) really, really want you to use their other services. I mean, compare the menu bars of rubyonrails.org, djangoproject.com, and laravel.com: Rails's first links are "blogs" and "guides"; Django's first links are "overview" and "download"; Laravel's first links are "Forge" (their commercial provisioning service) and "Vapor" (their "serverless" deployment platform).
- unfocussed_mike 5y agoI take your point and I understand that you could get that impression looking at the website; they have stuff to sell. There's also more of a market for some of that stuff, and the reason is the huge proliferation of different PHP execution environments. PHP runs in more places and there are more opportunities to help correct for the limitations of those environments (with log monitoring tools and the like). (Also -- contrarywise as they say -- PHP does _not_ run first-class in some serverless environments; you need a custom execution environment for PHP in Lambda. So there's an opportunity there.) But as a developer experience it is really not commercialised at all. I do not look at or think of any of those things, and I've not encountered any significant upselling. I'd forgotten all about Forge until you mentioned it! (And will now revisit it)
- tylerlwsmith 5y agoThis is totally fair. A few years back I worked on a Laravel project when both me and the other dev were fairly new to Laravel, and neither of us were particularly adept sysadmins. Forge was a life-saver when it came time to deploy. Now that I'm _much_ more experienced with Linux server management, I found a mix of Laravel's official deployment docs and some community tutorials more than enough to spin up my Laravel apps on Digital Ocean. I think that Laravel providing Forge as an official happy path for deployment is to the benefit of newer Laravel developers. I've listened to the hosts of the Django Chat Podcast lament about deployment being a big hurdle for newer Django developers. I'm glad that Laravel has an easy button. As someone who is now more experienced, I'm also glad that I don't feel forced to use Forge and other services by the Laravel team. I might use it again at some point though.
- munk-a 5y agoIf you want to talk about potentially irrational reasons to be put off Laravel: when picking a framework I ended up going with Zend over Laravel mostly due to the modularity of the former... but also because the wide prevalence of Laracasts made me concerned that written documentation would be difficult to use and the documentation space of the framework would slowly migrate to being half-out-of-date video and audio snippets that slowly became more and more misleading and inapplicable without being updated due to a lack of motivation.
- tnorthcutt 5y agoFWIW that hasn't been my experience at all. The documentation is great and well maintained. The repo is public and you can see all changes here: https://github.com/laravel/docs https://github.com/laravel/docs
- munk-a 5y agoI made this decision about four years ago and while the documentation was well maintained at the time I was concerned that the Laracasts would be unmaintained and become a source of confusion that talked about no longer present features. I was mostly afraid about the primary problem with over-documentation: you're introducing a maintenance cost which, if you ever stop paying, ends up quickly causing more harm than never having had the documentation in the first place. Here[1], for instance, is someone in this very response thread talking about how the core getting started Laracasts are out of date and they're confused which documentation they should reference. This will probably be addressed pretty soon (see the comment) but I think this is a very real danger with promising to deliver non-text based documentation. 1. https://news.ycombinator.com/item?id=30261801 https://news.ycombinator.com/item?id=30261801
- hhda 5y agoLaravel 9 was released today (hence this thread) - Laravel 8 is the major version that came out directly before Laravel 9. Further, Laravel 9 is essentially Laravel 8 with a bump to the dependencies, with most higher impact changes coming as a result of those dependencies being updated[1]. The Laravel 8 From Scratch series has videos as recently as August[2], with the What's New in Laravel 9 series already having 11 videos[3], with the most recent posted yesterday. The Laracasts video series are still very much actively updated (with Jeffrey, who runs it adding new teachers in the last year). And Laracasts is a 3rd party learning resource anyway, with the first party docs all being well maintained. 1. https://laravel.com/docs/9.x/upgrade https://laravel.com/docs/9.x/upgrade 2. https://laracasts.com/series/laravel-8-from-scratch/episodes/70 https://laracasts.com/series/laravel-8-from-scratch/episodes... 3. https://laracasts.com/series/whats-new-in-laravel-9 https://laracasts.com/series/whats-new-in-laravel-9
- tnorthcutt 5y agoJust for some context, here's how the items under "Ecosystem" on laravel.com break down on free vs. paid: Free: - Breeze - Cashier - Dusk - Echo - Horizon - Jetstream - Mix - Octane - Sail - Sanctum - Scout - Socialite - Telescope - Valet Paid: - Envoyer - Forge - Nova - Spark - Vapor
- aprdm 5y agoThis gives absolutely no context as I have no idea what these funny names are :)
- jw1224 5y agoFree: - Breeze: authentication starter kit - Cashier: payment processing through Stripe or Paddle - Dusk: automated browser testing - Echo: real-time broadcasting - Horizon: queue handler - Jetstream: application scaffolding - Mix: frontend asset compilation - Octane: serverless Laravel - Sail: Laravel Docker environment - Sanctum: SPA authentication - Scout: search engine - Socialite: OAuth provider authentication - Telescope: application monitoring - Valet: macOS developer environment Paid: - Envoyer: zero-downtime deployment service - Forge: Laravel hosting via AWS, DigitalOcean, and more - Spark: application scaffolding kit - Vapor: serverless Laravel hosting via AWS
- chipotle_coyote 5y agoYou left out Nova, which is also paid. I don't want to come across as "nobody should give Laravel money," to be clear. I'm just observing that Laravel is essentially a commercial open-source enterprise in a way that Rails and Django aren't. Models like this seem to be a bit more common in the PHP world. (e.g., Sensio Labs makes their money by teaching and consulting on Symfony, Laravel LLC makes money from Laravel add-on services, but Basecamp makes money from the SaaS applications they're building on top of Rails and is not trying to monetize Rails itself.)
- unfocussed_mike 5y agoRails very much was a commercial open source enterprise when it started out. It's just that the enterprise was Basecamp and the other 37 Signals apps. They benefited enormously from the extra eyeballs on their framework, not least during the infamous "hey, we built this massive web framework in part around the incorrect assumption that GET requests don't need to be idempotent and then encouraged everyone to use it" time. They had no services to sell but they had a keen commercial imperative.
- unfocussed_mike 5y ago> but was always a touch put off by the pervasive "I am beautiful, adore me" undercurrent throughout its design, documentation, and even comments. I'll be the first to admit that's not a rational critique. I should add, separately, that after a long career in web-development, this kind of reflexive emotional response strikes me as practically a survival instinct, so I am not judging you for it at all.
- jonwinstanley 5y agoDisagree mostly. I’ve never paid for any of the paid modules and continue to use Laravel on a daily basis. I do feel the docs are a little minimal at times, maybe to make them prettier? Could definitely benefit from a little more explanation in places.
- deleted 5y ago[deleted]
- dabernathy89 5y ago> Laravel... doesn't seem to have been developed in tandem with a real-world project > other Laravel add-ons, some of which are paid services These other services are what you're looking for - that's how Taylor and the team dog-foods Laravel. While I don't object at all to the claim that small PHP projects can easily be done w/out a major framework, it's worth noting that both many components of these frameworks (including Laravel) can be incorporated into a smaller project ad hoc.
- _xnmw 5y ago> Laravel has to jump through a lot of hoops behind the scenes to do what it does, leaving you with a framework that isn't particularly nimble and design patterns that often aren't particularly applicable to the rest of the PHP world. And tell me, do you use React? Talk about jumping through hoops just to print HTMl. Personally I'm very glad Laravel was written in PHP, because: 1) you can still use raw PHP in the templates if you wish. 2) PHP Traits allow a very interesting form of polymorphism and code-reuse which is especially suited to the kind of business logic you find in web apps. 3) PHP is very much a C-inspired language that was built ONLY for the web, so you get access to a lot of low-level constructs and a "baremetal" paradigm (passthroughs like system() for bash scripts with seamless handling of STDIN/STDOUT) plus a solid standard library for the web. The PHP standard lib supports everything you need to write HTTP servers: curl_setopt, parse_url, FFI for calling C functions for performance-sensitive code, date/time/number/currency formatting, global variables for cookies and sessions, etc. all out of the box. For web apps, I'll take PHP over NodeJS/Ruby/Python any day of the week.
- chipotle_coyote 5y agoYour response reads to me like you think I was dunking on PHP, but I wasn't. I don't feel like PHP is a particularly great language to write a DSL-style web framework in, but that's largely because -- as I was trying to suggest with the part about "Use Composer to pull in specific packages you really need" -- modern PHP mostly just doesn't feel like it needs a framework to me. That's precisely because, as you put it, PHP was built ONLY for the web, and the language's earlier quirkiness has really been smoothed over in the last decade. I like PHP. We are closer to being in agreement than you may think. :) (Although I might take Ruby over PHP, depending on specific circumstances. Ruby is just such a nice language, and Rails has gotten pretty darn good once it stopped being "interesting" and could settle down to making itself productive. Maybe that will one day happen with Node…)
- fendy3002 5y ago> I'm not convinced that smaller PHP projects, at least, might not be better off without frameworks at all Uh having experienced the old pre-codeigniter php, I don't really recommended it. Without proper controller separation (using twig as rendering engine for example) it poses the risk for the business logic to be tangled with view. Not to mention that it's hard to do routing with native php, except the simple [folder-path]/[php-filename].php and remove the extension requirement with .htaccess. At that point I recommend to just use a framework instead, though arguably Laravel may be too big for some. I don't know if PHP has similar framework like expressJs though that just handle the minimum requirements.
- chipotle_coyote 5y ago> Without proper controller separation (using twig as rendering engine for example) it poses the risk for the business logic to be tangled with view. Well, you should also quote the part in my comment about "use Composer to pull in specific packages that you really need." :) I'm not suggesting "roll everything on your own," necessarily: if you want to use Twig, or another templating engine, add that as a Composer package. (Personally, I'd just write a small pure PHP template class to handle this and trust myself not to be a dingus, but if I were on a team that might change the calculus here.) > Not to mention that it's hard to do routing with native PHP... Again, you don't have to roll your own here; you can include something like FastRoute or even Symfony's router as a routing engine. I'm not saying you should avoid absolutely all libraries. Laravel is built on top of a lot of Symfony libraries, after all! For a project I've been noodling with slowly, I'm using my own "pure PHP" template engine, but I'm using FastRoute for routing, Doctrine DBAL (although not the ORM) for database access, Monolog for logging, PHP Debug Bar to get a lot of debugging info in development, etc.
- fendy3002 5y agoOkay that's a fair approach, though it's still not recommended for everyone especially those who isn't much familiar with those packages setup.
- ksec 5y ago>Laravel commercialization model is "give us sufficient money and you'll barely have to write any code." I actually think this is a good direction. Working its way backward to Low-Code.
- tored 5y agoIt is quite obvious that Laravel is written by an American, they all do understand marketing better than us Europeans, Artisans creates works of art and it is eloquent even if it isn't. What is great about Laravel is all the addons you can apply seamlessly. But I can't say I like the overall design, too much magic for my taste and all the non-strict typing. Put things in the correct directory and things happen is generally a bad design. Use magic name on class object either as a property or a function and different things happen. I do understand that it is easier for the framework developer to have loose typing, easier to swap implementations between major versions, but it makes it harder for the framework user. I have to, at least in older Laravel versions, apply a lot of annotations to get a pleasant developer experience. In every Laravel project I haven been involved in I have needed to read the Laravel framework source code with all its layers to get grip what is actually going on and how it is related to my specific problem. However this have been true for every framework project I have been involved in, Laravel or not.