V Posted August 7, 2010 Share Posted August 7, 2010 I've been using procedural code since I started learning PHP. I hear good thinks about OOP but it looks scary. Does OOP function somehow like CSS? If you have experience with OOP, please share an example for us noobs, where you effectively use it. Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/ Share on other sites More sharing options...
sinista Posted August 7, 2010 Share Posted August 7, 2010 not that this will help you code OO PHP but the java site has some good explanations of the concepts of OO i found it quite, when i was trying to understand things http://download.oracle.com/javase/tutorial/java/concepts/index.html Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096288 Share on other sites More sharing options...
jcbones Posted August 7, 2010 Share Posted August 7, 2010 Best Tutorial I have found is here Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096352 Share on other sites More sharing options...
Zane Posted August 7, 2010 Share Posted August 7, 2010 Does OOP function somehow like CSS? Not at all. OOP is a method of programming that involves using Objects... hence the name Object Oriented Programming. You'd be fooling yourself from the get-go to try and compare it to CSS; even if you could find a correlation, well... best of luck to you. Just as sinista already pointed out, Java is one of the best ways to get your hands dirty with OOP; just because (well, I'm no Java expert) it only uses OOP. The first thing you'll learn in any Java tutorial is how to build the constructor. I don't think I can stress enough that you should definitely dip into Java to get a feel of OOP. Simple because, you don't use procedural code like you can in PHP. By procedural I mean, you simply typing one statement and having a result. Your best bet is to get a Beginner's guide to Java.. familiarize yourself with a compiler (like BlueJ or Netbeans) and go from there. When you actually do get to the point where you believe you understand what OOP is, then maybe you should come back and look at the differences PHP offers as an OOP language. Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096358 Share on other sites More sharing options...
sinista Posted August 7, 2010 Share Posted August 7, 2010 not that this will help you code OO PHP but the java site has some good explanations of the concepts of OO i found it quite, when i was trying to understand things http://download.oracle.com/javase/tutorial/java/concepts/index.html damn missing word, I was supposed to say ..of the concepts of OO i found it quite useful, (mainly because of some of the pictures), have just been reading some of the page from the PHP link above there pretty good Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096362 Share on other sites More sharing options...
V Posted August 8, 2010 Author Share Posted August 8, 2010 not that this will help you code OO PHP but the java site has some good explanations of the concepts of OO i found it quite, when i was trying to understand things http://download.oracle.com/javase/tutorial/java/concepts/index.html Thanks! I know java and javascript are different but I think I used some OOP in js (jquery) without knowing. Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096677 Share on other sites More sharing options...
V Posted August 8, 2010 Author Share Posted August 8, 2010 @jcbones that's a great tutorial! Thanks for the link @zanus I didn't realize that OOP is so involved. I thought it would be like learning how to use PHP functions. Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096679 Share on other sites More sharing options...
Alex Posted August 8, 2010 Share Posted August 8, 2010 You might want to take a look at this sticky: http://www.phpfreaks.com/forums/index.php/topic,294324.0.html Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096717 Share on other sites More sharing options...
V Posted August 8, 2010 Author Share Posted August 8, 2010 Thanks AlexWD, I should look at stickies more often Quote Link to comment https://forums.phpfreaks.com/topic/210061-oop-examples-for-noobs/#findComment-1096720 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.