Jump to content

Using OOP because of personal preference unnecessarily...


Attilitus

Recommended Posts

There is a kind of mystique in being able to take a unique "case" dynamically manipulate parameters, and then "SET" it. You can throw everything you want into a properly coded class, check the information while it is still magically suspended in the object, and then finally send off the data to the nearest database.

 

It is a cool concept... but it is also something that is basically useless abstraction. There is a significant performance difference when using objects... it is just a fact of life especially with PHP4. (Lets face it, in a language like PHP that is relatively robust and fast, objects just don't stand as tall as the language's array components).

 

However, I still find myself using OOP practices in just about all my coding. I find that it takes about the same amount of time to get everything "written" and I can better debug the technical aspects of my code by having a self contained class who's separate components can be individually "checked" and "ran" separately.

 

Ultimately, however, alot of this stuff is never going to be used again, and it is hardly "too complicated" to code procedurally.

 

Are any others out there like me, and enjoy using OOP simply because of the way it allows you to "think through your code" and even more imporantly, easily debug the individual components of your script?

 

I hear extensibility, maintainability... but really I just use OOP because I like it better and it is easier for me to write.

 

Any thoughts?

Link to comment
Share on other sites

The only type of application that I deem OO to be unecessary is a one off, small script for converting filenames in a given directory, or similar.

 

If I am creating an application that needs to be extensible, maintainable and easy to test, it will, without a doubt, be OO, and I actually challange anyone to satisfy all of that criteria without using OO, then provide a convincing argument to not use OO.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.