SlideShare a Scribd company logo
1 of 44
Download to read offline
www.folio3.com@folio_3
Agenda
 Folio3 – Company Overview
 Introduction to Yii
 Workflow (MVC)
 Installation Steps
 Features
 Some Code Samples
 Model
 Using Model from Controller
 Controller
 View
 Performance
Folio3 – An Overview
www.folio3.com@folio_3
Folio3 At a Glance
 Founded in 2005
 Over 200 full time employees
 Offices in the US, Canada, Bulgaria & Pakistan
 Palo Alto, CA.
 Sofia, Bulgaria
 Karachi, Pakistan
Toronto, Canada
What We Do
 We are a Development Partner for our customers
 Design software solutions, not just implement them
 Focus on the solution – Platform and technology agnostic
 Expertise in building applications that are:
Mobile Social Cloud-based Gamified
What We Do
 Areas of Focus
 Enterprise
 Custom enterprise applications
 Product development targeting the enterprise
 Mobile
 Custom mobile apps for iOS, Android, Windows Phone, BB OS
 Mobile platform (server-to-server) development
 Social Media
 CMS based websites for consumers and enterprise (corporate, consumer,
community & social networking)
 Social media platform development (enterprise & consumer)
 Gaming
 Social & casual cross platform games (mobile, web, console)
 Virtual Worlds
Areas of Focus: Enterprise
 Automating workflows
 Cloud based solutions
 Application integration
 Platform development
 Healthcare
 Mobile Enterprise
 Digital Media
 Supply Chain
Areas of Focus: Mobile
 Serious enterprise applications
for Banks, Businesses
 Fun consumer apps for app
discovery, interaction, exercise
gamification and play
 Educational apps
 Augmented Reality apps
 Mobile Platforms
Areas of Focus: Web & Social Media
 Community Sites based on
Content Management
Systems
 Enterprise Social
Networking
 Social Games for Facebook
& Mobile
 Companion Apps for games
Why Yii?
ISit fast? ...
ISit secure? ...
ISit professional? ...
ISit right for my next project?
Folio3
Yes It Is!
Yii – An Introduction
www.folio3.com@folio_3
Introduction
Yii is a free, open-source Web application
development framework written in PHP5 that
promotes clean, DRY design and encourages rapid
development. It works to streamline your
application development and helps to ensure an
extremely efficient, extensible, and maintainable
end product.
Source: http://www.yiiframework.com/about/
Introduction – Workflow (MVC)
Source: http://www.yiiframework.com/doc/guide/1.1/en/basics.mvc#a-typical-workflow
Introduction - Installation
Introduction - Installation
Introduction - Installation
Extract the framework folder to any directory with access rights
Introduction - Installation
Extract the requirements folder to a web-
accessible directory
http://www.example.com/requirements
Requirements
Introduction - Installation
Open console (Command Prompt) and run the following
command from a web-accessible directory
/path/to/php.exe /path/to/framework/yiic.php webapp
myfirstyiiapp
Introduction - Installation
That’s it!
Introduction – Installation - Summary
Download
Extract framework folder
Check requirements
Run install command from console
Introduction – Installation - Preview
Features
www.folio3.com@folio_3
Features
Features
 Skinning and theming
You can select theme at project level, controller level, action
level Or based on some condition in action.
 Error handling and logging
Errors are handled and presented more nicely, and log
messages can be categorized, filtered and routed to different
destinations.
Features
 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.
 Unit and functionality testing
Test-Driven Development - using PHPUnit and Selenium
Remote Control
Features
 Authentication and authorization
Yii has built-in authentication support. It also supports
authorization via hierarchical role-based access control.
 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.
