Book Image

Mastering Yii

By : Charles R. Portwood ll
Book Image

Mastering Yii

By: Charles R. Portwood ll

Overview of this book

The successor of Yii Framework 1.1, Yii 2 is a complete rewrite of Yii Framework, one of the most popular PHP 5 frameworks around for making modern web applications. The update embraces the best practices and protocols established with newer versions of PHP, while still maintaining the simple, fast, and extendable behavior found in its predecessor. This book has been written to enhance your skills and knowledge with Yii Framework 2. Starting with configuration and how to initialize new projects, you’ll learn how to configure, manage, and use every aspect of Yii2 from Gii, DAO, Query Builder, Active Record, and migrations, to asset manager. You'll also discover how to automatically test your code using codeception. With this book by your side, you’ll have all the skills you need to quickly create rich modern web and console applications with Yii 2.
Table of Contents (20 chapters)
Mastering Yii
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
5
Modules, Widgets, and Helpers
13
Debugging and Deploying
Index

Chapter 6. Asset Management

Modern web applications are made up of many different components. Second only to functionality, the presentation of our application might be considered the most important aspect of our application. Presentation of our user interface and the corresponding user experience is vital to building excellent web applications. In web applications, the presentation and experience is usually defined by Cascading Style Sheets (CSS), and JavaScript files. With raw HTML, we can include any necessary scripts and styles we need to, however often we need to handle our assets in a programmatic way (such as when using modules, components, or widgets). To help manage our assets, we can use a combination of third-party tools and Yii2's built-in asset manager. In this chapter, we'll cover how to use Yii2's asset management tools, as well as cover several third-party tools we can use to simplify management of our asset files.