Do you OOP?!

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 19th, 2006, 13:35
Up'n'Coming Member
Join Date: Feb 2006
Location: London
Age: 25
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Question Do you OOP?!

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.
Reply With Quote

  #2 (permalink)  
Old Apr 20th, 2006, 18:22
Junior Member
Join Date: Apr 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Do you OOP?!

I use it very sparingly but i still use it sometimes
Reply With Quote
  #3 (permalink)  
Old Apr 21st, 2006, 03:40
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #4 (permalink)  
Old Apr 21st, 2006, 21:29
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #5 (permalink)  
Old Apr 21st, 2006, 23:22
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Do you OOP?!

Not seen u post in a while Grahame, where u been?
Reply With Quote
  #6 (permalink)  
Old Apr 22nd, 2006, 04:18
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Do you OOP?!

Quote:
Originally Posted by sypher
Not seen u post in a while Grahame, where u been?
Thanks for asking. In the last two months ... London, Melksham, Gloucester, Liverpool, Halifax, Dublin and Glasgow. Not to forget Taunton and Bristol .... Next week Oxford then Oban, next month, Cambidge, Preston and Saudi Arabia by the looks of things. Oh - and we're working on a residential wing / hotel to go with our training centre

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
Reply With Quote
  #7 (permalink)  
Old Apr 22nd, 2006, 10:57
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Do you OOP?!

wow, you have been busy
Reply With Quote
  #8 (permalink)  
Old Apr 24th, 2006, 07:08
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: Do you OOP?!

Good to see you around grahame. Back on topic now...
Reply With Quote
  #9 (permalink)  
Old Apr 24th, 2006, 11:12
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
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.
Reply With Quote
Reply

Tags
oop

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 20:42.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43