Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
今こそCakePHP3に乗り換えよう!/php_conference_fukuoka_2016
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sakuragawa
May 24, 2016
Programming
1.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
今こそCakePHP3に乗り換えよう!/php_conference_fukuoka_2016
今こそCakePHP3に乗り換えよう!
sakuragawa
May 24, 2016
More Decks by sakuragawa
See All by sakuragawa
CircleCI APIでプチ効率化
sakuragawa
1
610
PHP + GitHub + Azure Functions = ?
sakuragawa
0
270
CakePHP2と3の違い
sakuragawa
8
4.9k
Other Decks in Programming
See All in Programming
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
220
Railsバージョンを4倍にした話
optim
0
610
Kotlinの15年とServer-Side Kotlin
n_takehata
1
170
Event is what happens
moro
2
1.6k
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.3k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
380
JIS keyboard support in Omarchy
lef237
0
160
Performance Optimization With LLMs
xleitix
0
200
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
180
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
950
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
410
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.8k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
940
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Claude Code のすすめ
schroneko
67
230k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
370
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
Transcript
今こそCakePHP3に乗り換えよう! 2016/5/21
自己紹介 株式会社Fusic 技術開発部 マネージャー 櫻川 幸三 https://github.com/kozo https://github.com/fusic http://qiita.com/kozo http://qiita.com/organizations/fusic
CakePHP利用歴:8年程度(CakePHP1.1から) 2
3 使ってますか?
4 CakePHP3に 移行するメリットあるの?
6 5つのおすすめポイント!
1. QueryBuilder CakePHP2 7 $query = [ ‘conditions’ => [
‘条件A’, ‘条件B’ ], ‘order’ => [ ‘ソート条件A’, ‘ソート条件B’ ], ‘fields’ => [‘取得フィールド’] ] $this->User->find(‘all’, $query); $this->Users->find() ->where(条件A) ->where(条件B) ->order(ソート条件A) ->order(ソート条件B) ->select(取得フィールド) ->all(); • CakePHP3 配列地獄からは解消される!
2. QueryBuilder 8 複雑なSQLもかけるようになった 例) hasMany先のテーブルに条件をかける matching
2. QueryBuilder 9 複雑なSQLもかけるようになった 例) hasMany先のテーブルに条件をかける
3. Table、Entity Table DBのテーブルへアクセスする処理を主に書く CakePHP2のModelクラスに近い動きをする 10 • Entity • DBのテーブル1レコードを表す
• カラムのデータ自体の加工等を担当する • CakePHP2までのModelクラスが、 TableとEntityの2つに分離された Tableクラス Entityクラス
4. HTMLの修正が非常に楽! 11
5. namespace やっとnamespaceに対応した! 12
28 プラグイン
fusic/Apollon 29 Installation composer require fusic/Apollon ひらがな、カタカナ、電話番号といったような基本的なバリデー ションルールをまとめているValidationクラス
fusic/encount 30 本番環境等でwarningやnotice、faital等のエラーが出た場合 にメール等で通知してくれるプラグイン Senderクラスを自作することで通知方法をSlack等、メール以 外に変更することが可能 Installation composer require fusic/encount
kozo/Partial 31 同一コントローラー内で使える小さいスコープのテンプレート Installation composer require kozo/Partial 新規登録画面 編集画面 add.ctp
edit.ctp _form.ctp 共通する部分を 別ファイルにしておき Partialで読み込む
まとめ CakePHP3は 非常にパワフルで拡張性の高い フレームワークになりました。 他にも色々便利な機能があります。 興味ある人は是非、使っていきましょう! 36
ご清聴ありがとうございました Fusicはテクノロジーが 好きなエンジニアを募集しています https://fusic.github.io 37
ご清聴ありがとうございました Fusicはテクノロジーが 好きなエンジニアを募集しています https://fusic.github.io 49