开发者

Example of forum in Object Oriented PHP

开发者 https://www.devze.com 2023-01-03 11:50 出处:网络
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'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


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 (https://stackoverflow.com/questions/90924/what-is-the-best-php-programming-book) has some nice lists.


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).


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号