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
34
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
82
PHP and Databases
justinyost
2
36
Ansible: What Is It and What Is It Good For?
justinyost
0
29
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
75
Caching and You and You and You and You...
justinyost
0
46
Git: The Pain and the Gain
justinyost
0
110
Generators: All About the Yield
justinyost
0
200
Other Decks in Programming
See All in Programming
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
380
Hermes: Better Performance with Bytecode Translation (React Universe 2024)
tmikov2023
0
100
Modernisation Progressive d’Applications PHP
hhamon
0
110
マルチモジュールにおけるテスト最適化
fxwx23
0
210
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
1k
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
820
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
250
大公開!iOS開発の悩みトップ5 〜iOSDC Japan 2024〜
ryunakayama
0
190
Rubyのobject_id
qnighy
6
1.3k
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
0
410
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
170
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
260
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
89
16k
GraphQLの誤解/rethinking-graphql
sonatard
65
9.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
Code Reviewing Like a Champion
maltzj
517
39k
Music & Morning Musume
bryan
46
6k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
For a Future-Friendly Web
brad_frost
174
9.3k
The Art of Programming - Codeland 2020
erikaheidi
48
13k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
227
52k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
[RailsConf 2023] Rails as a piece of cake
palkan
48
4.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
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