Hacker News new | ask | show | jobs
by DigitalSea 4344 days ago
Irrespective of the fact that Laravel is made up from some Symfony components, before Laravel came along no other framework (not even Symfony) managed to turn the tide. Zend was seen as this mammoth framework not targeted at the mainstream, Codeigniter was at a cross-roads losing prominent developers in the community and lacking in features (PHP 4 support as well). The issue with Symfony is that it is inaccessible, I've seen it used in the enterprise much like I've seen Zend used in the same space, Laravel is more of a peoples framework targeted at everyone from entrepreneurs to large companies and it is more accessible.

It would be in the best interests of Laravel for Symfony to succeed, but you have to realise they're targeting two different subsets of users. I think what makes Laravel more appealing to me as a developer is it takes the good from the likes of Symfony, takes the great documentation and accessibility aspect from Codeigniter all while remaining a relatively soft opinionated framework, it provides you with a structure but the IoC container means you can structure it however you want. The Blade templating system is fantastic, the ORM is feature-rich and very powerful and the addition of database migrations right out of the box.

There isn't a lot of different between Laravel and Symfony considering they share similar components and the unique selling points of Laravel are components that can be used within a Symfony 2 application. I think Laravel gives you a little more out-of-the-box, whereas Symfony makes you add what you need and I can see the benefits from both sides of the fence. If you want to compare frameworks, a real comparison would be Laravel and Silex.

One aspect I like about Symfony is the ability to define routes 4 different ways; YAML, PHP, XML and Annotations in a controller. Compared to Laravel's routes.php file. If you're a developer that wants to customise absolutely every single aspect Symfony is probably a better choice, if you're happy with the guiding hand Laravel gives you out-of-the-box and don't care what format your configuration files and routes are written in (amongst other aspects), Laravel is the better choice. The learning curve of Symfony is far higher than Laravel due to the amount of configuration it allows you to do and the fact it is completely unopinionated.

So, while Taylor didn't build every aspect of the framework (a very well-known fact), there are certain aspects he did build specifically for Laravel. He also took the time to piece all of the components together from Symfony and other authors to create what is arguably one of the most developer friendly PHP frameworks since Codeigniter hit the scene in 2007. Before Laravel came along, I can't recall anyone else attempting to make a consumer friendly framework, can you?

1 comments

PHP was always stupid easy to use (and abuse), the fact that Laravel is another easy framework doesn't turn any tides. The actual tide was turned by Symfony2 which was the first well architected, well designed PHP framework when it came out in 2011. Since then a mature, knowledgeable community created a lot of great components.

Laravel on the other hand is exactly where Codeiginiter was: easy to pick up, and easy to write crap code in. The whole Facade nonsense is already being abused to no end, not to mention the ORM, Eloquent. Similarly to CI, if you want to do something remotely advanced with it, you end up reading the code constantly, because the "great" 10 page documentation is only for absolute beginners.