Hi there,
Has anyone got any good links for learning how to effectively design and use PHP classes for OOP?
I have searched the web and seen plenty of pages, to the point where I am overwhelmed with information, lots of it duplicated.
I would appreciate links from you good folk here in the PHP forum - you haven't let me down before
Thanks in advance...
BTW - a poll - are classes better than just custom functions????Dunt really know any good online stuff, php.net is ok, though sometimes kinda vague.
Anyway, what specifically about classes/oop are you having problems with, perhaps some one here could try and help explain it better to clearify things a bit for you.I am not having problems as such, it is just that I am starting to develop a huge PHP web-app and was wondering whether it was better to go solely for functions, or actually try and make a stand-alone class. The interface is between a webpage and a realtime database called Datascope (noone outside the seismic/earthquake community will have heard of it ) and I am trying to make the code for the interface as simple and clean as possible, and also easily customizable for anyone who wants to install PHP on their servers and interact with their own databases. HTH clarify my goal a little.
Thx.php 4.x is not all that up and ready for OOP, php5 is suppose to be better handling it.
my site has some links to tutorials there. check them out.The very first step to OOP is to learn what OOP is, the benefits and the five concepts. Once you have this grounding knowledge you will be able put together potential objects and methods more readily. This part of the learning curve can be completely independent of the language you ultimately choose to develop in - in fact you are better off not learning a language's interpretation of OOP as you will end up inherenting (no pun intended) any of that language's nuances.
Here is an excellent OOP tutorial:
<!-- m --><a class="postlink" href="http://homepages.unl.ac.uk/~chalkp/proj/ootutor/sitemap1.htmlIf">http://homepages.unl.ac.uk/~chalkp/proj ... ap1.htmlIf</a><!-- m --> you are planning to build a large web application, OO is a must, and software design patterns might help you make a very portable system.
When you're comfortable with OO, read some articles at <!-- w --><a class="postlink" href="http://www.phppatterns.com">www.phppatterns.com</a><!-- w -->. If you have questions about those things, or need ideas on how to structure your application, I would suggest that you take a look in the Advanced PHP Forum at sitepoint.com (<!-- m --><a class="postlink" href="http://www.sitepoint.com/forums/forumdisplay.php?f=147">http://www.sitepoint.com/forums/forumdisplay.php?f=147</a><!-- m -->). You'll find some real professionals there, they really know what they're talking about.
Let me point out again that this is good reading only once you know OO! Go there, have a look, and then bookmark the sites. Reading that stuff at this point would be overwhelming to most people!
Good luck! Programming is much more fun when OO!
hth Thanks everyone. I have read some of the articles and they seem to be pitched at my level (ie. low!).
In particular the John Coggeshall onLAMP articles have helped me out.
Cheers!
Has anyone got any good links for learning how to effectively design and use PHP classes for OOP?
I have searched the web and seen plenty of pages, to the point where I am overwhelmed with information, lots of it duplicated.
I would appreciate links from you good folk here in the PHP forum - you haven't let me down before
Thanks in advance...
BTW - a poll - are classes better than just custom functions????Dunt really know any good online stuff, php.net is ok, though sometimes kinda vague.
Anyway, what specifically about classes/oop are you having problems with, perhaps some one here could try and help explain it better to clearify things a bit for you.I am not having problems as such, it is just that I am starting to develop a huge PHP web-app and was wondering whether it was better to go solely for functions, or actually try and make a stand-alone class. The interface is between a webpage and a realtime database called Datascope (noone outside the seismic/earthquake community will have heard of it ) and I am trying to make the code for the interface as simple and clean as possible, and also easily customizable for anyone who wants to install PHP on their servers and interact with their own databases. HTH clarify my goal a little.
Thx.php 4.x is not all that up and ready for OOP, php5 is suppose to be better handling it.
my site has some links to tutorials there. check them out.The very first step to OOP is to learn what OOP is, the benefits and the five concepts. Once you have this grounding knowledge you will be able put together potential objects and methods more readily. This part of the learning curve can be completely independent of the language you ultimately choose to develop in - in fact you are better off not learning a language's interpretation of OOP as you will end up inherenting (no pun intended) any of that language's nuances.
Here is an excellent OOP tutorial:
<!-- m --><a class="postlink" href="http://homepages.unl.ac.uk/~chalkp/proj/ootutor/sitemap1.htmlIf">http://homepages.unl.ac.uk/~chalkp/proj ... ap1.htmlIf</a><!-- m --> you are planning to build a large web application, OO is a must, and software design patterns might help you make a very portable system.
When you're comfortable with OO, read some articles at <!-- w --><a class="postlink" href="http://www.phppatterns.com">www.phppatterns.com</a><!-- w -->. If you have questions about those things, or need ideas on how to structure your application, I would suggest that you take a look in the Advanced PHP Forum at sitepoint.com (<!-- m --><a class="postlink" href="http://www.sitepoint.com/forums/forumdisplay.php?f=147">http://www.sitepoint.com/forums/forumdisplay.php?f=147</a><!-- m -->). You'll find some real professionals there, they really know what they're talking about.
Let me point out again that this is good reading only once you know OO! Go there, have a look, and then bookmark the sites. Reading that stuff at this point would be overwhelming to most people!
Good luck! Programming is much more fun when OO!
hth Thanks everyone. I have read some of the articles and they seem to be pitched at my level (ie. low!).
In particular the John Coggeshall onLAMP articles have helped me out.
Cheers!