Should You Use A PHP Framework?

preview_player
Показать описание
A sub asked, why should you use a framework when core PHP is lighter and achieves the same goals without the bloat?

In this video I give you 5 reasons why you should certainly use a good quality framework like Laravel or Yii2.

--------
Follow Me: ⬇️
Instagram - Yeah, I don't have one.
Рекомендации по теме
Комментарии
Автор

Great points made.
However, there are many disadvantages also.

If your framework is abandoned, you're faced with a total rewrite of your application.
So speed of development might be fast in the beginning, but you risk the above.

Also, you can't just upgrade PHP, until your framework supports it.
If you built your code in core PHP, you could upgrade PHP anytime. You just log and fix errors.

Frameworks prevent many developers from learning PHP. A lot of devs can't code in vanilla PHP without the frameworks they're used to.

Sometimes you can't make the framework do what you want, because you can't modify the core behavior.

mucholangs
Автор

Symfony is becoming a favorite of mine for PHP. They have multiple tutorials about starting with flat PHP and how to add-in their components piece by piece to build your own framework. Plus they have varying levels of project skeletons so you can use as much or little as you want. I really like it and their design philosophy.

DevDungeon
Автор

I love your reasoning man.. Couldn't be more clear!

georgenjoroge
Автор

I was about to say that frameworks suck...and then after your first comment, i realized you are right, I avoided using other frameworks but i built my own and i am using that, so its still a framework. so yes.. you are again correct.

maxlumnar
Автор

It would actually be a good idea to list reasons also for not using frameworks. I mean these are good reasons, except #1... felt really slim; a framework is more than just a collection of functions and classes, and a proper framework does come along with a lot of baggage; they are always opinionated about how you can use them to write your software, they can absolutely have some weird design features, limitations, and are usually just black boxes. If something doesn't work, I'm not interested in chasing the issue inside the framework, I have enough work on my own project.

Datamike
Автор

Codeigniter vs symfony which one do you prefer?

Shiv-vbre
Автор

Thanks Lionel, this is very helpful and easy to understand. Question: If I outsource the MVP of my product to an agency who builds it with a niche framework, say F3, and I need to hire inhouse devs to continue development of the product, should we stay on F3 or migrate to a different framework - is that even possible? Thanks in advance!

iamthekwan
Автор

What about Phalcon or TronGate (or even CodeIgniter in 2021)? Total n00b here, but I've heard the problem with Laravel and Symfony is dependency on third party libraries and also Packagist is completely broken. Is PSR-4 autoloading also a problem?

KevinLopez-rlwq
Автор

All your points are....well....on point. That's the reason every firm/company wants to hire framework developers as opposed to raw coders. The only people who wanna hire raw coders are those who are building enterprise level stuff and have to squeeze every ounce of performance out of their code, so more often than not, they make their own framework or standard.

Though I do wanna say that I don't like frameworks that are too easy and opinionated since they force you to stick to their stuff, instead of switching to other frameworks that might be better suited for some projects. Laravel, for one, is very opinionated and I hate the fact that I have to learn to do things the laravel way if I wanna use it, and once it becomes muscle memory, its hard to use another framework.

mahinchowdhury
Автор

There were more 10 frameworks before laraver started show itself, so never to say never, sometimes re inventing better wheel might be good point 🙂

TheArmanist
Автор

You forgot security, PHP on its own is very insecure. That's the most important part imo if you are building something serious with sensitive data, like a shop...

Noum
Автор

i really want to learn yii but laravel is hyped. and i want to check the best tutorial but the resource is less

ClevergunsYT
Автор

In order to deploy from dev framework to production; does the web hosting company have to support the framework or simply PHP?

simongreenidge
Автор

Only companies and managers need frameworks and standardization to be efficient and profitable. But I like your starting logic, that by just reusing my custom code and scripts / libraries is like a framework, haven't thought about it that way. I still think frameworks are trash in 90% of cases.

rangingaway
Автор

Pure core PHP is the Corvette and Laravel is the Toyota

phillychannel
Автор

if PHP frameworks are tree shakable would be nice to use.

kuthub
Автор

That’s totally bullshit. Already doing core php for two years. I can reuse whatever I want from my code. Never used JavaScript to. You can do absolutely everything with html/css/php. It’s total laziness. Full fiver and upwork is full of so called programmers who can’t even make navbar without bootstrap.

homeoffice
Автор

?I wish I knew it before I lost my client?

reebaljavedkhan