Personally I use functions but this is many due to the fact that I have not found any good reason to use classes yet.
Your thoughts and views on this would be great
Moderator: General Moderators
i was the same way... didn't really understand what I was missing until I got into them a little bit. I was about a third of the way through writing a complete shopping cart system some years ago when I scrapped everything and rewrote it using OO techniques. smartest decision i ever made.JPlush76 wrote:When I first started I couldn't grasp the need of classes. Now I couldn't live without them. Classes interacting with each other is a heaven sent!
There are links to tutorials in this sticky. Also, have a look at the tutorial section of http://www.zend.com, they also have one about object oriented programming.mudkicker wrote:i still use functions, because i really can't understand the way using classes... am i a DUMB?
![]()
![]()
![]()
can someone really teach me?
![]()
![]()
i agree with you. totally!!!delorian wrote:I choose classes, because I like OO ProgramingNo I was just joking. I use classes, because they give me a great oportunity to code closed modules which works like an... hmm... object
, each by itself. I don't have to think if that function is needed here or not, in class everything is needed. Other great thing is that, when someone write class for me, it's easier to know what the hell is going out there
. Functions are great where it's up to some small counter, but in big application OO is a must.
On the small scale maybe, but I feel this is a little short term. You can get some reuse from functions, but you are always limited. With functions data is either global or you have to pass it around. Global data is the enemy of reuse, and yet passing and marshalling of data incurs an overhead. As applications get larger these two factors squeeze terribly.BDKR wrote:I feel that in a web environment, execution time takes precedence. I feel comfortable saying this becuase I know code reuse and a good clean design can be had without the use of objects.