tags:

views:

172

answers:

3

Hello,

I'm trying to learn to use PHP with an object oriented scheme. I think I understand the concept but I need real example, a forum exactly (the closest to what I want to do).

I know PhpBB but it's maybe too complicated to fully understand it so I'm looking for something simpler but still in object oriented.

Do you know any ?

Thank you

+1  A: 

To learn such things, there's nothing better suited as a real project. I'd suggest you look at an object oriented framework (Yii maybe) and try to write your own small forum (that requires much more than only objects but database access and user management and... - most of that comes built in the framework).

Juri Keller
thank you but the idea is to adapt an existing project (with user management and a kind of small forum) into object oriented. I wanted to have a look at existing project to see how pros do.
Martin Trigaux
+2  A: 

Vanilla http://vanillaforums.org/, has a really nice api, especially V2, currently in development. Uses MVC. It is also the lightest forum I know.

With that said, you might want to read a book on this subject as well this thread (http://stackoverflow.com/questions/90924/what-is-the-best-php-programming-book) has some nice lists.

partoa
thank you I'll look at it. Concerning the book I'm already reading the one proposed in the post you mention (PHP object patterns and practice)
Martin Trigaux
My pleasure. Happy hunting!
partoa
A: 

The thing that really made OOP click for me was working with data access. Write an abstract data access class (DAO) that encapsulates your most common read/write methods (select, selectByID, selectWhere etc). You'll find it useful and easy to expand on, and a good starting point for any data dependent code (like a forum)

sunwukung