3. Intro
Yii (Yes, it is) is a fast, secure, and efficient PHP framework developed in 1st
January 2008 by Qiang Xue
Key benefits:
Used base on DRY(Don’t Repeat Yourself) principle
Object Oriented Framework
Component-base Framework
Build on PHP5
Clearly documented
4. Features of Yii – 1st part
• MVC
• Database Access Objects(DAO), Query Builder,Active Record
• Form Input and Validation
• Ajax – enabled widgets
• Authentication and Authorization
• Skinning and Theming
• Web Services
• Detailed documentation
5. Features of Yii – 2nd part
• Internalization (I18N) and localization(L10N)
• Layered caching scheme
• Error handling and logging
• Security
• Unit and Functional testing
• Automatic code generation
• Friendly with third-party code
• Extension Library
11. • is a tool that allows you query database table and manipulate data from a
database using an object paradigm (Object Oriented). ORM is library
which helps you in query the data using functions so that PHP developer
do not have to write database query manually.
ORM(Object-Relational Mapping)
12. Active Record
ActiveRecord is the base class for
classes representing relational data in
terms of objects.
Active Record(AR( is popular ORM
technique. Each AR class = to database
table.
16. Log Messages
• Recording log messages is as simple as calling one of the following
logging methods:
• Yii::debug(): record a message to trace how a piece of code runs. This is
mainly for development use.
• Yii::info(): record a message that conveys some useful information.
• Yii::warning(): record a warning message that indicates something
unexpected has happened.
• Yii::error(): record a fatal error that should be investigated as soon as
possible.