Martijn Geerts Posted July 27, 2012 Share Posted July 27, 2012 I wished to make a module that enables OAuth2, for use with twitter of google API's etc. The big problem is I wish to build the module my self, but lack the knowledge. So the biggest wish first, to get some real good documentation about OOP. When I search the internet, the quality is not good enough or to difficult to start with. Next to that, I prefer some good podcasts cause I have some problems with reading. ( Dutch, English or German ) So does anyone know some good Video Tutorials or any good understandable information about OOP? Link to comment Share on other sites More sharing options...
SiNNuT Posted July 27, 2012 Share Posted July 27, 2012 I guess you already found it via Google but here is some stuff on PHP OOP, http://www.killerphp.com/tutorials/object-oriented-php/ Can't really judge the quality cause i myself lack knowledge in this department. Link to comment Share on other sites More sharing options...
Soma Posted July 27, 2012 Share Posted July 27, 2012 No need to really learn OOP to make PW modules. What knowledge do you think you lack? As with everything, start simple learn from the big ones. Look at how modules in core or third party are done, look at HelloWorld.module. Basic modules mostly only require 1 file and it's more about what type it should be and how it's done in PW. Learning OOP will help you only understanding the backgrounds. Not saying it's not good, but maybe just start and see where you get stuck, then come here and ask. You might even figure it out on yourself, but count on the community to guide you. I mentioned I always have had problems understanding OOP and read about it for years (java, actionscript, js etc), I'm still bad in wrapping my mind around it and build something from scratch (even still now), but just starting to do something always helped me a lot. And not surprisingly PW lead me to understand even more as before while doing some fairly advanced modules I did not think was possible. The wonderful thing is learning PW will help you elsewhere too. The year using PW I learned more than the previous 5 years! 4 Link to comment Share on other sites More sharing options...
WillyC Posted July 28, 2012 Share Posted July 28, 2012 oop easier than no.oop. how abowt real objet likes coffey maker. $m=new coffeymaker(): $m->fillcoffey('frenchyroast'); $m->fillwater('750ml'); $coffey=$m->brew(); $me=new WillyC(); $me->drink($coffey); $t=new toilet(); $me->pee($t); and that.all there,^b^b^b oops $t->flush(); and thatall there is now.youknow oop(ee) 4 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted July 28, 2012 Author Share Posted July 28, 2012 @SiNNuT, tnx for the reference. I followed that one a few weeks ago. Learned from it. @Soma, total agree with evething you said. Maybe I want to much at one. Remy Sharp for example gave me with his jqueryfordesigners a real good push for jQuery. Think this week continue with the start of an experimental module. ( just for learning ) @Willy C Are you "KutMasta Kurt's" brother ? Link to comment Share on other sites More sharing options...
Martijn Geerts Posted July 28, 2012 Author Share Posted July 28, 2012 Found a good playlist: jream Link to comment Share on other sites More sharing options...
SiNNuT Posted July 28, 2012 Share Posted July 28, 2012 Since you mentioned oauth in your first post, have you seen this module? http://modules.processwire.com/modules/social-twitter-update/ Looking over the code you can see that it is not even that hard to do nice stuff like this. Not that i am capable yet to do it myself but it does make sense when reading it. You can learn a lot this way, as Soma already mentioned. 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted July 28, 2012 Author Share Posted July 28, 2012 Didn't realize there was sucha plug-in. Many thanks, will look for it when have more time then I have today Link to comment Share on other sites More sharing options...
ryan Posted July 28, 2012 Share Posted July 28, 2012 Regarding learning OOP, WillyC actually makes a good point there about something that is kind of helpful in learning it. Thinking about interfaces in code the way you do interfaces with the objects you interact with in real life. Objects are meant to be self contained things that have defined inputs and outputs, hiding the [potentially complex] details of how it happens and just giving you predictable inputs and outputs. If you start relating objects in real life to their equivalent in code, things start to come together a little easier and it gets your mind in the right place. Stepping back from his toilet example and use something like a faucet instead. The inputs are knobs that set the temperature and strength of flow. And the output is water at the temp and flow you set. $faucet = new Faucet(); $faucet->setTemp(97); $faucet->setFlow(10); echo $faucet->render(); (or something like that) 3 Link to comment Share on other sites More sharing options...
kongondo Posted September 8, 2013 Share Posted September 8, 2013 Reviving this old thread. Luckily, since I'm only getting into PHP now, by going straight to OOP, I've not really had to unlearn some procedural PHP in order to grasp OOP. I found the following helpful: http://net.tutsplus.com/tutorials/php/object-oriented-php-for-beginners/ http://www.tutorialspoint.com/php/php_object_oriented.htm http://phpro.org/tutorials/Object-Oriented-Programming-with-PHP.html http://www.codewalkers.com/c/a/Programming-Basics/ObjectOriented-PHP-Fields-Properties-and-Methods/ http://www.massassi.com/php/articles/classes/ http://net.tutsplus.com/tutorials/php/from-procedural-to-object-oriented-php/ http://net.tutsplus.com/tutorials/php/real-world-oop-with-php-and-mysql/ PHP Academy tuts - videos 7 Link to comment Share on other sites More sharing options...
Recommended Posts