Features – Extensions
Auth (59)
Caching (25)
Console (25)
Database (133)
Date and Time (31)
Error Handling (6)
File System (39)
Logging (37)
Mail (29)
Networking (25)
Security (20)
User Interface (606)
Validation (82)
Web Service (104)
Others (385)
Code Samples
www.folio3.com@folio_3
Model Class
class Post extends CActiveRecord
{
/**
* Retrieves a list of models based on the current search/filter conditions.
* @return CActiveDataProvider the data provider that can return the models based
on the search/filter conditions.
*/
public function search()
{
$criteria=new CDbCriteria;
$criteria->compare('content ',$this->content );
$criteria->compare('title ',$this->title ,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
}
Controller
class PostController extends Controller {
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id)
{
$post = Post::model()->findByPk($id);
if(!$post)
throw new CHttpException(404);
$this->render('view', array(
'post' => $post,
));
}
}
Using Model From Controller
Create
$post = new Post;
$post->title = 'sample post';
$post->content = 'post body
content';
$post->save(); <- This is validated
Select
$post=Post::model()->find(array(
'select'=>'title',
'condition'=>'postID=:postID',
'params'=>array(':postID'=>2),
));
Update
$post = Post::model()->findByPk(2);
$post->title = ‘New title’;
$post->save(); <- This is validated
View
$this->breadcrumbs=array(
'Posts'=>array('index'),
$post>title,
);
?>
<h1>View Post #<?php echo $post>id; ?></h1>
<?php $this->widget('zii.widgets.CDetailView', array(
'data'=>$post,
'attributes'=>array(
'title', 'content',
),
)); ?>
Performance
www.folio3.com@folio_3
Performance – Comparison with other frameworks
Source: http://www.yiiframework.com/performance
Performance – Lazy loading example
Schema
/**
* Create a relation in TblUser Model Class with User Role (tbl_role) table
*/
public function relations()
{
return array(
'userRole' => array(self::BELONGS_TO, 'TblRole', 'user_role_id'),
);
}
TblUserModel
Performance – Lazy loading example
<table>
<tr><th>User id</th><td><?php echo $user->id; ?></td></tr>
<tr><th>User name</th><td><?php echo $user->username; ?></td></tr>
<tr><th>Role</th><td><?php echo $user->user_role_id; ?></td></tr>
</table>
If a property of only user model is accessed, only that table will be queried
Performance – Lazy loading example
<table>
<tr><th>User id</th><td><?php echo $user->id; ?></td></tr>
<tr><th>User name</th><td><?php echo $user->username; ?></td></tr>
<tr><th>Role</th><td><?php echo $user->userRole->role_name; ?></td></tr>
</table>
If a property of related mode is accessed, only then it will query related model
Performance – Drupal & Yii
Source: http://erickennedy.org/Drupal-7-Reasons-to-Switch
Performance – Drupal & Yii
Source: http://erickennedy.org/Drupal-7-Reasons-to-Switch
Performance – Drupal & Yii
Source: http://erickennedy.org/Drupal-7-Reasons-to-Switch
References
 http://www.yiiframework.com
 http://www.yiiframework.com/extensions/
 http://www.yiiframework.com
 http://erickennedy.org/Drupal-7-Reasons-to-
Switch
Contact
 For more details about our Yii development services or
our web development expertise, please get in touch
with us.
contact@folio3.com
US Office: (408) 365-4638
www.folio3.com

More Related Content

What's hot

Brudnick Net Ppt Portfolio
Brudnick Net Ppt PortfolioBrudnick Net Ppt Portfolio
Brudnick Net Ppt Portfoliobrudnick1212
 
Microsoft Sharepoint 2013 : The Ultimate Enterprise Collaboration Platform
Microsoft Sharepoint 2013 : The Ultimate Enterprise Collaboration PlatformMicrosoft Sharepoint 2013 : The Ultimate Enterprise Collaboration Platform
Microsoft Sharepoint 2013 : The Ultimate Enterprise Collaboration PlatformEdureka!
 
Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms IntroductionSekhar Byna
 
Building Web Application Using Spring Framework
Building Web Application Using Spring FrameworkBuilding Web Application Using Spring Framework
Building Web Application Using Spring FrameworkEdureka!
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introductionCommit University
 
PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1ReKruiTIn.com
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...Nancy Thomas
 
RIA with Flex & PHP - Tulsa TechFest 2009
RIA with Flex & PHP  - Tulsa TechFest 2009RIA with Flex & PHP  - Tulsa TechFest 2009
RIA with Flex & PHP - Tulsa TechFest 2009Jason Ragsdale
 
Report on mall automation
Report on mall automationReport on mall automation
Report on mall automationSonu Patel
 
Entity frameworks101
Entity frameworks101Entity frameworks101
Entity frameworks101Rich Helton
 
App v 4.6 sp1 trial guide
App v 4.6 sp1 trial guideApp v 4.6 sp1 trial guide
App v 4.6 sp1 trial guideKishore Kumar
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorialvinayiqbusiness
 

What's hot (20)

Brudnick Net Ppt Portfolio
Brudnick Net Ppt PortfolioBrudnick Net Ppt Portfolio
Brudnick Net Ppt Portfolio
 
Microsoft Sharepoint 2013 : The Ultimate Enterprise Collaboration Platform
Microsoft Sharepoint 2013 : The Ultimate Enterprise Collaboration PlatformMicrosoft Sharepoint 2013 : The Ultimate Enterprise Collaboration Platform
Microsoft Sharepoint 2013 : The Ultimate Enterprise Collaboration Platform
 
Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms Introduction
 
Building Web Application Using Spring Framework
Building Web Application Using Spring FrameworkBuilding Web Application Using Spring Framework
Building Web Application Using Spring Framework
 
Fwdtechseminars
FwdtechseminarsFwdtechseminars
Fwdtechseminars
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introduction
 
PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
37727897 Oaf Basics
37727897 Oaf Basics37727897 Oaf Basics
37727897 Oaf Basics
 
Azure rev002
Azure rev002Azure rev002
Azure rev002
 
oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...
 
Oracle application framework (oaf) online training
Oracle application framework (oaf) online trainingOracle application framework (oaf) online training
Oracle application framework (oaf) online training
 
RIA with Flex & PHP - Tulsa TechFest 2009
RIA with Flex & PHP  - Tulsa TechFest 2009RIA with Flex & PHP  - Tulsa TechFest 2009
RIA with Flex & PHP - Tulsa TechFest 2009
 
Spring Framework -I
Spring Framework -ISpring Framework -I
Spring Framework -I
 
seminar
seminarseminar
seminar
 
Report on mall automation
Report on mall automationReport on mall automation
Report on mall automation
 
Entity frameworks101
Entity frameworks101Entity frameworks101
Entity frameworks101
 
App v 4.6 sp1 trial guide
App v 4.6 sp1 trial guideApp v 4.6 sp1 trial guide
App v 4.6 sp1 trial guide
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 

Similar to Introduction to Yii Framework Overview

Introduction to Yii & performance comparison with Drupal
Introduction to Yii & performance comparison with DrupalIntroduction to Yii & performance comparison with Drupal
Introduction to Yii & performance comparison with Drupalcadet018
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfoliocummings49
 
Get things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplicationsGet things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplicationsGiuliano Iacobelli
 
Application development and emerging technologies.pptx
Application development and emerging technologies.pptxApplication development and emerging technologies.pptx
Application development and emerging technologies.pptxMichael Angelo Marasigan
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET Journal
 
An Introduction to Django Web Framework
An Introduction to Django Web FrameworkAn Introduction to Django Web Framework
An Introduction to Django Web FrameworkDavid Gibbons
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails DevelopersEdureka!
 
Building Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPBuilding Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPEdureka!
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentationBhavin Shah
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHPEdureka!
 

Similar to Introduction to Yii Framework Overview (20)

Introduction to Yii & performance comparison with Drupal
Introduction to Yii & performance comparison with DrupalIntroduction to Yii & performance comparison with Drupal
Introduction to Yii & performance comparison with Drupal
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
 
Get things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplicationsGet things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplications
 
Application development and emerging technologies.pptx
Application development and emerging technologies.pptxApplication development and emerging technologies.pptx
Application development and emerging technologies.pptx
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
Codeignitor
Codeignitor Codeignitor
Codeignitor
 
P H P Framework
P H P  FrameworkP H P  Framework
P H P Framework
 
An Introduction to Django Web Framework
An Introduction to Django Web FrameworkAn Introduction to Django Web Framework
An Introduction to Django Web Framework
 
WebGUI Developers Workshop
WebGUI Developers WorkshopWebGUI Developers Workshop
WebGUI Developers Workshop
 
contentDM
contentDMcontentDM
contentDM
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Intro to ColdBox MVC at Japan CFUG
Intro to ColdBox MVC at Japan CFUGIntro to ColdBox MVC at Japan CFUG
Intro to ColdBox MVC at Japan CFUG
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
 
Building Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPBuilding Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHP
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHP
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 

More from Folio3 Software

Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts Folio3 Software
 
Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development Folio3 Software
 
All You Need to Know About Type Script
All You Need to Know About Type ScriptAll You Need to Know About Type Script
All You Need to Know About Type ScriptFolio3 Software
 
A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingFolio3 Software
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)Folio3 Software
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)Folio3 Software
 
