Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
使用 Kohana 轻便快速开发
Search
icyleaf
December 15, 2014
Programming
0
110
使用 Kohana 轻便快速开发
icyleaf
December 15, 2014
Tweet
Share
More Decks by icyleaf
See All by icyleaf
Android 组件实践
icyleaf
0
59
我想学 Ruby 系列课程之开篇
icyleaf
0
120
论 Mobile App (iOS/Android)自动化构建是如何炼成的
icyleaf
0
200
贡嘎转山之驴行的意义
icyleaf
0
140
Install Snow Leopard on PC (Hashintosh)
icyleaf
0
150
Git 入门实战
icyleaf
8
800
Other Decks in Programming
See All in Programming
エラーって何種類あるの?
kajitack
5
310
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
130
Is Xcode slowly dying out in 2025?
uetyo
1
190
C++20 射影変換
faithandbrave
0
530
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
550
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
360
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
450
A2A プロトコルを試してみる
azukiazusa1
2
1.1k
FormFlow - Build Stunning Multistep Forms
yceruto
1
190
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
410
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
540
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
100
Featured
See All Featured
A better future with KSS
kneath
239
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Embracing the Ebb and Flow
colly
86
4.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Faster Mobile Websites
deanohume
307
31k
Why Our Code Smells
bkeepers
PRO
337
57k
Agile that works and the tools we love
rasmusluckow
329
21k
Transcript
使用 Kohana 轻便快速开发 在编码中成长
• 你需要快速构建自己的应用 • 你想要了解框架都能干什么 • 自己堆写代码的乐趣胜于让框架帮你生成 •
你需要构建商业应用 你心目中框架能干什么?
Kohana 全部满足!
那么… Kohana 是什么?
Kohana 是基于 HMVC 架构 的 PHP5 框架。
Controller View Model Controller View Model Controller View Model Controller
View Model Controller View Model HMVC = Hierarchical-‐MVC
Controller View Model Controller View Model Controller View Model Controller
View Model Controller View Model Dashboard Pages ACL Media Posts HMVC = Hierarchical-‐MVC
None
为什么使用 Kohana?
KISS and DRY 可乐而不为?
文件级联系统 Cascading Filesystem
None
加载其他类库 Import other classes
// 首先把 pear 包放在 application/vendor 文件夹下面 // 加载 vendor 目录下
pear/Net 文件夹下面的 POP3.php 文件 require Kohana::find_file('vendor', ‘pear/Net/POP3'); // 实例化 POP3 类 $pop3 = new POP3(); 加载 Pear 包中的 POP3 类
调试代码 Debug
// 显示 $foo 和 $bar 变量的相关信息 echo Kohana::debug($foo, $bar);
1. 调试变量 2. 调试源代码 // 显示当前行的源代码 echo Kohana::debug_source(__FILE__, __LINE__); 3. 调试文件 // 调试 “APPPATH/classes/cache.php” 文件同时并不显示真实路径 echo Kohana::debug_file(‘application/classes/cache.php');
错误/异常句柄 Error/Exception Handling
None
分析统计 Profiling
None
路由 Routing
None
None
日志记录 Logging
None
by lzyy
配置系统 Configuration system
None
None
代码演示 Demo
任何问题? QuesBon
感谢大家! Thanks at all