Jump to content


Photo

OOP functions VS. plain standard functions


  • Please log in to reply
3 replies to this topic

#1 massive

massive
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 25 May 2006 - 04:39 AM

whats the diff. from reusing functions for future projects using plain standard functions w/o OOP from reusing functions w/ Object oriented programming?

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 May 2006 - 06:47 AM

Far too many to say Im afraid, and this question gets asked all the time. Objects provide allot more functionality than procedural functions.

#3 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 25 May 2006 - 06:02 PM

I think the major advantage is that objects can inherit functions from a parent class, so you can have a base class that will do most of the work, and the rest will just extend it. It's like have the function one time or copying 500 times.

NoGray.com


#4 massive

massive
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 26 May 2006 - 05:42 AM

while i was waiting for your replies i tried to search the benefits of an oo-programming heres the link



[a href=\"http://www.onlamp.com/pub/a/php/2005/07/28/oo_php.html?page=1\" target=\"_blank\"]http://www.onlamp.com/pub/a/php/2005/07/28...php.html?page=1[/a]



i hope this would also help others regarding to my question :)



@ nogray and thorpe i thank you for your reply :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users