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
CakePHP: In about 15 minutes or less
Search
Justin Yost
December 02, 2016
Programming
0
41
CakePHP: In about 15 minutes or less
Run through of some basics with CakePHP in about 15 minutes for a framework roundtable.
Justin Yost
December 02, 2016
Tweet
Share
More Decks by Justin Yost
See All by Justin Yost
Laravel 6, 7 and Other Goodies
justinyost
2
87
PHP and Databases
justinyost
2
46
Ansible: What Is It and What Is It Good For?
justinyost
0
42
Generators: All About the Yield
justinyost
0
11
Laravel 6: What's New and What's Changed
justinyost
0
220
Middleware: Between the Framework and the Browser
justinyost
2
94
Caching and You and You and You and You...
justinyost
0
60
Git: The Pain and the Gain
justinyost
0
140
Generators: All About the Yield
justinyost
0
260
Other Decks in Programming
See All in Programming
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
510
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
110
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
960
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
250
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
150
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
860
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
270
5つのアンチパターンから学ぶLT設計
narihara
1
120
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
280
PicoRuby on Rails
makicamel
2
100
GoのGenericsによるslice操作との付き合い方
syumai
3
690
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
120
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Writing Fast Ruby
sferik
628
61k
Making Projects Easy
brettharned
116
6.3k
Why You Should Never Use an ORM
jnunemaker
PRO
57
9.4k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
700
The Language of Interfaces
destraynor
158
25k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Git: the NoSQL Database
bkeepers
PRO
430
65k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
930
Transcript
CakePHP: In about 15 minutes or less Justin Yost Web
Developer at Loadsys CC BY-NC 4.0 Justin Yost 1
CakePHP Highlights — Convention over Configuration — MVC — "Build
fast, grow solid" — PHP 5.5+ — ORM blends ActiveRecord and Datamapper CC BY-NC 4.0 Justin Yost 2
CakePHP — composer create-project --prefer-dist cakephp/app {awesome-app} — Build Tables
— Setup DB configuration — bin/cake bake all {table-name} — Done with CRUD for {table-name} CC BY-NC 4.0 Justin Yost 3
CC BY-NC 4.0 Justin Yost 4
CakePHP Core Classes — Table — Entity — View —
Controller CC BY-NC 4.0 Justin Yost 5
CakePHP: Table public function findOwnedBy(Query $query, array $options) { $user
= $options['user']; return $query->where(['author_id' => $user->id]); } CC BY-NC 4.0 Justin Yost 6
CakePHP: Entity protected function _getFullName() { return $this->_properties['first_name'] . '
' . $this->_properties['last_name']; } CC BY-NC 4.0 Justin Yost 7
CakePHP: View <?php foreach ($users as $user): ?> <li class="user">
<?= $this->element('user', ['user' => $user]) ?> </li> <?php endforeach; ?> CC BY-NC 4.0 Justin Yost 8
CakePHP: Controller public function add() { $user = $this->Users->newEntity(); if
($this->request->is('post')) { $user = $this->Users->patchEntity($user, $this->request->data); if ($this->Users->save($user)) { $this->Flash->success(__('You are now registered.')); } else { $this->Flash->error(__('There were some problems.')); } } $this->set('user', $user); } CC BY-NC 4.0 Justin Yost 9
Why I like CakePHP — Rich and extensive core foundational
layer with lots of room to grow — ORM is amazing — Solid, Rich documentation CC BY-NC 4.0 Justin Yost 10
CakePHP Support, misc — cakephp.org — book.cakephp.org — api.cakephp.org CC
BY-NC 4.0 Justin Yost 11
Thanks/Questions? — twitter.com/justinyost — github.com/justinyost — justinyost.com — loadsys.com —
lynda.com/justinyost CC BY-NC 4.0 Justin Yost 12