Student Seminar Report & Project Report With Presentation (PPT,PDF,DOC,ZIP)

Full Version: Yii [easy, efficient and extensible php framework]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
PRESENTED BY:
Honeyson Joseph D

[attachment=12070]
introduction
Yii is a high-performance component-based PHP framework for developing large-scale Web applications
Yii is a generic Web programming framework, used for developing virtually all sorts of Web applications
Yii is a Model View Controller framework
CREATING AN Yii APPLICATION
For creating Web application we use a powerful yiic
tool which can be used to automate code creation for
certain tasks.
For simply, we assume that YiiRoot is the directory
where Yii is installed, and WebRoot is the document
root of our Web server.
Step 0. Preparation
After installing the Yii framework, run a simple console command
“% YiiRoot/framework/yiic webapp WebRoot/testdrive “
to generate a skeleton Web application built with Yii.
This will create a skeleton Yii application under the directory WebRoot/testdrive.
Step 1. Create the Database
While Yii can virtually eliminate most repetitive coding tasks, you are responsible for the real creative work.
This often starts with designing the whole system to be built, in terms of some database schema
Step 2a. Yii Generates the Model Classes
Using the built-in Web-based code generator, you can turn database table definitions into model classes instantly, without writing a single line of code.
The model classes will allow you to access the database tables in an object-oriented fashion.
Step 2b. Yii Generates the CRUD Code
Using the code generator, we can further generate code that implements the typical CRUD (create, read, update, delete) features for the selected database tables.
The generated code is highly usable and customizable, following the well-adopted MVC (model-view-controller) design pattern.
Step 3. You customize the code to fit your exact needs
Finally we customize the code to fit our exact needs.
For example,
to hide the password column on the user administration page, simply cross out the 'password' element shown in the user admin view file:
features of Yii
Database Access Objects (DAO), Query Builder
Yii allows developers to model database data in terms of objects and avoid the deadliness and complexity of writing repetitive SQL statements.
Form input and validation
Yii makes collecting form input extremely easy and safe. It comes with a set of validates as well as numerous helper methods and widgets to simplify the task for form input and validation.
- Authentication and authorization
Yii has built-in authentication support. It also supports authorization via hierarchical role-based access control
- Skinning and theming
Yii implements a skinning and theming mechanism that allows you to quickly switch the outlook of a Yii-power website.
- Layered caching scheme
Yii supports data caching, page caching, fragment caching and dynamic content. The storage medium of caching can be changed easily without touching the application code.
- Automatic code generation
Yii provides a set of spontaneous and highly extensible code generation tools that can help you quickly generate the code you need for features such as form input, CRUD.
- Purely object-oriented
Yii framework sticks to strict OOP paradigm. It does not define any global function or variable. And the class hierarchy that it defines allows maximum reusability and customization.
- Error handling and logging
Errors are handled and presented more nicely, and log messages can be categorized, filtered and routed to different destinations.
- Security
Yii is equipped with many security measures to help prevent your Web applications from attacks such as SQL injection, cookie tampering etc.
Disadvantages of Yii framework
Yii is written in approach that does not support the
most innovative, modern advantages brought to PHP
development world with release of PHP 5.3 and soon
– PHP version 6.
Conclusion
Yii does not need to be installed under a Web-accessible directory.
An Yii application has one entry script which is usually the only file that needs to be exposed to Web users.
Other PHP scripts, including those from Yii, should be
protected from Web access since they may be exploited for hacking.