O'Reilly logo

Pro PHP MVC by Chris Pitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 8

images

Templates

At the heart of MVC is separation of concerns, and nowhere in our framework is that more important than between the view and the controller. Typically, when one thinks about the front end (or client side) of an application, they think of HTML, CSS, and JavaScript. Throw in server-side interaction, and an unavoidable portion of PHP enters the picture.

What’s worse is we will often need to work with data, supplied to us by the controller, using PHP directly in our views. Many people have tried solving this problem with template languages (and parsers). It might not make a whole lot of sense—substituting PHP for yet another intermediary ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required