21 ms·
I've actually been really impressed with Laravel after switching back to PHP for a few projects. Not only is the developer tooling experience some of the best I
by owenwil 7y ago
I've actually been really impressed with Laravel after switching back to PHP for a few projects. Not only is the developer tooling experience some of the best I've experienced, it's just really the only framework I've ever experienced with a high quality ecosystem of tools—from Forge[1], which makes it dead-simple to deploy a Laravel app into production to things like Horizon, for managing Redis queues.
A great example of this in action is Laravel Spark[3], a first party base for building paid SaaS apps. I built and launched a writing tool, Write Together[2], to the world in under three weeks, payment systems and all, and got 150 paying customers in a matter of a few weeks. One hell of a great way to MVP an idea and build something useful, in a low amount of time.
I'm basically developing two Laravel apps full-time at the moment, and it's the most fun I've had in years...compared to the hellscape of NPM dependencies and other complexities I'm usually bogged down with. Composer, the package distribution system, really needs work and is incredibly slow, but other than that—I'm really happy.
[1] https://forge.laravel.com https://forge.laravel.com
[2] http://writetogether.space http://writetogether.space
[3] https://spark.laravel.com https://spark.laravel.com
- Intermernet 7y agoLast time I used composer (about 3 years ago) it had a nasty memory leak that eventually meant I had to run the build on a higher specced instance than the actual application. This was mainly due to the ridiculous dependancies of the application, but it was almost a show stopper. Has this improved?
- bashy 7y agoYeah I remember the problems with composer. It's good now.
- jbrooksuk 7y agoYeah, that's not a thing anymore.
- bayesian_horse 7y agoComposer is very useful in penetration testing. Lot's of good information in the composer.json files people keep forgetting to block..
- ceejayoz 7y agoA Laravel or Symfony app operates out of the public/ directory, so composer.json shouldn’t need any blocking typically - it’d be outside the web root.
- codedokode 7y agoIt is not a leak, it just loads too much data into memory so you need about 1 Gb of RAM to run composer update.
- SXX 7y ago> Composer, the package distribution system, really needs work and is incredibly slow, but other than that—I'm really happy. It's also use abysmal amounts for RAM for some reason. I managed to use Chrome headless for my app with only 512MB, but not Composer.
- gog 7y agoHow long ago was that? There were some issues if you had xdebug enabled, but AFAIK that has been fixed.
- SXX 7y agoJust few months and I did not use xdebug on that server. To clarify it's was just CRUD app on Laravel with few small dependencies on top of it. Composer used like 700MB RAM to install it for whatever reason.
- stdclass 7y agoJust today, I had to resize the swap on a raspberry pi so composer could update the dependencies.
- DCoder 7y agoI've had fun issues recently where Composer crashed after hoovering up 1.5 GB of memory. (Composer sets that limit by itself on startup, I didn't arbitrarily choose that number.) XDebug was off. I fixed it by telling Composer to use unlimited memory.
- beezischillin 7y agoI had to raise Composer’s RAM limit last week for a fairly simple Symfony project with less than 10 extra dependencies. I had to up it from 2 to 4 gigs. PHP 7.2.8. without xdebug.
- nickjj 7y agoThere are comparable things with other frameworks too. For example I wrote a course on building a SAAS app with Flask. It's available at: https://buildasaasappwithflask.com/ https://buildasaasappwithflask.com/ It covers everything about user registration, profiles, subscription billing, 1 time billing, invoicing, and about 50 other things you would likely want to do in a SAAS app or any application really. The course comes with the source code along with 15+ hours of video explaining every line of code in stages, life time free updates and life time support for close to half the price of what Spark charges just for the source code for 1 site license (with the Flask course you can use the code in however many projects you want). Spark's business model seems interesting though. I don't use it personally but do you just get the source code and nothing else? How do they limit you to 1 site if you end up with a local copy of the scaffolding / code base?
- bayesian_horse 7y agoEvery time I try out Flask, Aiohttp or even Express.js I appreciate more the stuff Django normally does for me.
- zius 7y agoDjango abstracts away a bit too much, if you ask me. For a simple REST API it's complete overkill. I prefer Flask or Falcon[0], in which you don't just get better performance[1] but also a lower level of control. [0] https://falconframework.org/ https://falconframework.org/ [1] https://klen.github.io/py-frameworks-bench/ https://klen.github.io/py-frameworks-bench/ or https://github.com/the-benchmarker/web-frameworks https://github.com/the-benchmarker/web-frameworks
- zeptomu 7y agoI agree with your parent. When I started with (Python) webdev some years ago I picked Flask, but nowadays I use Django, as it has superb documentation and useful things built-in. In particular I miss the user-management, authentication and authorization in Flask. Personally I consider Django without any additional apps less complex than Flask with apps (or "plugins" in Flask jargon) to handle basic stuff like auth. If performance is a concern, both of them are insufficient and I would rather pick another language like Rust, Go or even Java.
- cntainer 7y agoAgreed, Laravel provides the best dev experience in the PHP world. The funny thing is that Laravel basically took the Ruby on Rails philosophy and applied it to PHP. Just looking at their site it's clear they have a very similar vision: simple, fast and fun. One can always find differences but the basic principles are the same. IMO this is great kudos to the Laravel guys, whatever language I use I always look for the tooling that follows the KISS principle. In PHP you have Laravel, in Java/SCala you have PLay, etc. I need to add that, because of the job, I did a lot of PHP, Ruby, Java, Javascript with many different frameworks and I can say that Rails is still the best for me when it comes to dev experience if you need to move fast. Laravel has come a long way but it's still not at the same level of maturity in terms of tooling and ecosystem. As a bonus with Rails you use Ruby which is designed for programmer productivity and fun. Anyway, whatever language/framework you use just keep it simple, that's the most important decision you can make for the health of your project.
- brightball 7y agoYep. Laravel is basically PHP on Rails. They do a great job with it too.
- toastal 7y agoI dunno... Their home page looks like something out of the Panera Bread playbook looking at the homepage. 'Web artisans'? Why is it 'clean' because it has an absurd amount of whitespace and comments of platitudes for the code example?
- cntainer 7y agoLol, I agree their packaging looks a bit different but the contents of the package are basically the same. Working with both Laravel and Rails will make it clearer that they try to follow the same principles of convention over configuration and programmer happiness :).
- mmccaff 7y ago"Clever" "marketing" language like this is not unique to Laravel, most frameworks use language like it for tag-lines on their homepage. Pyramid, a framework for Python, even goes with the same "artisan" language. They're just trying to be fun, inspiring, etc From the home page of a few other frameworks: Django: "The web framework for perfectionists with deadlines." Flask: "Web development, one drop at a time" Express: "Fast, unopinionated, minimalist web framework for Node.js" Pyramid: "You need a Python web framework that supports your decisions, by artisans for artisans." Why is it clean? Build an application with Laravel and you'll find out. :) The documentation and community are excellent. I've used many frameworks across many different languages, and (imo) it really is very nice to work in. It's funny how the most negativity comes from people with very little experience, or at least recent experience, in the thing that they don't like.
- userSumo 7y agoNo doubt its great, but does anyone know how does it compare to django for saas apps?
- tacone 7y agoTo speed up Composer you can install Prestissimo [1] globally, it speeds things up considerably. [1] https://github.com/hirak/prestissimo https://github.com/hirak/prestissimo
- stephenr 7y ago> Composer, the package distribution system a package distribution system. Composer suffers some of the same issues NPM does, IMO: it encourages stuff like 'install dependencies at deployment' and "why write it when you can blindly trust someone else's code". Not everyone who uses PHP uses Composer.
- ryeguy 7y agoThe vast majority of people using a package manager in the PHP ecosystem are using composer. It makes sense to call it "the" package manager.
- stephenr 7y agoI’d argue that the only “the” is one that’s distributed with it, which is PEAR. I’m not saying PEAR is used more or that it’s better, just that it’s the only one close to “default” with the language distributions.
- akie 7y agoI literally know no one who uses PEAR.
- stephenr 7y agoWhich is literally irrelevant to my point.
- icedchai 7y agoI do. I was using it back in 2003... pear/DB. I still have some code from that era that uses it.
- munk-a 7y agoWould you use a pear dependency in a new project if you weren't pulling bits in from an older one? Personally, I wouldn't... I worked with pear and pecl and composer is just far more pleasant to interact with.
- throwayEngineer 7y agoLaravel was fantastic. The first month I followed the tutorial, I was bitter about the complexity, but when it came time to building my back end, it took only a few weeks. I would recommend.
- joeldg 7y agoIn PHP shops I have worked in we would just hand new interns the 'Object-Oriented Programming with Java' book and have them go through that as everything in that book would transfer directly to PHP (and they all new Java). Then, Laravel, that is the best framework I have ever seen in any language. Comparing it to rails is a huge disservice as it is far superior by almost any measure.
- ljm 7y agoI cut my teeth as a developer on PHP, back in the 4.3 days before they'd really placed their bets on OOP, and we were dealing with mysql_real_escape_string, needles and haystacks, and haystacks and needles. No PDO, XSS and SQL injections up the wazoo. I can't say I enjoyed working on any of those projects compared to the kind of stuff I do now (and how much I've learned since), but I've been remarkably surprised by some more recent codebases, despite the architecture sometimes feeling a little over-engineered (Symfony 2, for an outdated example). It's not the style of code I enjoy writing at all but I've seen some incredibly clean stuff that would put a lot of Rails apps to shame. And I'd take that PHP over a badly maintained Rails app any day. I wouldn't use PHP by choice still, but I no longer care to be snobbish about it. People are doing some good stuff in it, just the same as has happened with JS.
- bufferoverflow 7y agoModern PHP is light years ahead of 4.3. Not just the ecosystem, but the language itself, the performance. It's really not bad.
- no_wizard 7y agoI hear you on composer being slow. One thing I found that works extremely well to speed up composer installs: https://packagist.org/packages/hirak/prestissimo https://packagist.org/packages/hirak/prestissimo Give this package a try, it really worked for me to speed up package management with composer.
- munk-a 7y agoLaravel is interesting for greenfield stuff. I'm working on a legacy project and we've had a bunch of good times with zend as it allows you to transition to it more naturally piece-by-piece.
- tabtab 7y agoIn my opinion the framework matters more than programming language. One typically doesn't need the "odd" or "fancy" features of a programming language if the framework is well designed and/or a good fit for the shop's conventions or needs.
- agumonkey 7y agokudos to laravel team (and symfony, since IIRC, laravel is built on top of sf bundles)
- lazerlapin 7y agoHonestly I don't see what's all the fuss about Laravel, especially when you compare it to Django. I mean, you have an admin ready out-of-the-box, and database migrations are automatically generated. Correct me if I'm wrong but, Laravel you need to do those things manually...!