Learning OO with PHP

I started to learn OO programming, but using PHP using the PHP 5 Objects, Patterns and Practice book. The fact is that I want to learn how to use CakePHP at the same time, which uses a lot of MVC patterns. Since I don't know much about OO and less about MVC, I want to understand later, but the assumptions that I make with my knowledge of OO may have bad returns in the long run.

Does anyone know a good tutorial on what MVC means (more than cakephp manual says this, but easier to read / understand than wikipedia)?

Ty

+6
oop php model-view-controller cakephp
source share
5 answers

Here is a great PHP MVC tutorial at phpro.org to get you started. . I had problems with the MVC design pattern, but after reading this tutorial I learned so much that I continued to create an excellent OOP tutorial on phpfreak

+8
source share

If you just want to learn more about MVC, why not check out the book on design patterns? Since MVC is just a design pattern, most sample books will contain it and more. Book template design is good to read if you also start OO topics. You can check the catalog of Martin-Fowler online catalogs or order a book, for example Headfirst Design Samples

+5
source share

Php Objects, Templates, and Practices are a bit of a difficult entry point for OOP. This was my first source on this subject, and after the initial grounding, it is pretty dense. Having said that, I return to it again, and again and again, this is the final text for PHP OOP IMO, which is hard to start with.

I found Aaron Saray's book on PHP design patterns - and that's great. He takes all these abstract examples from the book above and shows you how you could implement them in your daily work. He lacks some of the details and theory of the first, but he complements it well.

http://www.wrox.com/WileyCDA/WroxTitle/Professional-PHP-Design-Patterns.productCd-0470496703.html

MVC - (or rather, Front Controller) is a little monster to try to understand first - it is better to play with the framework before doing this. The page controller is the best introduction to the concept of MVC.

http://www.phpwact.org/pattern/page_controller

I agree that PHP OOP is dirty, but hey, VHS is not as good as Betamax, and you can adequately learn the concepts of OOP in PHP (and deploy them to a web host ...) - although I would suggest that Ruby is probably easier to understand than Java (not something I also learned, just indulged with both)

+1
source share

You really need to understand OOP before individual OO design paradigms such as MVC. I would also suggest using ruby ​​or java to learn OOP, as PHP OOP is pretty nasty in its syntax.

0
source share

PHP has a very poor OOP model. If you want to learn OOP, it is best to start with simple and clean Java, and if you want rock and roll, try C ++. :)

OOP has been added to PHP as the fifth leg for the dog. Of course, use it, it is very useful in web projects, but it has some conceptual and syntactic flaws.

0
source share

All Articles