DEV Community

[Comment from a deleted post]
Collapse
 
skeeith profile image
Gether Medel

Then you haven't used Laravel yet. its like no other framework from all other frameworks

Collapse
 
moopet profile image
Ben Sinclair

Isn't it rather like Symfony?

 
uptoeleven profile image
Simon Brown

No.

Symfony doesn't have nearly as much magic in it. And you can do stuff with Symfony that isn't Active Record. Because sometimes Data Mapper is appropriate...

Laravel is a bit like WordPress. And when the only tool you've got is a hammer, everything looks like a nail...

 
stevenavelino24 profile image
Steven Avelino

How is Laravel like Wordpress ? The only thing they have in common is the programming language behind them.

You may not like Eloquent as the ORM, but nothing is magical in Laravel. It uses a lot of Symfony components (just look at the vendors of a Laravel project) and some principles of Symfony. And Eloquent is here to make your life easier, but you can do everything you want with simple SQL just like any proper ORM.

Laravel makes your everyday Web tasks easier, because you know how to make a CRUD, you don't have to write everything all the time. But saying it's like Wordpress is just plain wrong.

 
uptoeleven profile image
Simon Brown • Edited

Yes it uses Symfony components. That's what they're there for. But Laravel is its own ecosystem with its own way of doing things. Some of those ways aren't entirely clear to a systems developer coming from a Symfony background - for example the magic methods. That's what I'm talking about "magic" - when I load it in PHPStorm and I want to modify a particular class property but as soon as I change anything with a similar name to that class property suddenly it disappears.

Once you look under the hood you can see what's actually going on (an awful lot of reflection).

Eloquent is an Active Data implementation - using a massive God class (eek) and more magic invocation stuff. And large dollop of Doctrine ;-)

But it is what it is.

I drew the comparison with Wordpress because there is a similarity in... ethos maybe?

Wordpress is a blogging engine and, at a stretch, a decent basic CMS for sites with low numbers of articles (anything above 10,000 articles starts to kill the server). It is great for throwing together a site quickly. But Wordpress developers who've built plugins to turn it into a CRM and a marketing engine and global publishing platform quickly run up against its limitations.

Laravel is a web app framework. It does what it does phenomenally well. It was originally an attempt to remake Ruby on Rails as a PHP platform. And it follows the Ruby-on-Rails "convention over configutation" design. If you want CRUD - for heaven's sake use Laravel. If you want decent web apps, use Laravel. If you need to start doing statistical analysis on metadata and breaking out of what Eloquent gives us - you start to hit the limits of what Laravel is good for.

Yes you can just add some simple SQL (or not so simple SQL). But if you have to go down that route, maybe you have a hammer in your hand? Are you using the best tool for the job (given that "simple SQL" = "tied to a particular SQL implementation for the lifetime of the project")?

Wordpress is a great implementation framework for making blogs and basic web sites.
Laravel is a great development framework for making fairly complex, CRUD-based sites.

But it's also useful to know its limits. There are times when you need to have more tools in your box.

 
stevenavelino24 profile image
Steven Avelino

Nothing stops you from implementing whatever functions or classes you want, Laravel is still PHP. You can do ML or statistical analysis of metadata as you wish to do. Just like Symfony (or any Web frameworks for that matter), Laravel is a big toolbox that you can use. It's gonna help you greatly in some tasks and some, not so much, but it's still what it is, a toolbox, nothing stops you from going to the shop and buy another tool for what you want to achieve.

If your project needs are so complex that Laravel can't solve them, you probably just don't want to use PHP and you better use a more appropriate language

Collapse
 
uptoeleven profile image
Simon Brown • Edited

It's great because it

Now if you were "Laravel" you'd magically fill in the gaps in that sentence and know precisely what I was saying and why...

In fact I can probably do it without vowels and Laravel would think it had the same meaning

t's grt bcs t

Obviously everyone knows what THAT means. I mean there's a couple of magic methods in there but so what?

Laravel is good but it is very much a prototyping tool and you hit its limits pretty quickly.

 
skeeith profile image
Gether Medel

I think you haven't used Laravel for big systems yet. I haven't reach a limit in Laravel with giant apps. it can clearly handle giant tasks that wordpress can NEVER do.

Laravel is never like wordpress. it just never is. I've been developing real-time event-driven applications and wordpress can't even do half of what Laravel can do. probably not even 1/4 of what Laravel is capable of doing. You clearly haven't develop a complex real-time event-driven application that requires a lot of functionalities that Laravel offers that wordpress just can't do.
IT IS IMPOSSIBLE to develop big systems like that in Wordpress and you're comparing them in simple terms.

If I were to compare them.
Ant is Wordpress and Laravel is an Elephant.

 
uptoeleven profile image
Simon Brown

Why are you building giant apps at all? Wouldn't you be better off delegating some of the responsibility to micro-services?

Laravel is never like Wordpress because it does different things. Yes. You're right. Cars are nothing like aeroplanes because, like, aeroplanes fly and cars don't. So how can they both be called vehicles?

I'm saying cars are like aeroplanes cos they're both vehicles. And Laravel is like Wordpress because with both, you can make them do stuff they weren't really designed to do.

Look - obviously I've not used Laravel for big systems yet so I've got a lot to learn (I've used Symfony for them though...).

But here's an article from someone who has a similar perspective to mine: freecodecamp.org/news/moving-away-...

There are bits of Laravel that are not nice to use and which violate the principles of SOLID. And that's as good a reason as any to question the way it's built.