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?
 

shanatron

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

janvanaa

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

Judge Dredd

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

crazycroc

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

ParanoiaPlus

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

bosconian

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

rodserd

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

Paro

New member
We want to learn the correct PHP OOP implementation. There are PHPframeworks such as CakePHP, CodeIgniter, and Laravel that correctly .
 
Top