Model-View-Control Using Yii Framework (PHP)
--
Implementing Model-View-Control (MVC) concept in Web Application Development using PHP and Yii Framework
Model View Control (MVC) concept benefits web application developers particularly in terms of 1) writing reusable and extendable code, 2) separating view logic from business logic, 3) allowing simultaneous work between developers and designers and ultimately 4) producing codes that are easy to maintain.
In PHP Programming World, Yii Framework has been regarded as a high performance, component-based PHP framework for rapidly developing modern Web applications. Yii is a generic framework, meaning that it can be used for developing all kinds of Web applications. Because of its component-based architecture and sophisticated caching support, it is especially suitable for developing large-scale applications such as portals, forums, content management system (CMS), e-commerce projects, RESTful Web Services and so on.
This course blends the MVC principle with the Yii Framework to equip the participants with both the concept and practical implementation of it.
Duration: 5 Days
Outlines
1) Getting started with Yii Framework
2) Understanding Router, Controller and Views
3) Using AJAX and jQuery in Yii
4) Working with Forms
5) Testing your applications
6) Database, Actie Record and Model Tricks
7) Using Zii Components
8) Extending Yii
9) Error Handling, Debugging and Logging
10) Security
11) Performance Tuning
12) Using External Code
13) Deployment
1) Getting started with Yii - provides information about the most interesting Yii features hidden under the hood: events, import, autoloading, exceptions, component, widget configuration, and many more.
2) Router, Controller, and Views - Handy things concerning the Yii URL router, controllers, and views: URL rules, external actions and controllers, view clips, decorators, and more.
3) AJAX and jQuery - focus on the Yii's client side that is built with jQuery—the most widely used JavaScript library out there. It is very powerful and easy to learn and use. This topic focuses on Yii-specific tricks rather than jQuery itself.
4) Working with Forms - shows how Yii makes working with forms a breeze and documentation on it is almost complete. Still, there are some areas that need clarification and examples. Some of the topics covered in this chapter are creating validators and input widgets, uploading files, and using and customizing CAPTCHA.
5) Testing Your Application - covers unit testing, functional testing, and generating code coverage reports. Recipes follow a test-driven development approach. You will write tests for several small applications and then implement functionality.
6) Database, Active Record, and Model Tricks - working with databases efficiently, when to use models and when not to, how to work with multiple databases, how to automatically pre-process Active Record fields, and how to use powerful database criteria.
7) Using Zii Components - covers data providers, grids, and lists: How to configure sorting and searching, how to use grids with multiple related models, how to create your own column types, and more.
8) Extending Yii - shows not only how to implement your own Yii extension but also how to make your extension reusable and useful for the community. In addition, we will focus on many things you should do to make your extension as efficient as possible.
9) Error Handling, Debugging, and Logging - reviews logging, analyzing the exception stack trace, and own error handler implementation.
10) Security - provides information about keeping your application secure according to the general web application security principle "filter input, escape output." We will cover topics such as creating your own controller filters, preventing XSS, CSRF, and SQL injections, escaping output, and using role-based access control.
11) Performance Tuning - shows how to configure Yii to gain extra performance. You will learn a few best practices for developing an application that will run smoothly until you have very high loads.
12) Using External Code - focus on using third-party code with Yii. We will use Zend Framework, Kohana, and PEAR but you will be able to use any code after learning how it works.
13) Deployment, covers various tips that are especially useful on application deployment, when developing an application in a team, or when you just want to make your development environment more comfortable.
--