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
56
0
Share
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
99
PHP and Databases
justinyost
2
61
Ansible: What Is It and What Is It Good For?
justinyost
0
68
Generators: All About the Yield
justinyost
0
11
Laravel 6: What's New and What's Changed
justinyost
0
230
Middleware: Between the Framework and the Browser
justinyost
2
110
Caching and You and You and You and You...
justinyost
0
87
Git: The Pain and the Gain
justinyost
0
190
Generators: All About the Yield
justinyost
0
300
Other Decks in Programming
See All in Programming
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
150
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
500
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
Kingdom of the Machine
yui_knk
2
1.5k
【ディップ|26年新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
510
🦞OpenClaw works with AWS
licux
1
350
AWSはOSSをどのように 考えているのか?
akihisaikeda
0
110
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
200
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
280
Embracing the Ebb and Flow
colly
88
5k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
330
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
Site-Speed That Sticks
csswizardry
13
1.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Tell your own story through comics
letsgokoyo
1
920
Building Adaptive Systems
keathley
44
3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Deep Space Network (abreviated)
tonyrice
0
130
Designing Powerful Visuals for Engaging Learning
tmiket
1
360
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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