Overview of framework
1 / 21

Overview of Framework - PowerPoint PPT Presentation

  • Uploaded on

Overview of Framework. by Ahamed Rifaudeen A. Steps before entering into the Framework?. Required Knowledge?. Basic knowledge of object-oriented programming (OOP) in php5 Database programming (Mysql, Sqlite3)

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Overview of Framework' - jamal-hines

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Overview of framework

Overview of Framework


Ahamed Rifaudeen A

Steps before entering into the framework
Steps before entering into the Framework?

Required Knowledge?

  • Basic knowledge of object-oriented programming (OOP) in php5

  • Database programming (Mysql, Sqlite3)

  • These are things that makes you the better understanding the frameworks easily.

page - i

Cms vs framework
Cms Vs  Framework


  • Cms (Content-Management-System) is a type of Framework,

  • But generally limited towards making website with article/page type content with an out of the box article management system.

  • Mostly of the cms are focused on article management system.


  • A Framework provides often used web development boilerplate code.

  • They can...

    • MVC paradigm

    • URL parsing and handling

    • Templating

    • Better request handling

page - ii

What is framework
What is Framework?


  • A set of reusable libraries or classes for a software is generally called as Frameworks

  • Model-View-Controller (MVC)

  • Push-based vs. pull-based

  • Three-tier organization

Types of Framework:

page - 1

Model view controller mvc
Model-View-Controller (MVC)


  • Consist of any business logics

  • Ex: database connection, user authentication, and etc..,


  • Consist of site layouts, and designs

  • Ex: html files


  • Controls the model and view

  • Decides Which model needed and which content is to be shown

page - 2

Yii framework
Yii Framework

Yii is a high-performance light weight framework

Yii Stand for – Yes It Is

Yii Framework is a Open Source Framework

Yii Framework implements MVC Architecture

Yii introduces a front controller called Application

Application collects information about a user request and dispatch it to an appropriate controller

Version 1.1.13 is the current stable version

Download @ www.yiiframework.com

page - 3

Installing and configuring yii
Installing and Configuring Yii

Installing Yii Framework

  • Extract Downloaded Zip file into your server root

  • Ex:

    Save @ C:\wamp\www\

Configuring Yii Framework

  • Set environment variables

  • Append php path (C:\wamp\bin\php\php5.2.6) with path in the Environment Variables

page - 4

Creating a new application
Creating a new application

With Command Prompt

  • Change directory to your framework root

page - 5


  • Type yiic

page - 6


Syntax: yiic webapp path/to/demoProject

  • Ex: yiic webapp C:\wamp\www\demoProject

Testing our demoProject

  • Locate the browser wihhttp://localhost/demoProject/

  • Our project available with four menu

page - 7

Structure of yii application
Structure of Yii Application

  • Index.php the bootstrap file

  • Application the front controller

  • App components used by our application

  • Controller controlling model and views

  • Model contains business logics, database and other inputs collected through forms

  • View contains user interface

  • Widget probably embeded in view files mainly for presentational purpose

page - 8

Application workflow
Application workflow

User requests http://www.webrobo.in/index.php?r=post/show&id=1

Application object created.

Application gets information about request.

Application determines the requested controller and action.

Application creates an object of requested controller.

Action reads a post model whose ID is 1

Action renders a view

View reads and display data from post model

View execute some widgets

View embeds the result in a layout

Action completes the rendering and display result to the user

page - 9

Yii framework folder structure
Yii Framework Folder Structure

Our Project folder contains 5 folders

page - 10


Protected folder is a base folder contains 12 sub folders

page - 11


page - 12

Important folders of yii framework
Important Folders of Yii Framework

Inside Protected folder

  • Config

  • Controllers

  • Models

  • Views

page - 13


Contains Application Configuration file

  • main.php is the application configuration file

  • Contains application level configurations such as

    application path, name, database configuration and etc..,

page - 14


Contains our controllers


  • File name must be same as class name

  • All Controllers must starts with Capital letter and end with Controller

  • All controller classes must extends Controller class (located @ located at protected/ components/Controller.php )

  • Example:

    For site controller

    File name: SiteController.php

    Class name: SiteController

page - 15


Contains ContactForm, LoginForm and our database models etc..,

  • ContactForm used by SiteController to manage contact form data.

  • LoginForm used by SiteController to manage login action.

  • And other Models Files(database).

  • All Business logics are resides here.

page - 16


Contains View files for each controllers and layout of the website

  • Each Controller has its view files .

  • Controller name is Same as the folder name except the word Controller.

  • Layout files are reside inside layout folder.

page - 17

Eof overview
Eof Overview

Thank You...

page - 1