Using the Model-View-Controller (MVC) design pattern, the look of a Yii-based site is naturally controlled by the View files. These files are a combination of HTML and PHP that help to create the desired output. Specific pages in a site will use specific View files. In fact, the View files are designed to be broken down quite atomically, such that, for example, the form used to both create and edit an employee record is its own file, and that file can be included by both create.php and update.php. As with most things in OOP, implementing atomic, decoupled functionality goes a long way towards improving reusability. But the individual View files are only part of the equation for rendering a Web page. Individual view files get rendered within a layout file. And although I’ve mentioned layouts a time or two in my writings on Yii, it’s a subject that deserves its own post. Continued…
Subscribe to Larry’s Newsletter
Use your browser to subscribe to the blog's RSS feed, if you'd like. You can also subscribe to Larry's monthly (email) newsletter by providing the information below. Click the NEWSLETTER > ARCHIVES link above to view examples. I sometimes give away copies of my books through the newsletter, if you need further enticement.
Series
Tags
99designs about ajax Amazon app article blog book books cdn cloudfront css3 database e-commerce ecom flash builder framework hosting html html5 html forms ide jquery jsdd mamp mobile mvc newsletter nosql oop performance php6 phpmysql4 phpvqp3 phpvqs4 programming security software ui user interface utilities video writing yii zend
