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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Justin Yost
December 02, 2016
Programming
68
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Justin Yost
See All by Justin Yost
Laravel 6, 7 and Other Goodies
justinyost
2
130
PHP and Databases
justinyost
2
67
Ansible: What Is It and What Is It Good For?
justinyost
0
82
Generators: All About the Yield
justinyost
0
11
Laravel 6: What's New and What's Changed
justinyost
0
240
Middleware: Between the Framework and the Browser
justinyost
2
120
Caching and You and You and You and You...
justinyost
0
94
Git: The Pain and the Gain
justinyost
0
210
Generators: All About the Yield
justinyost
0
310
Other Decks in Programming
See All in Programming
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.3k
My Marp Sample
sinoue0108
0
130
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
250
Deep dive into the select statement (GopherCon UK)
jespino
0
160
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
520
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
550
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.3k
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
260
不幸な GC
chencmd
0
820
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
170
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
470
ソフトウェアラスタライザ
fadis
1
730
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Code Reviewing Like a Champion
maltzj
528
40k
The SEO Collaboration Effect
kristinabergwall1
1
540
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
510
Accessibility Awareness
sabderemane
1
190
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
370
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
The Limits of Empathy - UXLibs8
cassininazir
1
620
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
290
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
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