homepage Welcome to WebmasterWorld Guest from 54.166.148.189
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php oop
Lolalola




msg:4145178
 8:43 pm on Jun 1, 2010 (gmt 0)


Hi,

On this site I found a lot of cool examples of PHP OOP. Maybe you know where to find complete examples? Guest books, registration forms, blog...

When I look at the full model is much easier to understand OOP PHP. As different classes interacting with each other, exchange data How to use the generic class for sending data to the database

Thanks

 

redhatlab




msg:4145202
 9:08 pm on Jun 1, 2010 (gmt 0)

Hi,

You might be better off trying out a PHP framework like Cake, Symphony or Zend.

FourDegreez




msg:4146048
 2:42 am on Jun 3, 2010 (gmt 0)

The book PHP 5 Objects, Patterns, and Practice by Matt Zandstra was something I found quite useful.

nil111




msg:4146213
 11:42 am on Jun 3, 2010 (gmt 0)

class One {
function one_func(){
return 'hello';
}

}

class Two {
function two_func(){
return 'world';
}
}

//to access the functions of the above classes assuming they r on the same page
$one = new One();
$two = new Two();
print $one->one_func().' '.$two->two_func();

Matthew1980




msg:4146226
 12:06 pm on Jun 3, 2010 (gmt 0)

Hi there Lolalola,

I too am just starting to learn OOP, and am finding it quite alot of fun, especially when it works. For places of reference php.net is the best place as a start point - but we all have our different ways of learning. I started php years ago, and decided to learn OOP when I had got the hang of just writing a script, and honing it to function better so that the background experience would pay off when trying a new way of structuring a site. I'm glad I made that choice.

One thing to be wary of is the differences between the PHP4 and PHP5 class engine/structure, as this has caught me out a few times in the last day or two.

My advice: Start with something simple, learn how things are structured, and see how they interact - see what happens when you change var types etc - this is how I have gone about it.

There are a few decent books out, just depends on how much you are willing to pay.

Have fun with whatever you decide to go with.

Good luck!

Cheers,
MRb

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved