This is a discussion on "Do you OOP?!" within the PHP Forum section. This forum, and the thread "Do you OOP?! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Do you OOP?!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hi,
I'm currently studying, and we've been made to write all our PHP scripts in OOP. I'm not complaining, I do see the advantages of using it on large projects. I guess what I'd like to know is, do you use it in your job? I work for myself at the moment and it seems more trouble than its worth cause i'm only making sites for small retailers etc... Is it 'bad' to use procedural code in the real world, when working with others? Thanks for your points of view! Jim. |
|
|
|
|||
|
Re: Do you OOP?!
I use it very sparingly but i still use it sometimes
|
|
|||
|
Re: Do you OOP?!
I haven't realy found it to be useful for anything other then as a alternative to arrays. But I never realy figured out what the point of opp is anyways.
|
|
|||
|
Re: Do you OOP?!
If you're just writing a single stand alone application, OO may not do much for you but when you start coming up with application after application that uses the same type of data, then OO methodology can be a huge help with your code reuse in the second, third, forth page application even though it possibly slowed you down on the first one.
I do a fair amount of coding and I use objects to handle things like training note modules, student test questions, and web access log data which I'm processing time after time in many different ways. I do not use objects for other requirements where I'm not expecting to be using the code many times over. And I do have to admit to some regret in NOT going for an OO approach in one or two cases ... but by the time I regret not taking the approach, I've written two or three applications and it would be toolate to change over. -- Graham |
|
|||
|
Re: Do you OOP?!
Not seen u post in a while Grahame, where u been?
|
|
|||
|
Re: Do you OOP?!
Quote:
Forum wise, I've been reading ... but just answering where I feel I have something to contribute, and it's been a bit quiet here in my areas of specialty! Graham |
|
|||
|
Re: Do you OOP?!
wow, you have been busy
|
|
|||
|
Re: Do you OOP?!
I've seen some clever stuff done with OOP. So clever, only the person who wrote it really understood what it was doing.
I think it's over hyped. You have to be really sure that you are writing reusable routines or extendable objects to make it worth while. Otherwise stick with well structured procedural code. Break everything in to task specific functions and call the functions as required. I've even found that well written procedural code can run faster but that's rarely an issue these days. |
![]() |
| Tags |
| oop |
| Thread Tools | |
|
|