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
35
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
83
PHP and Databases
justinyost
2
41
Ansible: What Is It and What Is It Good For?
justinyost
0
30
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
79
Caching and You and You and You and You...
justinyost
0
46
Git: The Pain and the Gain
justinyost
0
120
Generators: All About the Yield
justinyost
0
220
Other Decks in Programming
See All in Programming
Beyond ORM
77web
11
1.6k
Оптимизируем производительность блока Казначейство
lamodatech
0
980
最近のVS Codeで気になるニュース 2025/01
74th
1
230
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
140
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
980
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
29
4.7k
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
620
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
680
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
230
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
210
Scaling your build logic
antalmonori
1
130
PicoRubyと暮らす、シェアハウスハック
ryosk7
0
250
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Building an army of robots
kneath
302
45k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
We Have a Design System, Now What?
morganepeng
51
7.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
6
210
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
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