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
38
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
86
PHP and Databases
justinyost
2
43
Ansible: What Is It and What Is It Good For?
justinyost
0
34
Generators: All About the Yield
justinyost
0
11
Laravel 6: What's New and What's Changed
justinyost
0
210
Middleware: Between the Framework and the Browser
justinyost
2
85
Caching and You and You and You and You...
justinyost
0
50
Git: The Pain and the Gain
justinyost
0
120
Generators: All About the Yield
justinyost
0
240
Other Decks in Programming
See All in Programming
Drawing Heighway’s Dragon- Recursive Function Rewrite- From Imperative Style in Pascal 64 To Functional Style in Scala 3
philipschwarz
PRO
0
200
保守性を高める AWS CDK のセオリー・ベストプラクティス
yamanashi_ren01
5
590
⚪⚪の⚪⚪をSwiftUIで再現す る
u503
0
150
技術を改善し続ける
gumioji
0
190
CQRS+ES勉強会#1
rechellatek
0
160
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
240
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
910
良いコードレビューとは
danimal141
10
9.9k
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
270
Accelerate your key learnings of scaling modern Android apps
aldefy
0
100
技術好きなエンジニアが "リーダーへの進化" によって得たものと失ったもの
pospome
4
820
Goで作るChrome Extensions / Fukuoka.go #21
n3xem
2
2.1k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
410
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.6k
Testing 201, or: Great Expectations
jmmastey
42
7.3k
Adopting Sorbet at Scale
ufuk
75
9.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Navigating Team Friction
lara
183
15k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
The Pragmatic Product Professional
lauravandoore
32
6.4k
A Modern Web Designer's Workflow
chriscoyier
693
190k
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