Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
43
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
91
PHP and Databases
justinyost
2
53
Ansible: What Is It and What Is It Good For?
justinyost
0
45
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
100
Caching and You and You and You and You...
justinyost
0
71
Git: The Pain and the Gain
justinyost
0
160
Generators: All About the Yield
justinyost
0
270
Other Decks in Programming
See All in Programming
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
110
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
380
アーキテクチャと考える迷子にならない開発者テスト
irof
9
3.4k
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
3.3k
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
840
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.1k
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2k
All(?) About Point Sets
hole
0
240
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
180
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
370
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
24
20k
『実践MLOps』から学ぶ DevOps for ML
nsakki55
2
500
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
68k
Designing for humans not robots
tammielis
254
26k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Writing Fast Ruby
sferik
630
62k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Become a Pro
speakerdeck
PRO
30
5.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.1k
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