1internet Posted June 25, 2013 Share Posted June 25, 2013 (edited) I have been learning php for just over a year now, and am getting pretty good at procedural coding. But now I can feel it is time to take it to the next step and be all about OOP. I have tried to learn some MVC, but at this stage I feel it is a bit too advanced for me, and am not quite ready for such a jump. So I was wondering what is a more basic design pattern, to just get started with OOP and getting used to classes. So starting out, how is this usually done? Does each new page have its own class, e.g. products.php, and classes/products.php, and the product.php will just call various methods from the class? Or would there just be a library folder for different classes, and you include whichever class you need to use at a time? Should there be a general class or classes that are called on every page? I guess I am asking what would be a good basic design pattern or structure to get strated with OOP? Edited June 25, 2013 by 1internet Quote Link to comment Share on other sites More sharing options...
Strider64 Posted June 26, 2013 Share Posted June 26, 2013 (edited) I found a book "PHP Advanced and Object-Oriented Programming" by Larry Ullman (Third Edition...though the Fourth Edition might be out now). This is the first book that OOP started making sense to me and he teaches you how to do a CMS using MVC (though he says MVC isn't technically a design pattern), though as he calls it a light form of MVC. I usually don't recommend books for I have come across some clunkers or they were way over my head, but not with this book. I'm still learning new things about OOP and still consider myself a newbie compared to others (specially ones who post here), though I find can look at OOP and understand what they are trying to do (In some cases what not to do. ) Edited June 26, 2013 by Strider64 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.