Jump to content

The PHP OOP Tutorial that works for ME


wrave

Recommended Posts

Last week I posted a request for help with my PHP coding style. Right away the discussion turned to MVC and OOP. I was lost. I am not sure that MVC should be introduced to a n00bie like me at the same time as OOP. I decided that I'd better find out more about OOP before tackling MVC. So I went on a search.

 

There are probably hundreds of OOP tutorials on the web, maybe thousands and sifting my way through them was actually disturbing for me.  :o I began to think I would never understand in a practical sense, what was going on. The fact is, many of them would lose me within the first paragraph or two. I had no mental hooks on which I could hang the terminology and it is aparently difficult for experienced PHP OOP coders to talk about this paradigm without drifting into rhapsodic passages that cannot be understood by the uninitiated. This isn't their fault, it's a difficult programming practice to comprehend for someone that is used to procedural programming.

 

Well, I found this one, written by Harry Fuecks for his "The PHP Anthology, Volume 1: Foundations"  that works for me...

 

http://www.webreference.com/programming/phpanth2/

 

...and maybe it'll work for you too.

 

I hope this doesn't break any forum rules. If posting off site tutorials is allowed, I suggest anyone that is trying to comprehend OOP in PHP and who is new to the concept and struggling, take a look at this one. I've been using PHP for a while abd built a couple of web apps so I had some of the basics down. I wanted to see a tutorial that introduced PHP OOP in a way that reflected how it can be used to build web pages. Maybe this is you too. Give this one a try and see what you think.

 

If I've broken some rule or posted to the wrong forum, I apologise and request one of the moderators to please move this to the proper place.

 

Happy coding y'all! ;D

Link to comment
Share on other sites

I enjoyed that book as well, it helped a lot.  But there are still brick walls I have to leap when creating OOP apps -- I'm working on a site now, and I'm going to post the code publicly when I'm done for review.

 

Even if you have the best teacher at something, regardless of what it is, if you don't do it, you'll never succeed or be any good at it.

Link to comment
Share on other sites

I have to agree with you that a lot of tutorials written out there tend not to think about the basic concept of jargon as being one of the main hangups and this is not just OOP based! When I first heard about methods and properties, contructors, destructors I was like "wow sounds a bit complicated" but when I realised that properties are just another word for variable, and methods are just another word for functions I actually began to see the light!

 

I am just starting out in OOP myself, in fact I have been writing my first OOP app at work, and I still have grey areas.

 

The OOP tutorial I have seen here is good, but only to a degree, it doesn't show any real life uses of a class/interface/ abstract class practice that you can apply and think "oh yeah, know I see" but is still a very good tutorial.

 

I will certainly take a look at the tutorial you supplied, hopefully those grey areas will dissipate :)

Link to comment
Share on other sites

I am not surprized to see that others have difficulties like those I encountered a couple of weeks ago when I first started looking into OOP. But the tutorial I presented when I started this topic has been the most enlightening one I've found so far. It was clear and concise and not written like I already knew what a constructor was or how a function could be of much use if it didn't have a return value.

 

This tutorial is an excerpt from a book that, from what I can tell, is no longer being published, although I think they offer a PDF version of the PHP Anthology vol. 1. I have requested a PDF of the "Tips, Tricks and Hacks" book which contains three or four chapters (maybe just partial chapters) as examples of the book's contents. If it's as good as what I've seen so far I may have to get myself copies.

 

I'm glad that some have found it useful.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.