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
33
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
73
PHP and Databases
justinyost
2
36
Ansible: What Is It and What Is It Good For?
justinyost
0
24
Generators: All About the Yield
justinyost
0
11
Laravel 6: What's New and What's Changed
justinyost
0
200
Middleware: Between the Framework and the Browser
justinyost
2
66
Caching and You and You and You and You...
justinyost
0
41
Git: The Pain and the Gain
justinyost
0
100
Generators: All About the Yield
justinyost
0
160
Other Decks in Programming
See All in Programming
Polars入門
daikikatsuragawa
1
190
Ruby Function Composition
bkuhlmann
1
340
Direct Style Effect Systems The Print[A] ExampleA Comprehension Aid
philipschwarz
PRO
0
150
Webアプリをできるだけコードを手書きしないで作ってみる
tomokusaba
2
190
AppRouter Panel Talk
yosuke_furukawa
PRO
1
480
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
180
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
440
Let's learn code review
riofujimon
2
600
Domain-Driven Transformation
hschwentner
2
1.5k
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
440
Deep Dive into React Stream/Serialize
mugi_uno
3
720
Next.js App Router
quramy
12
1.9k
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
69
8.6k
Building an army of robots
kneath
300
41k
Scaling GitHub
holman
457
140k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
245
20k
[RailsConf 2023] Rails as a piece of cake
palkan
28
4k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
How to Ace a Technical Interview
jacobian
273
22k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Docker and Python
trallard
35
2.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
jQuery: Nuts, Bolts and Bling
dougneiner
60
7.2k
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