My First step to create a class, how 2 start and from where
Moderator: General Moderators
My First step to create a class, how 2 start and from where
Helo every1 in dev network,
i want to konw how i should start to work on classes from the basic. imean from where exactly to start ...
i hope u al in this network wil not disappoint me.
i need ur support plz
thnx
i want to konw how i should start to work on classes from the basic. imean from where exactly to start ...
i hope u al in this network wil not disappoint me.
i need ur support plz
thnx
If you had read up and understood the basics of classes and OOP, you would know about functions. I suggest buying a copy of Harry Fueck's PHP Anthology which will give you all the background you need to get going.vsaggu wrote:no, i hvent. <span style='color:blue' title='ignorance is bliss'>you</span> know what. i hve understood the basic of classes and oops. but the thing is how to implement in real code. like first i want to start wth normal functions and then mysql connections
I would start using ADOdb..
And then write a class that is able to generate SQL.. (For example, an SQL query has a couple of clauses.. Having can only be used when GroupBy exists.. Might be a nice exercise to train relationships/dependencies etc
)
And then write a class that is able to generate SQL.. (For example, an SQL query has a couple of clauses.. Having can only be used when GroupBy exists.. Might be a nice exercise to train relationships/dependencies etc
You'll get there.scrotaye wrote:I've never tried to use a class, or even understood why I would need to. I guess I should get on the ball, eh.
My book recommendation is "Introduction to Object Oriented Programming" by Timothy Budd.
As for need, Object Oriented Design or Responsibility Driven Design helps one visualize a complex system into component parts each having it's own area of responsibility or function if you prefer. When a complex system is envisioned and created in this manner, it's easier to design, maintain, and extend. Furthermore, the components lend themselves to use in other systems as they (ideally) should be as stand alone as possible.
Hope that helps.
Cheers,
BDKR
hey
whats the matter with u theda, and thnx patrikG. i wil try to find this book first.
I learned by doing, and I learned to do, by reading. Here is a great book...
PHP5 and MySQL Bible... which can be found on Amazon...
http://www.amazon.com/exec/obidos/tg/de ... s&n=507846
PHP5 and MySQL Bible... which can be found on Amazon...
http://www.amazon.com/exec/obidos/tg/de ... s&n=507846
I have a few good links on my website you might find interesting.
http://www.jonhibbard.com/link/view.php ... n=phplinks
The OOP links are located near the bottom...
http://www.jonhibbard.com/link/view.php ... n=phplinks
The OOP links are located near the bottom...