Contenu connexe
Similaire à 20090905 Cake Php
Similaire à 20090905 Cake Php (20)
20090905 Cake Php
- 2. About me
名前 安藤祐介 aka @yando
所属 楽天株式会社 RAKUTEN inc
PHPについて喋ったり、書いたりしています
CakePHPやRedmineについての活動
Loving cat, curry, golf and CakePHP.
Copyright © YusukeAndo. 2008. All rights reserved. 22Copyright © YusukeAndo. 2009. All rights reserved.
- 6. 6Copyright © YusukeAndo. 2008. All rights reserved.
CakePHPとは
What is CakePHP
6Copyright © YusukeAndo. 2009. All rights reserved.
- 10. フレームワークを使わない開発 (pure php)
Copyright © YusukeAndo. 2009. All rights reserved. 10
<?php
mysql_connect();
$sql = ‚‛;
$ret = mysql_query();
<?php
mysql_connect();
$sql = ‚‛;
$ret = mysql_query();
<?php
mysql_connect();
$sql = ‚‛;
$ret = mysql_query();
<?php
mysql_connect();
$sql = ‚SELECT * ‛;
$ret = mysql_query();
<?php
Main();
Function main(){}
Function hoge(){}
<?php
Main();
Function main(){}
Function hoge(){}
<?php
Main();
Function main(){}
Function hoge(){}
全てのプログラムに必要な
処理が記述されている
プログラムによって構造が
異なる
- 11. フレームワークを使った開発 (with framwork)
Copyright © YusukeAndo. 2009. All rights reserved. 11
フレームワーク
<?php
HogeController {
function index(){}
}
<?php
HogeController {
function index(){}
}
<?php
HogeController {
function index(){}
}
ルールに沿った部品だけ
を作成する
ほとんどのプログラムは
同じ構造になる
- 12. 典型的なコードの例
Copyright © YusukeAndo. 2009. All rights reserved. 12
<?php
FriendsController extends AppController {
function index(){
$data = $this->Friend->find(‘all’);
$this->set(‘friends’,$data);
}
}
画面表示にデータを受け渡し
SQLを自動的に実行
DBを自動で処理し、
views/friends/index.ctp を表示
- 13. Improve productivity and maintainability
生産性の向上
保守性の向上
プログラム作成の作業が簡単になり、
同じやり方で誰でも作成できるようになる。
13Copyright © YusukeAndo. 2009. All rights reserved.
- 14. PHPer at all levels
全てのレベル
のPHPユーザ
14Copyright © YusukeAndo. 2009. All rights reserved.
- 15. Both novice and expart are target
簡単に使いたい初心者
拡張しまくりたい上級者
上級者向けに思われがちなフレームワーク
を気軽に利用できるスタイル
15Copyright © YusukeAndo. 2009. All rights reserved.
- 17. Features for advanced user
コントローラーを拡張するComponent
モデルを拡張するBehavior
ビューを拡張するHelper
アプリケーションの一部を再利用するPlugin
Copyright © YusukeAndo. 2009. All rights reserved. 17
工夫して小さくまとめるのが
CakePHP流
- 18. 18Copyright © YusukeAndo. 2008. All rights reserved.
国内での普及状況
Stats of CakePHP in Japan
18Copyright © YusukeAndo. 2009. All rights reserved.
- 19. What is poplar product in PHP ?
Smarty
PEAR
Ethna
symfony
CakePHP
Copyright © YusukeAndo. 2009. All rights reserved. 19
どれも知名度が高い
- 20. Google Trends says .. (2004 - 2006)
Copyright © YusukeAndo. 2009. All rights reserved. 20
- 21. Google Trends says .. (2007 - 2009)
Copyright © YusukeAndo. 2009. All rights reserved. 21
- 23. Also official manual is able to read
Copyright © YusukeAndo. 2009. All rights reserved. 23
http://book.cakephp.org/ja
- 24. You can take lesson online
Copyright © YusukeAndo. 2009. All rights reserved. 24
http://d.hatena.ne.jp/i_ogi/20090418/1240044385
2時間半のレッスン動画とスライドをiogiさんの協力で公開中
- 25. Major web sites Made by CakePHP
Copyright © YusukeAndo. 2009. All rights reserved. 25
- 35. 35Copyright © YusukeAndo. 2008. All rights reserved.
CakePHPの未来
The future of CakePHP
35Copyright © YusukeAndo. 2009. All rights reserved.