Introduction to SharePoint 2013
Introduction to SharePoint 2013Introduction to SharePoint 2013
Introduction to SharePoint 2013Folio3 Software
 
An Overview of Blackberry 10
An Overview of Blackberry 10An Overview of Blackberry 10
An Overview of Blackberry 10Folio3 Software
 
StackOverflow Architectural Overview
StackOverflow Architectural OverviewStackOverflow Architectural Overview
StackOverflow Architectural OverviewFolio3 Software
 
Enterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionEnterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionFolio3 Software
 
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Folio3 Software
 
Introduction to Enterprise Service Bus
Introduction to Enterprise Service BusIntroduction to Enterprise Service Bus
Introduction to Enterprise Service BusFolio3 Software
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraFolio3 Software
 
Regular Expression in Action
Regular Expression in ActionRegular Expression in Action
Regular Expression in ActionFolio3 Software
 
HTTP Server Push Techniques
HTTP Server Push TechniquesHTTP Server Push Techniques
HTTP Server Push TechniquesFolio3 Software
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software DevelopmentFolio3 Software
 
Offline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityOffline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityFolio3 Software
 

More from Folio3 Software (20)

Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts
 
Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development
 
All You Need to Know About Type Script
All You Need to Know About Type ScriptAll You Need to Know About Type Script
All You Need to Know About Type Script
 
