Should You Learn Object Oriented PHP?

Should You Learn Object Oriented PHP?

Dani Krossing

1 год назад

11,981 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@training7574
@training7574 - 08.06.2024 20:57

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.

Ответить
@selamitumer2431
@selamitumer2431 - 08.05.2024 12:02

Thanks, Dani :)

Ответить
@ariasabe
@ariasabe - 12.03.2024 03:54

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.

Ответить
@pixtweaks393
@pixtweaks393 - 24.02.2024 11:17

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.

Ответить
@nlegacysolo
@nlegacysolo - 13.02.2024 23:19

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

Ответить
@daveturnbull7221
@daveturnbull7221 - 16.01.2024 08:45

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.

Ответить
@SXsoft99
@SXsoft99 - 19.09.2023 22:10

I just mix and match

Ответить
@ComputerWorldModernInc
@ComputerWorldModernInc - 08.09.2023 05:23

Break it down!👍

Ответить
@scott-richardson
@scott-richardson - 08.09.2023 03:36

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.

Ответить
@petruciucur
@petruciucur - 06.09.2023 13:14

An excellent, for me, clarifying presentation.

Ответить
@shoot2kill445
@shoot2kill445 - 28.08.2023 13:37

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

Ответить
@hotwings9382
@hotwings9382 - 25.08.2023 23:03

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.

Ответить
@andrejkocsis4671
@andrejkocsis4671 - 02.08.2023 15:09

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.

Ответить
@GerritforBazeja
@GerritforBazeja - 28.07.2023 14:32

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

Ответить
@OmaniProgrammer
@OmaniProgrammer - 11.07.2023 17:29

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

Ответить
@crowbr
@crowbr - 10.07.2023 14:12

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!

Ответить
@jediampm
@jediampm - 09.07.2023 15:02

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)

Ответить
@CsMuia
@CsMuia - 08.07.2023 16:27

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

Ответить
@normbograham
@normbograham - 08.07.2023 12:27

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.

Ответить
@fenderbender2096
@fenderbender2096 - 08.07.2023 02:45

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

Ответить
@mmelimahlobo7656
@mmelimahlobo7656 - 07.07.2023 21:13

You just cannot escape OOP

Ответить
@rodgence9641
@rodgence9641 - 07.07.2023 19:22

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

Ответить
@emmanuelmuswalo2302
@emmanuelmuswalo2302 - 07.07.2023 16:47

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 😁

Ответить
@tanzimibthesam5861
@tanzimibthesam5861 - 07.07.2023 16:41

Nice i thought u were onto Game development now

Ответить
@Stoney_Eagle
@Stoney_Eagle - 07.07.2023 16:38

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.

Ответить
@v1nc3ntjr
@v1nc3ntjr - 07.07.2023 16:00

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

Ответить
@chocobo1
@chocobo1 - 07.07.2023 15:12

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?

Ответить
@temidayooladele9856
@temidayooladele9856 - 07.07.2023 15:11

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

Ответить
@JaroldVincent-hq2xe
@JaroldVincent-hq2xe - 07.07.2023 14:00

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.

Ответить
@salehabuhussein5229
@salehabuhussein5229 - 07.07.2023 13:45

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

Ответить
@phemelomogatusi8495
@phemelomogatusi8495 - 07.07.2023 12:56

For now Procedural is good for me.

Ответить
@yousifky
@yousifky - 07.07.2023 12:53

Daniiiiiii plsssssssssssssssss
Make JS tuts ❤

Ответить