Should You Use A PHP Framework?

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 51

  • @DevDungeon
    @DevDungeon 2 роки тому +4

    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.

  • @maxlumnar160
    @maxlumnar160 Рік тому +1

    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.

  • @mucholangs
    @mucholangs Рік тому +3

    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.

    • @lionelthetechlead8839
      @lionelthetechlead8839  Рік тому

      However, if you use your own framework and for some reason you can't code or forgot, then it's a full rewrite. Most frameworks stay relevant and have support, but again if you use your own framework and you cannot do it yourself then you cannot upgrade it. That's true if you cannot code vanilla php, but you only need to know how to drive a car to use it, not build a car.

    • @mucholangs
      @mucholangs Рік тому +2

      @@lionelthetechlead8839 *if you use your own framework and for some reason you can't code or forgot, then it's a full rewrite*
      Not necessarily. Personal code is rarely as complex as a general framework. I stand to be corrected. So the chances of a total rewrite by anyone who works on my code is unlikely.
      *Most frameworks stay relevant and have support*
      Not always. I was burned by Kohana once.
      *again if you use your own framework and you cannot do it yourself then you cannot upgrade it*
      For most personal projects, I don't know about others, an upgrade just entails logging and fixing errors.
      It's not that simple with most general frameworks. You have to wait for the dev team to do it, before you could upgrade.

    • @TruthEagle247
      @TruthEagle247 Місяць тому

      Both of you made good points, I think having your own is better and also a good idea to use other frameworks if you want to work on other existing projects or jobs. It make you easily switch the project to suit you.

  • @georgenjoroge5175
    @georgenjoroge5175 3 роки тому +4

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

  • @Datamike
    @Datamike 2 роки тому +2

    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.

    • @lionelthetechlead8839
      @lionelthetechlead8839  2 роки тому

      It's a good idea but wow. That would like declaring civil war on PHP fractions. More frameworks means more fit.

    • @Runeite51
      @Runeite51 Рік тому

      @@lionelthetechlead8839 frameworks are boring and stressful. For hobby programmers it's much more peaceful to understand the wheel by studying it, instead of arbitrarily using someone else's wheel. Then it gets to a point where you can custom make the perfect wheel very quickly. I guess when someone else's money is on the line then sure, go with frameworks because it's about speed of deployment. But it creates a glass ceiling and it makes programming not fun, in my opinion. Long story short, if there isn't anyone rushing you, screw the frameworks do whatever the hell you want.

    • @lionelthetechlead8839
      @lionelthetechlead8839  Рік тому

      @@Runeite51 good point. There's certainly a steep learning curve for frameworks. But what happens is somewhere when you're doing your own wheel, you look at another framework and say "wow that's a idea why didn't I think about that" It's not just someone else's wheel but one that has been battle tested and refined many many times over. But I do agree that just using another framework blindly is a bad idea. I switched around from cake to yii a bit of laravel finally back to Yii2 which I am very happy with. Once you overcome the hurdle, you can start building applications rather than learn first concepts. There's also a big community of people available to ask than if you are stuck with your own framework

  • @Shiv-vb1re
    @Shiv-vb1re 3 роки тому +3

    Codeigniter vs symfony which one do you prefer?

  • @iamthekwan
    @iamthekwan 3 роки тому +2

    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!

  • @KevinLopez-rl6wq
    @KevinLopez-rl6wq 3 роки тому +4

    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?

    • @laravelisbullschitt3281
      @laravelisbullschitt3281 2 роки тому +1

      I've used Laravel for a long time (its my job) but outside of work Im looking at Trongate and can definitely see its potential for solving the problems I want without a complex overhead like Laravel. I don't know what they mean by packagist being broken?! PSR just defines a standard way of implementing a solution, in case of autoloader there is only one command anyway its difficult not to follow the standard method, but where Trongate is different is it doesn't use namespaces....I can see why for simplicity but if the market place grows class name is collision will be unavoidable, and his solution of simply renaming the classes doesn't sound like a robust enough solution.....

    • @lionelthetechlead8839
      @lionelthetechlead8839  2 роки тому +3

      Well let's take a look at trongate and I'll get back to you.

    • @KevinLopez-rl6wq
      @KevinLopez-rl6wq 2 роки тому

      @@laravelisbullschitt3281 he doesn't use namespaces? that just seems silly.

  • @TheArmanist
    @TheArmanist 3 роки тому +2

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

    • @rxxt-sh1vj
      @rxxt-sh1vj 2 роки тому

      You cannot learn to make coffee unless you will try to make it .....if you will always purchase readymade then you will never learn to make it..So you should always build your own framework because it gives you power to unleash everything..Modern PHP frameworks are full of crap....and so abstract that you need a lot of experience to learn them instead I will always relying on building my own framework..If you examine laravel it has 6000-8000 files and thousands of classes just when you install it ...however you can build a blog website from scratch will just have 100-150 files written from scratch and the performance increase will be 10x...:D

  • @mahinchowdhury3995
    @mahinchowdhury3995 2 роки тому

    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.

  • @militant_sans-frontieres
    @militant_sans-frontieres 2 роки тому +1

    yii yes it is!!!!!!

  • @rangingaway92
    @rangingaway92 4 місяці тому

    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.

    • @lionelthetechlead8839
      @lionelthetechlead8839  4 місяці тому

      That's correct. If you reuse your own code it's a framework. Just your own.

  • @phillychannel394
    @phillychannel394 2 роки тому +1

    Pure core PHP is the Corvette and Laravel is the Toyota

  • @Noum77
    @Noum77 2 роки тому

    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...

  • @ClevergunsYT
    @ClevergunsYT 3 роки тому +1

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

    • @DavidMabiria
      @DavidMabiria 3 роки тому +1

      try udemy courses

    • @rockydods762
      @rockydods762 3 роки тому

      @@DavidMabiria nothing new just old courses

    • @DavidMabiria
      @DavidMabiria 3 роки тому +1

      @@rockydods762 Sure, they still apply

    • @laravelisbullschitt3281
      @laravelisbullschitt3281 2 роки тому

      @@DavidMabiria Most Udemy courses will be out of date version of Laravel by the time you try it, even I am getting sick of their constant rewrites.

    • @DavidMabiria
      @DavidMabiria 2 роки тому

      @@laravelisbullschitt3281 those courses are just guiding bases, the most important resource to use to learn is the official documentation & be part of that community

  • @atmanegara
    @atmanegara 3 роки тому +1

    what do you think about Yii 3?

    • @lionelthetechlead8839
      @lionelthetechlead8839  3 роки тому +1

      Still not yet in production. As a tech lead I normally wait till it's past beta. Let the core team figure out stuff.

  • @simongreenidge6454
    @simongreenidge6454 2 роки тому

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

    • @terryweb
      @terryweb 2 роки тому

      Simply PHP. The web hosting company doesn't care what framework has been used for your project.

    • @simongreenidge6454
      @simongreenidge6454 2 роки тому

      @@terryweb I appreciate your reply! Thanks!

    • @MrLinuxFreak
      @MrLinuxFreak 2 роки тому

      framework requires some scripts on the server. you should get vps and a basic knowledge how to install needed service. a dev ops probably will know or a sys admin

  • @Mickey_McD
    @Mickey_McD 2 роки тому

    Thanks for this insight!

  • @Shambhu384-l9h
    @Shambhu384-l9h 3 роки тому +7

    You always miss Symfony 😕

  • @damin1916
    @damin1916 2 роки тому

    thank you so much for this video!!!

  • @kuthub1989
    @kuthub1989 3 роки тому

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

  • @homeoffice3524
    @homeoffice3524 Рік тому +1

    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.

    • @lionelthetechlead8839
      @lionelthetechlead8839  Рік тому

      Yes you know your code but would a incoming dev be able to onboard quickly?

    • @homeoffice3524
      @homeoffice3524 Рік тому +1

      @@lionelthetechlead8839 Yes. I like to keep my work tidy and commented. When you start out setting up some frameworks is more complicated then code itself.

    • @lionelthetechlead8839
      @lionelthetechlead8839  Рік тому +1

      @@homeoffice3524 that's what any dev would say... but how long would a new team take to understand your code? One devs neat and tidy might be another dev's spaghetti code.

    • @rangingaway92
      @rangingaway92 4 місяці тому

      ​@@lionelthetechlead8839 That just makes the point that companies need the framework, not the devs.

  • @reebaljavedkhan
    @reebaljavedkhan 2 роки тому

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