Submit Search
Upload
Yiitalk
•
Download as KEY, PDF
•
0 likes
•
508 views
Aaron Huang
Follow
A simple yii framework talk.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 65
Download now
Recommended
phpconf 2012 yii
phpconf 2012 yii
Aaron Huang
Introduction to ASP.NET MVC and MVC 5 Features
Introduction to ASP.NET MVC and MVC 5 Features
Jeff Chu
MVC MVVM MVVMC
MVC MVVM MVVMC
Ng Hui Qin
Views 3
Views 3
Ronan Berder
CodeIgniter 2.0.X
CodeIgniter 2.0.X
Bo-Yi Wu
WoT Frotend 的設計與實作
WoT Frotend 的設計與實作
julie huang
Yii2install codingthailand
Yii2install codingthailand
Peerawas Saengthong
#pugMi - DDD - Value objects
#pugMi - DDD - Value objects
Simone Gentili
Recommended
phpconf 2012 yii
phpconf 2012 yii
Aaron Huang
Introduction to ASP.NET MVC and MVC 5 Features
Introduction to ASP.NET MVC and MVC 5 Features
Jeff Chu
MVC MVVM MVVMC
MVC MVVM MVVMC
Ng Hui Qin
Views 3
Views 3
Ronan Berder
CodeIgniter 2.0.X
CodeIgniter 2.0.X
Bo-Yi Wu
WoT Frotend 的設計與實作
WoT Frotend 的設計與實作
julie huang
Yii2install codingthailand
Yii2install codingthailand
Peerawas Saengthong
#pugMi - DDD - Value objects
#pugMi - DDD - Value objects
Simone Gentili
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC
国际图象互操作框架(IIIF) APIs和应用实例
国际图象互操作框架(IIIF) APIs和应用实例
Marcia Zeng
[DCTPE2010] 如何開發 CCK 欄位模組
[DCTPE2010] 如何開發 CCK 欄位模組
Drupal Taiwan
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練3
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練3
Duran Hsieh
向jquery学习
向jquery学习
jay li
美团前端架构简介
美团前端架构简介
pan weizeng
Real World ASP.NET MVC
Real World ASP.NET MVC
jeffz
Continuous integration
Continuous integration
netdbncku
Angular js twmvc#17
Angular js twmvc#17
twMVC
使用 Controller
使用 Controller
Shengyou Fan
学习 CodeIgniter
学习 CodeIgniter
BruceWolf
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
modou li
twMVC#31網站上線了然後呢
twMVC#31網站上線了然後呢
twMVC
大话Php之性能
大话Php之性能
liqiang xu
Servlet & JSP 教學手冊第二版 - 第 1 章:簡介Web應用程式
Servlet & JSP 教學手冊第二版 - 第 1 章:簡介Web應用程式
Justin Lin
系統整合
系統整合
麒 王
2011 php技术高峰论坛演讲.黄波
2011 php技术高峰论坛演讲.黄波
leontb
使用 TypeScript 駕馭 Web 世界的脫韁野馬:以 Angular 2 開發框架為例
使用 TypeScript 駕馭 Web 世界的脫韁野馬:以 Angular 2 開發框架為例
Will Huang
How to ASP.NET MVC4
How to ASP.NET MVC4
Daniel Chou
Continuous Delivery: automated testing, continuous integration and continuous...
Continuous Delivery: automated testing, continuous integration and continuous...
Jimmy Lai
Scrumban
Scrumban
Aaron Huang
Dollar symbol
Dollar symbol
Aaron Huang
More Related Content
Similar to Yiitalk
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC
国际图象互操作框架(IIIF) APIs和应用实例
国际图象互操作框架(IIIF) APIs和应用实例
Marcia Zeng
[DCTPE2010] 如何開發 CCK 欄位模組
[DCTPE2010] 如何開發 CCK 欄位模組
Drupal Taiwan
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練3
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練3
Duran Hsieh
向jquery学习
向jquery学习
jay li
美团前端架构简介
美团前端架构简介
pan weizeng
Real World ASP.NET MVC
Real World ASP.NET MVC
jeffz
Continuous integration
Continuous integration
netdbncku
Angular js twmvc#17
Angular js twmvc#17
twMVC
使用 Controller
使用 Controller
Shengyou Fan
学习 CodeIgniter
学习 CodeIgniter
BruceWolf
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
modou li
twMVC#31網站上線了然後呢
twMVC#31網站上線了然後呢
twMVC
大话Php之性能
大话Php之性能
liqiang xu
Servlet & JSP 教學手冊第二版 - 第 1 章:簡介Web應用程式
Servlet & JSP 教學手冊第二版 - 第 1 章:簡介Web應用程式
Justin Lin
系統整合
系統整合
麒 王
2011 php技术高峰论坛演讲.黄波
2011 php技术高峰论坛演讲.黄波
leontb
使用 TypeScript 駕馭 Web 世界的脫韁野馬:以 Angular 2 開發框架為例
使用 TypeScript 駕馭 Web 世界的脫韁野馬:以 Angular 2 開發框架為例
Will Huang
How to ASP.NET MVC4
How to ASP.NET MVC4
Daniel Chou
Continuous Delivery: automated testing, continuous integration and continuous...
Continuous Delivery: automated testing, continuous integration and continuous...
Jimmy Lai
Similar to Yiitalk
(20)
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
国际图象互操作框架(IIIF) APIs和应用实例
国际图象互操作框架(IIIF) APIs和应用实例
[DCTPE2010] 如何開發 CCK 欄位模組
[DCTPE2010] 如何開發 CCK 欄位模組
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練3
2015 年逢甲大學資訊系:ASP.NET MVC 4 教育訓練3
向jquery学习
向jquery学习
美团前端架构简介
美团前端架构简介
Real World ASP.NET MVC
Real World ASP.NET MVC
Continuous integration
Continuous integration
Angular js twmvc#17
Angular js twmvc#17
使用 Controller
使用 Controller
学习 CodeIgniter
学习 CodeIgniter
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
twMVC#31網站上線了然後呢
twMVC#31網站上線了然後呢
大话Php之性能
大话Php之性能
Servlet & JSP 教學手冊第二版 - 第 1 章:簡介Web應用程式
Servlet & JSP 教學手冊第二版 - 第 1 章:簡介Web應用程式
系統整合
系統整合
2011 php技术高峰论坛演讲.黄波
2011 php技术高峰论坛演讲.黄波
使用 TypeScript 駕馭 Web 世界的脫韁野馬:以 Angular 2 開發框架為例
使用 TypeScript 駕馭 Web 世界的脫韁野馬:以 Angular 2 開發框架為例
How to ASP.NET MVC4
How to ASP.NET MVC4
Continuous Delivery: automated testing, continuous integration and continuous...
Continuous Delivery: automated testing, continuous integration and continuous...
More from Aaron Huang
Scrumban
Scrumban
Aaron Huang
Dollar symbol
Dollar symbol
Aaron Huang
Git branching-model
Git branching-model
Aaron Huang
Pomodoro
Pomodoro
Aaron Huang
Apprenticeship Patterns
Apprenticeship Patterns
Aaron Huang
Readability
Readability
Aaron Huang
More from Aaron Huang
(6)
Scrumban
Scrumban
Dollar symbol
Dollar symbol
Git branching-model
Git branching-model
Pomodoro
Pomodoro
Apprenticeship Patterns
Apprenticeship Patterns
Readability
Readability
Yiitalk
1.
Yii Basic talk
Aaron Huang - 黃冠中
2.
About Aaron •
a.k.a aar0ntw • Nexdoor Web Developer • Development , System Design , Training ...etc • PHP , JavaScript , Ruby , Python ...etc • github, twitter : @aar0ntw • plurk : @smoraa • Blog: http://blog.buginception.com
3.
Agenda • Yii php
framework tutorial • Intro • MVC pattern • Http request life cycle in yii • Folder Structure • Tools • live demo • Q &A
4.
Slide • http://www.slideshare.net/guanzhonghuang/
presentations
5.
官方資源 •
http://www.yiiframework.com • http://www.yiiframework.com/doc/api/1.1/ • http://www.yiiframework.com/doc/guide/1.1/en/
6.
簡介
7.
Yii 是什麼
8.
Yii 是什麼 • 是一個
PHP 的 web framework
9.
Yii 是什麼 • 是一個
PHP 的 web framework • 是一個 MVC 架構的 php framework
10.
Yii 是什麼 • 是一個
PHP 的 web framework • 是一個 MVC 架構的 php framework • 是一個快速開發的 php framework
11.
Yii 是什麼 • 是一個
PHP 的 web framework • 是一個 MVC 架構的 php framework • 是一個快速開發的 php framework • 是一個高效率的 php framework
12.
為什麼要用 framework
13.
為什麼要用 framework •
因為 PHP 很劣
14.
為什麼要用 framework •
因為 PHP 很劣 • 寫起來很醜
15.
為什麼要用 framework •
因為 PHP 很劣 • 寫起來很醜 • 看起來很散
16.
為什麼要用 framework •
因為 PHP 很劣 • 寫起來很醜 • 看起來很散 • 起來很怪
17.
為什麼要用 framework •
因為 PHP 很劣 • 寫起來很醜 • 看起來很散 • 起來很怪 • 因為很多人都說會寫 PHP
18.
為什麼要用 framework •
因為 PHP 很劣 • 寫起來很醜 • 看起來很散 • 起來很怪 • 因為很多人都說會寫 PHP • 但實際上不太會寫。
19.
那為什麼還要用 PHP
20.
那為什麼還要用 PHP • 門檻低
21.
那為什麼還要用 PHP • 門檻低 •
好上手
22.
那為什麼還要用 PHP • 門檻低 •
好上手 • 誰都會寫
23.
那為什麼還要用 PHP • 門檻低 •
好上手 • 誰都會寫 • 資源豐富
24.
劣 即是 夯
25.
需求
26.
需求 • 介面的規範
27.
需求 • 介面的規範 • 格式的標準
28.
需求 • 介面的規範 • 格式的標準 •
程式碼的風格
29.
需求 • 介面的規範 • 格式的標準 •
程式碼的風格 • 資料夾的結構
30.
需求 • 介面的規範 • 格式的標準 •
程式碼的風格 • 資料夾的結構 • 開發者的紀律
31.
常見 PHP 程式流程 index.php
about.php page.php access.php list.php delete.php update.php create.php
32.
Yii 程式流程
app index.php application component controller widget model view
33.
差異
34.
差異 • 介面化
35.
差異 • 介面化 • 易於維護
36.
差異 • 介面化 • 易於維護 •
程式耦合性低
37.
差異 • 介面化 • 易於維護 •
程式耦合性低 • 結構清楚
38.
差異 • 介面化 • 易於維護 •
程式耦合性低 • 結構清楚 • 容易預期
39.
MVC 模式
40.
MVC 模式 • Model
- View - Controller
41.
MVC 模式 • Model
- View - Controller • 資料 - 畫面 - 中介控制
42.
MVC 模式 • Model
- View - Controller • 資料 - 畫面 - 中介控制 • 商業邏輯 - 前端畫面 - 流程控管
43.
Yii request 生命週期
44.
index.php (Bootstrap)
app index.php application component controller widget model view
45.
Yii::CWebApplication
app index.php application component controller widget model view
46.
Yii::CComponent
app index.php application component controller widget model view
47.
Yii::CUrlManager
app index.php application component UrlManager controller widget model view
48.
Yii::CController
app index.php application component controller widget model view
49.
Yii::CActiveRecord
app index.php application component controller widget model view
50.
CController::render
app index.php application component controller widget model view
51.
Yii::CWidget
app index.php application component controller widget model view
52.
實際開發
53.
資料夾結構
54.
輔助工具
55.
輔助工具 • yiic :
command line tool
56.
輔助工具 • yiic :
command line tool • Gii : Web UI tool
57.
輔助工具 : CLI
tool
58.
輔助工具 : CLI
tool • yiic shell
59.
輔助工具 : CLI
tool • yiic shell • model
60.
輔助工具 : CLI
tool • yiic shell • model • controller
61.
輔助工具 : CLI
tool • yiic shell • model • controller • crud
62.
輔助工具 : CLI
tool • yiic shell • model • controller • crud • yiic migrate
63.
Live Demo
64.
Q &A 你問,我盡量答
65.
謝謝大家
Editor's Notes
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Download now