Should You Learn Object Oriented PHP?

Поделиться
HTML-код
  • Опубликовано: 6 июл 2023
  • So, do you have to learn object oriented PHP to learn PHP? Occasionally I comments under my OOP PHP videos, telling my viewers that "object oriented PHP is bad", followed be a list of reasons... So I would like to clarify why you should learn Object Oriented PHP in order to fully become a PHP developer. 🙂
    My OOP PHP Course: • 1: Introduction To OOP...
    My 2023 PHP Course: • 1 | Introduction to PH...
    ➤ GET ACCESS TO MY LESSON MATERIAL HERE!
    First of all, thank you for all the support you have given me!
    I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
    I am now using Patreon and RUclips Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.
    I hope you will find it helpful :)
    Memberships: / @dani_krossing
    Patreon: / mmtuts

Комментарии • 42

  • @temidayooladele9856
    @temidayooladele9856 11 месяцев назад +13

    I just migrated to writing PHP as OOP and I am absolutely loving it, I am sticking to procedural for small non-scaling projects but using using the OOP for scalable projects obviously because it maintainable and neater

  • @crowbr
    @crowbr 11 месяцев назад +8

    I Learned PHP with you almost 3 years ago... i got my first job with PHP and change my life, today i'm working with javascripts. thanks man!

  • @ariasabe
    @ariasabe 3 месяца назад +4

    your employer will establish which tech stack and programming method you will work with, and OOP is widely use in the real world and that is why you should learn it.

  • @scott-richardson
    @scott-richardson 9 месяцев назад +5

    I'd like to add that you can find a middle-ground, insofar as having a fully procedrual/functional site/app with files and functions all split out like you would in OOP/classes. This is how we build our apps within our agency, and it works really well. Not to say OOP couldn't work well, but for us, procedural/functional with very organised files, splitting out of functions into various self-contained files, allows us to have zero duplication, and many of the benefits of the OOP 'approach' without the somewhat more complex code structure.

  • @emmanuelmuswalo2302
    @emmanuelmuswalo2302 11 месяцев назад +8

    Thanks to this guy am now a full stack developer. Been following his lessons past 3 to four years. Am even in the route of opening my dream company 😁

  • @hotwings9382
    @hotwings9382 9 месяцев назад +5

    Hi Dani, you're the person who made php make sense to me. For the past months i have been reteaching myself and practicing making my own frameworks in different ways. I have a few websites deployed on the cloud and i am now redoing them using OOP.

  • @training7574
    @training7574 5 дней назад

    Very useful overview for a beginner, thanks! I am building a personal website and will not tinker much about it in the future, at most once a year. I think I would find it easier in the future to understand what I originally planned if I stay with procedural solutions.

  • @Stoney_Eagle
    @Stoney_Eagle 11 месяцев назад +4

    OOP for the win, it's soo much easier to work with blueprints.
    What I like the most about php is you don't have to include something from somewhere but just include the file and all variables and methods are available.

  • @daveturnbull7221
    @daveturnbull7221 4 месяца назад +1

    I'm no expert in any form of coding in any language however I think your comment that these are just tools is absolutely spot on. The same statement can also be applied to which language do you write your code in as well as a great many other aspects of life (which is the best hammer for driving that nail? Should I use my sledge hammer or would the pin hammer be better suited to the task?). You evaluate the project and decide which is going to give you the required results.

  • @rodgence9641
    @rodgence9641 11 месяцев назад +1

    Good explanation Thank you. we should select what method to use depending on the type of application we are building

  • @petruciucur
    @petruciucur 9 месяцев назад +1

    An excellent, for me, clarifying presentation.

  • @selamitumer2431
    @selamitumer2431 Месяц назад +1

    Thanks, Dani :)

  • @GerritforBazeja
    @GerritforBazeja 10 месяцев назад

    Tnx Daniël, this gives a good overview of the possibilities

  • @mmelimahlobo7656
    @mmelimahlobo7656 11 месяцев назад +2

    You just cannot escape OOP

  • @jediampm
    @jediampm 11 месяцев назад +1

    Hi thanks for the video.
    if you go to use a full framework like codeigniter, symfyny or laravel, the basics of php are not enough, you need the basics of OOP.
    if you find a online course telling you that to learn a full php like laravel you only need the basics of php, think twice or more.
    If you are connecting to a DB is better to use PDO then a specif drive like mysqli ( which allows procedure way) because is a universal / generic driver for any SQL DB. And to use PDO you need to know the basics of OOP
    Either way, you should know the basic of OOP And some time use with procedure way.
    Or you can use the mix of the two in functional way (which is sometimes laravel or codeigniter do)

  • @TuncayKaptan
    @TuncayKaptan 11 месяцев назад +3

    0:39 "Is it something you should learn" (Yes) :D

  • @JaroldVincent-hq2xe
    @JaroldVincent-hq2xe 11 месяцев назад +1

    I believe people who insists on procedural havent worked in a large team with complex code bases where the benifits of OOP outshines its cons. OOP just makes more sense in those cases.
    Although I really dont like the idea of PHP to be embedded directly into the View. But I understand thats one spec of PHP that makes it unique.

  • @normbograham
    @normbograham 11 месяцев назад +1

    all OOP, is trivially slower in execution. However, OOP, is just plain cooler. But, when I code for myself, I usually prefer faster for the final product.

  • @andrejkocsis4671
    @andrejkocsis4671 10 месяцев назад

    Currently I’m not using OOP, however, since I like to use JavaScript and post method in it, I’m ending up with huge number of files and folders. I have folder for php, js, css, imgs, etc. I feel that the page is organised in somewhat similar way. I have a page with some forms and plus I have a bunch of various files doing things I need for the page.

  • @v1nc3ntjr
    @v1nc3ntjr 11 месяцев назад

    before watching this video, i really dont know what are procedural or OOP, i just have coded a PHP site/app for data entry, but i hope i get alot of knowledge in this video

  • @phemelomogatusi8495
    @phemelomogatusi8495 11 месяцев назад +3

    For now Procedural is good for me.

  • @Izkawi33
    @Izkawi33 11 месяцев назад

    Mr Dani will you make a new php oop course? With projects

  • @CsMuia
    @CsMuia 11 месяцев назад +2

    In my opinion, one needs to learn Procedural as a beginner.

    • @Dani_Krossing
      @Dani_Krossing  11 месяцев назад +2

      Totally agree. Procedural is best for learning the fundamentals first, and then OOP afterwards.

  • @nlegacysolo
    @nlegacysolo 4 месяца назад

    I think this is a good explanation, however I dont think a beginner (with no OOP experience) would understand this and definitely no one new to PHP. This is because I remember when I first started learning more advanced PHP and a lot of lango that you get used to saying after writing thousands of lines of code is not understood by any newbie until they by luck cross that one video where that one guy explains something in layman’s terms, so it finally kicks in. For example, a method is the same thing as a function, only diff is it is a function within a class. If you use the word “method” to a person who hasn’t really learned OOP, this is not going to register in a way that sticks. And imho, properties and variables are also different names for the same thing because one is in a class and one is not, but they serve the same purpose. None of this was understood by me at first. When I watched tutorials where people used classes, if only they had of explained that, I wouldn’t have had to keep searching for that one video which made it all stick in my brain so I didnt need a tutorial. Interestingly, it wasnt until I was seeking to learn how to make an MVC framework that classes & methods finally did not seem over complicated even tho every vid I had watched made it seem complicated because trying to understand $this-> just wasn’t sticking. It’s one thing to copy the code from a video, but it’s another thing to understand it and be able to do the same thing without watching a tutorial.😏

  • @chocobo1
    @chocobo1 11 месяцев назад

    I know this is one of those nooby questions but I'm having a bit of a panic, I feel pretty competent with HTML, CSS, and PHP (kind of), but I've entered a software / webdev workplace and basically none of that is used, they are using angular / CSS and the implication was that PHP is outdated. My goal is to get my own wee website up and running and I constantly feel like I'm just behind the times. Is PHP still useful or is it a bit antiquated nowdays?

    • @babaganoush8105
      @babaganoush8105 11 месяцев назад +1

      Depends which country your in. PHP is one of the best programming languages you can learn if you want to become a freelancer. There's tons of jobs for wordpress, laravel and magento developers as well. Even though no one builds websites on vanilla php nor vanilla javascript, learning laravel (OOP PHP) and a modern front-end framework like vue.js will not only make you feel better but it will also help you land a well paying job

    • @Dani_Krossing
      @Dani_Krossing  11 месяцев назад +5

      Most of the time when people say PHP is outdated, it is because they think PHP is the same as it was many years ago, back when it was around PHP 5. The current PHP 8 is modern, constantly being updated with new features, and in NO WAY outdated. 🙂 80% of ALL websites wouldn't use PHP, if it was "outdated"... 👈
      I'm guessing you are working with some older gentlemen, who have experience using a older version of PHP hehe. Which is perfectly understandable, but unfortunately it is very common to hear people down about PHP, because they don't stay up to date with its improvements over the past many years.
      It's unfortunately one of those awkward moments where people say "PHP is outdated", but ironically they out themselves out for being "outdated developers" by not having stayed up to date with how languages are developing... 😕 So if you are sitting in a workplace that uses Angular, AND are incredibly closed minded about staying up to date with other languages, then I can understand your panic hehe.
      I'd like to mention, that there is absolutely nothing wrong with using Angular, since it is also a good option. 😊 The issue here, is your workplace stating that "PHP is outdated"... 😅
      The important point for you to take from this reply, is that you are MUCH better off knowing PHP for website backend development, than learning Angular. Angular is ALSO good to have in your backpack, but most places use PHP. You are just in a situation atm, where you are in a work environment that prefer Angular over PHP, which unfortunately isn't the language that you have learned... 💁 And to top it off, they have told you wrongful information, that makes you feel that PHP is a waste.
      Usually whenever searching for a job, the company will list out which languages, frameworks, and CMS systems they use at their company, to make it easier to find developers who know the same skills. 🙂 I'm sure there is a good reason for how you ended up in a company, where they use a language you aren't familiar with. So from my point of view, you are in a situation where you need to ask yourself if you are willing to take a crash course in Angular hehe. 🙂

    • @chocobo1
      @chocobo1 11 месяцев назад +1

      @@Dani_Krossing Thank you so much for your response, I really appreciate it. You hit the nail on the head, I'm early 30s and working with people in their late 40s-50s with a lot more experience than me. I basically changed career from counselling/psychology to IT and am trying to work my way up from entry QA into some coding work. I really love the type of work, but I feel so behind and I had this big panic that I'm behind + learning what I've been told is an outdated language which isn't relevant in the workforce anymore!
      I'm thinking that I'll just keep going with PHP, with the hopes that I can transfer the concepts over into this workplace at some stage.
      Again, thanks heaps for what you do and for taking the time to respond

  • @ComputerWorldModernInc
    @ComputerWorldModernInc 9 месяцев назад

    Break it down!👍

  • @salehabuhussein5229
    @salehabuhussein5229 11 месяцев назад +1

    It's not about good or not in my company we are using yii2 it's MVC so we use OOP

  • @shoot2kill445
    @shoot2kill445 9 месяцев назад

    You should do a project tutorial using OOP PHP. Maybe it'll be easier to understand where and how everything works when it come coding in object oriented programming

    • @Dani_Krossing
      @Dani_Krossing  9 месяцев назад +1

      I have a OOP PHP login system project on my channel, which teaches some of the basics of how to use it 🙂

  • @yousifky
    @yousifky 11 месяцев назад +4

    Daniiiiiii plsssssssssssssssss
    Make JS tuts ❤

    • @Dani_Krossing
      @Dani_Krossing  11 месяцев назад +3

      JS is getting very popular according to recent research, so might get back into it soon on the channel 🙂

    • @yousifky
      @yousifky 11 месяцев назад

      @@Dani_Krossing Yes please 🙏 😍

  • @SXsoft99
    @SXsoft99 8 месяцев назад

    I just mix and match

  • @pixtweaks393
    @pixtweaks393 3 месяца назад

    I think none of extremes are good. Only OOP and no OOP. I'm for start with modular/procedural and when it comes for scenario where not using OOP is silly, I use it. For example e-shop order should be an object, but template displaying various parts, authors, price, stock should not be an object.

  • @tanzimibthesam5861
    @tanzimibthesam5861 11 месяцев назад

    Nice i thought u were onto Game development now

    • @Dani_Krossing
      @Dani_Krossing  11 месяцев назад

      I'm a multimedia designer, so I'm a bit like a Swiss army knife hehe.

  • @fenderbender2096
    @fenderbender2096 11 месяцев назад

    Dude... Are you aware of mainstream php frameworks?