What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

Is it worth it to learn PHP OOP?

bauss

Junior Member
I've been programming in PHP & MySQL for years, but I never got around to learning PHP OOP because I hate learning new programming languages, but I enjoy programming.


Do you think it's worth it to learn OOP? What are some of the benefits of PHP OOP?
 
With OOP you get the can use some frameworks that implement it and give you a lot of boilerplate code so that you don't need to code everyhting from the ground up. Code Igniter is one of them. But teh best part is that with OOP you can re-use a lot of classes.
 
Personally I find that your code is much more organised and easy to manage when written in OOP, especially if implemented in an MVC framework. There are many different frameworks available such as codeigniter or symphony2, but I'd advise you to write your own.
So you'll fully understand it. You won't have to reinvent the wheel all the time.

Here in the Netherlands when looking for a job as, for instance, a PHP developer, OOP style coding within an MVC framework is almost always a requirement.
 
I think the ONLY thing you should use in large scripts is OOP. People who suggest otherwise usually don't have much experience. I dislike the fact that some people INSIST on using procedural in large scripts. Prime example: SMF.
 
I think the ONLY thing you should use in large scripts is OOP. People who suggest otherwise usually don't have much experience. I dislike the fact that some people INSIST on using procedural in large scripts. Prime example: SMF.

SMF doesn't use OOP design? That's surprising considering how popular it is.
 
Yes. My first PHP project utilized an API that somebody else wrote. The API had no documentation, and I didn't no OOP at the time! After learning it was much easier to work with, and I even rewrote parts of the API! Even without this anecdotal evidence, OOP really cleans up your code and can improve your workflow. However, if you have a very small script, then it's not worth implementing OOP.
 
I think you should try learning OOP with PHP. You say you hate learning new programming languages but you won't be learning a new language. You already know PHP and are familiar with it's sintax, you will only learn a new paradigm, a new way of doing things with the language.
 
OOP is always worth it. It multiplies the effectiveness of your code by several times, and greatly reduces the amount of code you need if you find yourself doing similar things all the time.
 
We want to learn the correct PHP OOP implementation. There are PHPframeworks such as CakePHP, CodeIgniter, and Laravel that correctly .
 
Movies, clips and interesting videos ussr video . Read only relevant posts or see photos and videos on the topics of Video and the USSR . The best Soviet films online for free in good quality The movie selection service will help you choose Rare Soviet films to your taste and tell you where you can watch them online
 
I've been programming in PHP & MySQL for years, but I never got around to learning PHP OOP because I hate learning new programming languages, but I enjoy programming.


Do you think it's worth it to learn OOP? What are some of the benefits of PHP OOP?
If you enjoyed programming like you said, then you should be open to learning as many programming languages that you can. I know that starting out from the scratch with a new programming language can be a pain but it's not impossible.
 
Back
Top