Jump to content

[SOLVED] HELP me see the light.


phpSensei

Recommended Posts

People keep talking about OOP, and I just can't see the ligth. Why use classes, and in all my php projects, I was successful without using php classes.

 

I have made an entire forum, and I have it on my site, and I havnt used classes at all.

 

If it is for the ease of it then show me. I just don't understand...

 

Considere this question a help in php.

Link to comment
https://forums.phpfreaks.com/topic/66443-solved-help-me-see-the-light/
Share on other sites

It just helps to create logical groupings for similar code. It also gives you the ability to create complex datatypes. The other big advantage is its reusability. With classes you can drop your code on a new application and take off knowing it works and not rewriting code.

 

That being said OOP is still procedural programming in a lot of ways. Yes you have objects that represent things and perform special actions but it's still down pretty sequentially as opposed to an event driven environment like .NET.

You're wrong.

 

Why would you ever want to rewrite code? You do it right the first time and then you forget the details of how it works. This gives you the ability to drive out efficiencies in your own development processes in methodologies so that you can more quickly develop complex applications. Furthermore, having a set of classes makes maintenance easier moving forward because you're always working from a common framework/environment.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.