Académique Documents
Professionnel Documents
Culture Documents
Software Engineer
9th feb,2012
About Yii
free, open-source Web application development framework written in PHP5 brainchild of its founder, Qiang Xue You have full control over the configuration from head-to-toe Fast, secure, professional
Credits
Prado: Yii adopts its component-based and eventdriven programming paradigm, database abstraction layers, modular application architecture, internationalization and localization, and many of its other features and patterns. Ruby on Rails: Yii referenced its implementation of the active record design pattern for its ORM layer. jQuery: This is integrated in Yii as the foundational JavaScript framework. Symfony: Yii referenced its filter design and plug-in architecture. Joomla: Yii referenced its modular design and message translation scheme.
Features
MVC Database Access Object Form validation Authentication and authorization Skinning and theming Web service i18N and L10n Layered cashing scheme
Features
Error handling and logging Security Unit and functional testing Automatic code generation Friendly with third-party code Detailed documentation Extension library
MVC
example of an AR insert
CREATE TABLE tbl_post ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, title VARCHAR(128) NOT NULL, content TEXT NOT NULL, create_time INTEGER NOT NULL ); $post=new Post; $post->title='sample post'; $post->content='post body content'; $post->save();
The storage medium of caching can be changed easily without touching the application code.
Security
Cross-site Scripting Prevention using
HTML Purifire
Cross-site Request Forgery Prevention CHtml::form method will embed the necessary random value in a hidden field so that it can be submitted for CSRF validation Cookie Attack Prevention Yii implements a cookie validation scheme that prevents cookies from being modified.
Testing
unit and functional testing The testing supported provided by Yii requires PHPUnit and Selenium Remote Control The most basic unit is function Functional test on module Create the required file structure for testing
Refercnce
http://www.yiiframework.com/ http://en.wikipedia.org/wiki/Yii http://www.phpframeworks.com Yii 1.1 Application Development Cookbook