Enter the Big Picture
Enter the Big PictureEnter the Big Picture
Enter the Big Picture
 
A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer Testing
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
Introduction to SharePoint 2013
Introduction to SharePoint 2013Introduction to SharePoint 2013
Introduction to SharePoint 2013
 
An Overview of Blackberry 10
An Overview of Blackberry 10An Overview of Blackberry 10
An Overview of Blackberry 10
 
StackOverflow Architectural Overview
StackOverflow Architectural OverviewStackOverflow Architectural Overview
StackOverflow Architectural Overview
 
Enterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionEnterprise Mobility - An Introduction
Enterprise Mobility - An Introduction
 
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Introduction to Enterprise Service Bus
Introduction to Enterprise Service BusIntroduction to Enterprise Service Bus
Introduction to Enterprise Service Bus
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache Cassandra
 
Regular Expression in Action
Regular Expression in ActionRegular Expression in Action
Regular Expression in Action
 
HTTP Server Push Techniques
HTTP Server Push TechniquesHTTP Server Push Techniques
HTTP Server Push Techniques
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software Development
 
Offline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityOffline Data Access in Enterprise Mobility
Offline Data Access in Enterprise Mobility
 

Recently uploaded

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 

Recently uploaded (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 

Introduction to Yii Framework Overview

  • 2. Agenda  Folio3 – Company Overview  Introduction to Yii  Workflow (MVC)  Installation Steps  Features  Some Code Samples  Model  Using Model from Controller  Controller  View  Performance
  • 3. Folio3 – An Overview www.folio3.com@folio_3
  • 4. Folio3 At a Glance  Founded in 2005  Over 200 full time employees  Offices in the US, Canada, Bulgaria & Pakistan  Palo Alto, CA.  Sofia, Bulgaria  Karachi, Pakistan Toronto, Canada
  • 5. What We Do  We are a Development Partner for our customers  Design software solutions, not just implement them  Focus on the solution – Platform and technology agnostic  Expertise in building applications that are: Mobile Social Cloud-based Gamified
  • 6. What We Do  Areas of Focus  Enterprise  Custom enterprise applications  Product development targeting the enterprise  Mobile  Custom mobile apps for iOS, Android, Windows Phone, BB OS  Mobile platform (server-to-server) development  Social Media  CMS based websites for consumers and enterprise (corporate, consumer, community & social networking)  Social media platform development (enterprise & consumer)  Gaming  Social & casual cross platform games (mobile, web, console)  Virtual Worlds
  • 7. Areas of Focus: Enterprise  Automating workflows  Cloud based solutions  Application integration  Platform development  Healthcare  Mobile Enterprise  Digital Media  Supply Chain
  • 8. Areas of Focus: Mobile  Serious enterprise applications for Banks, Businesses  Fun consumer apps for app discovery, interaction, exercise gamification and play  Educational apps  Augmented Reality apps  Mobile Platforms
  • 9. Areas of Focus: Web & Social Media  Community Sites based on Content Management Systems  Enterprise Social Networking  Social Games for Facebook & Mobile  Companion Apps for games
  • 10. Why Yii? ISit fast? ... ISit secure? ... ISit professional? ... ISit right for my next project?
  • 12. Yii – An Introduction www.folio3.com@folio_3
  • 13. Introduction Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, DRY design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product. Source: http://www.yiiframework.com/about/
  • 14. Introduction – Workflow (MVC) Source: http://www.yiiframework.com/doc/guide/1.1/en/basics.mvc#a-typical-workflow
  • 17. Introduction - Installation Extract the framework folder to any directory with access rights
  • 18. Introduction - Installation Extract the requirements folder to a web- accessible directory http://www.example.com/requirements
  • 20. Introduction - Installation Open console (Command Prompt) and run the following command from a web-accessible directory /path/to/php.exe /path/to/framework/yiic.php webapp myfirstyiiapp
  • 22. Introduction – Installation - Summary Download Extract framework folder Check requirements Run install command from console
  • 26. Features  Skinning and theming You can select theme at project level, controller level, action level Or based on some condition in action.  Error handling and logging Errors are handled and presented more nicely, and log messages can be categorized, filtered and routed to different destinations.
  • 27. Features  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.  Unit and functionality testing Test-Driven Development - using PHPUnit and Selenium Remote Control
  • 28. Features  Authentication and authorization Yii has built-in authentication support. It also supports authorization via hierarchical role-based access control.  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.
  • 29. Features – Extensions Auth (59) Caching (25) Console (25) Database (133) Date and Time (31) Error Handling (6) File System (39) Logging (37) Mail (29) Networking (25) Security (20) User Interface (606) Validation (82) Web Service (104) Others (385)
  • 31. Model Class class Post extends CActiveRecord { /** * Retrieves a list of models based on the current search/filter conditions. * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */ public function search() { $criteria=new CDbCriteria; $criteria->compare('content ',$this->content ); $criteria->compare('title ',$this->title ,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); } }
  • 32. Controller class PostController extends Controller { /** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionView($id) { $post = Post::model()->findByPk($id); if(!$post) throw new CHttpException(404); $this->render('view', array( 'post' => $post, )); } }
  • 33. Using Model From Controller Create $post = new Post; $post->title = 'sample post'; $post->content = 'post body content'; $post->save(); <- This is validated Select $post=Post::model()->find(array( 'select'=>'title', 'condition'=>'postID=:postID', 'params'=>array(':postID'=>2), )); Update $post = Post::model()->findByPk(2); $post->title = ‘New title’; $post->save(); <- This is validated
  • 34. View $this->breadcrumbs=array( 'Posts'=>array('index'), $post>title, ); ?> <h1>View Post #<?php echo $post>id; ?></h1> <?php $this->widget('zii.widgets.CDetailView', array( 'data'=>$post, 'attributes'=>array( 'title', 'content', ), )); ?>
  • 36. Performance – Comparison with other frameworks Source: http://www.yiiframework.com/performance
  • 37. Performance – Lazy loading example Schema /** * Create a relation in TblUser Model Class with User Role (tbl_role) table */ public function relations() { return array( 'userRole' => array(self::BELONGS_TO, 'TblRole', 'user_role_id'), ); } TblUserModel
  • 38. Performance – Lazy loading example <table> <tr><th>User id</th><td><?php echo $user->id; ?></td></tr> <tr><th>User name</th><td><?php echo $user->username; ?></td></tr> <tr><th>Role</th><td><?php echo $user->user_role_id; ?></td></tr> </table> If a property of only user model is accessed, only that table will be queried
  • 39. Performance – Lazy loading example <table> <tr><th>User id</th><td><?php echo $user->id; ?></td></tr> <tr><th>User name</th><td><?php echo $user->username; ?></td></tr> <tr><th>Role</th><td><?php echo $user->userRole->role_name; ?></td></tr> </table> If a property of related mode is accessed, only then it will query related model
  • 40. Performance – Drupal & Yii Source: http://erickennedy.org/Drupal-7-Reasons-to-Switch
  • 41. Performance – Drupal & Yii Source: http://erickennedy.org/Drupal-7-Reasons-to-Switch
  • 42. Performance – Drupal & Yii Source: http://erickennedy.org/Drupal-7-Reasons-to-Switch
  • 43. References  http://www.yiiframework.com  http://www.yiiframework.com/extensions/  http://www.yiiframework.com  http://erickennedy.org/Drupal-7-Reasons-to- Switch
  • 44. Contact  For more details about our Yii development services or our web development expertise, please get in touch with us. contact@folio3.com US Office: (408) 365-4638 www.folio3.com