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
42
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
49
Ansible: What Is It and What Is It Good For?
justinyost
0
43
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
96
Caching and You and You and You and You...
justinyost
0
63
Git: The Pain and the Gain
justinyost
0
140
Generators: All About the Yield
justinyost
0
270
Other Decks in Programming
See All in Programming
20250808_AIAgent勉強会_ClaudeCodeデータ分析の実運用〜競馬を題材に回収率100%の先を目指すメソッドとは〜
kkakeru
0
140
AHC051解法紹介
eijirou
0
410
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5.5k
0から始めるモジュラーモノリス-クリーンなモノリスを目指して
sushi0120
0
280
PHPカンファレンス関西2025 基調講演
sugimotokei
6
1.1k
AIのメモリー
watany
13
1.4k
マイコンでもRustのtestがしたい その2/KernelVM Tokyo 18
tnishinaga
2
1.9k
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
960
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
600
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
120
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
750
Comparing decimals in Swift Testing
417_72ki
0
170
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
For a Future-Friendly Web
brad_frost
179
9.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Adopting Sorbet at Scale
ufuk
77
9.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Making Projects Easy
brettharned
117
6.3k
KATA
mclloyd
32
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Git: the NoSQL Database
bkeepers
PRO
431
65k
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