Sei sulla pagina 1di 16

YII FRAMEWORK

K.LAHARI
16QP1A0427
IV-YEAR-ECE
ABSTRACT
• Yii is a high-performance component-based PHP framework for developing large-scale
Web applications. It enables maximum reusability in Web programming and can
significantly accelerate the development process.

• The name Yii (pronounced as Yee or [ji:] ) stands for easy, efficient and extensible Yii is a
generic Web programming framework that can be used for developing virtually all sorts
of Web applications. Because it is light-weighted and equipped with sophisticated
caching solutions, it is especially suitable for developing high-traffic applications, such
as portals, forums, content management systems (CMS), e-commerce systems, etc

• Like most PHP frameworks, Yii is an MVC framework. Yii excels over other PHP
frameworks in that it is client, feature-rich and clearly-documented. Yii is carefully
designed from the beginning to it for serious Web application development. It is neither
a byproduct of some project nor a conglomerate of third-party work. It is the result of the
authors' rich experience of Web application development and the investigation and
rejection of the most popular Web programming frameworks and application.
INTRODUCTION
YII implements the model-view-controller (MVC) design pattern
which is widely adopted in Web programming.
MVC aims to separate business logic from user interface considerations
so that developers can more easily change each part without affecting
the other.
 In MVC, the model represents the information (the data) and the
business rules; the view contains elements of the user interface such as
text, form inputs; and the controller manages the communication
between the model and the view.
Besides MVC, Yii also introduces a front-controller, called application,
which represents the execution context of request processing.
Application resolves the user request and dispatches it to an
appropriate controller for further handling.
Existing and Proposed Systems
The Yii project includes a repository of user-
contributed extensions.
There was also an official extension library, zii, which
was eventually merged with the core framework; it has
been bundled in every release since Yii version 1.1.0,
and includes additional behaviors and widgets, such as
grids and jQuery.
Technology
1.The installation instructions described here are a
short summary, you may want checkthe Definitive
Guide for more detailed instructions.
2.Choose one of the application templates to start
installing Yii 2.0.
3. An application template is a package that contains
a skeleton Web application written in Yii which you
can start building your application from. 4.If you
just start with Yii, we recommend the installation of
the basic template.
Modules
A module is an entity that has its own models, views, controllers, and
possibly other modules. It is practically an application inside the
application.
Step 1 − Create a folder called modules inside your project root. Inside
the modules folder, create a folder named hello. This will be the basic
folder for our Hello module.
Step 2 − Inside the hello folder, create a file Hello.php with the
following code.
We have just created a module class. This should be located under the
module's base path. Every time a module is accessed, an instance of
the correspondent module class is created. The init () function is for
initializing the module's properties.
Step 3 − Modify the config/web.php file.
Architecture
1. A user makes a request with the URL
http://www.example.com/index.php?r=post/ show &id=1 and
the Web server handles the request by executing the bootstrap
script index.php .
2. The bootstrap script creates an application instance and runs
it.
3. The action renders a view named show with the Post model.
4. The view reads and displays the attributes of the Post model.
5. The view executes some widgets.
6. The view rendering result is embedded in a layout
Features
Model-View-Controller (MVC) design pattern.
Generation of complex WSDL service specifications and
management of Web service request handling.
Internationalization and localization (I18N and L10N),
comprising message translation, date and formatting,
number formatting, and interface localization.
Layered caching scheme, which supports data caching, page
caching.
Error handling and logging. Log messages can be
categorized, filtered and routed to different destinations.
Error handling on logging and security.
Fundamentals of YII
Model-view-controller(MVC)
Application Base director
Entry Script
Debug Mode
Controller
Action
Filter
Layout
Widget
Advantages
Component based
 Security, too, is a strong point, with a number of easily-
accessible features to protect one’s site from cyber attack.
Even better is the fact that once you’ve gotten the hang
of things,Yii’s incredibly extensible; easily customized
both through internal scripting and compatibility with
third-party code.
Model view controller
Database access object
Documentation
Disadvantages
It is approach that does not support most innovative
modern to PHP
Development world the release of PHP 5.3 an version 6
 Difference are you developers that PHP 5.3/6.0 needs
frame work had to be scartch.
Yii also has a relatively steep learning curve – even as
frameworks go, meaning it can be difficult to use for
new developers.
Applications
Core Application Components. Yii predefines a set of
core application components to provide features
common among Web applications.
For example, the request component is used to collect
information about request and provide information
such as the requested URL and cookies.
Conclusion
Yii does not need to be installed under a web-
accessible directory.
An You application has one entry script which is
usually file to web users
Other PHP scripts, including from Yii,web access be
for hacking
List of website Yii framework
http://www.builtwithyii.com/
http://www.slideonline.com/
http://www.finekors.com/
http://yii.poweredsites.org/
Thank You

Potrebbero piacerti anche