SlideShare a Scribd company logo
CakePHP
Build fast, grow solid.
What is CakePHP?
What is CakePHP?
CakePHP is a modern, free, open-source, rapid development framework
for PHP. It's a foundational structure for programmers to create web
applications. Our primary goal is to enable you to work in a structured
and rapid manner–without loss of flexibility. CakePHP takes the
monotony out of web development.
•One of the original PHP frameworks, dating from late 2004
•An opinionated MVC framework
•Convention over configuration
•Encourages DRY coding principles
•Aims to solve 80% of the problem, and then stay out of your way
What is CakePHP?
•Active and friendly community
•A core team of highly motivated and experienced developers
•Long support life cycles for major releases
•Backwards compatibility between minor releases
What is CakePHP?
The CakePHP Community
•Active, supportive and helpful community
•CakePHP Forum – discourse.cakephp.org
•Slack and IRC – cakesf.herokuapp.com
•Stackoverflow
•Large eco-system of plugins and packages
•Regular live training sessions – training.cakephp.org
•An awesome full-time community manager – community@cakephp.org
•@cakephp
CakeFest
CakeFest
Learn new skills
Meet awesome people
Eat cake
CakeSwag
swag.cakephp.org
Get unique T-Shirts, ElePHPants
and mugs
The core team
What’s new in CakePHP 3
•A new ORM that is powerful, flexible and lightweight
•Simple Form generator
•Internationalization out the box (And it makes sense)
•Standards complaint (PSR-2, 3, 4 and 7)
•Middleware oriented stack
Easy, one-liner pagination (Even for complex queries)
Automatic association saving
Flexible association strategies
Result streaming
Query caching
Finder callbacks
Composite key support (Including foreign keys)
Tree structures
CSRF protection
Form tampering protection
Mailer classes
Authentication
Code generation
Advanced date and time support (Thanks to the Chronos library)
Database migrations (Thanks to Phinx)
Standalone packages
•You can use bits of CakePHP without using CakePHP
•Separate components that can be used in any PHP project
cakephp/cache

cakephp/event

cakephp/validation

cakephp/orm

cakephp/collection
cakephp/authentication
cakephp/phinx
cakephp/i18n
PSR-7 support
•3.4 is fully PSR-7 compatible
•Uses a middleware stack
•Both request and response objects are immutable
•A large collection of middleware already included, and most other
middleware is supported
The future
The future*
•3.5 – Middle 2017
•Routable Middleware
•Migrating certain bits of functionality into middleware
•3.6 – End 2017
•Route builder DSL
•Replace Shell with a Command builder
•Hard deprecate the soft deprecated functionality
•4.0 – Early 2018
•Clean-up by removing all deprecated functionality

https://github.com/cakephp/cakephp/wiki

https://bakery.cakephp.org/2017/06/23/upcoming-cakephp-roadmap.html
* Subject to change depending on community feedback
The future*
•2.x long term support?
•Bug fixes for 12 months
•Security fixes for 18 months
•3.x long term support?
•Bug fixes for 18 months
•Security fixes for 36 months
* Subject to change depending on community feedback
Let’s get baking
Installing CakePHP
Full virtual environment available https://
github.com/FriendsOfCake/vagrant-chef
$ composer create-project cakephp/app
$ cd app && bin/cake server
Easier than baking a cake!
•Download Oven from https://github.com/cakedc/oven
•Put the oven.php file on your server
•Open the script in your browser (etc. http://localhost/oven.php)
Now even, easier than baking a cake with
Intro to CakePHP
Intro to CakePHP
Intro to CakePHP
•A web-based CakePHP plugin installer
•Helps you discover new CakePHP plugins
•Includes “Kitchen” which is a web-frontend for the Cake Bake tool (More on that later)
•Install with composer, or with Oven
•Access via http://localhost/mixer
Introducing
Intro to CakePHP
Intro to CakePHP
Create a database
•Schema from https://book.cakephp.org/3.0/en/tutorials-and-examples/cms/
database.html
Skip the hard work
$ bin/cake bake all users
$ bin/cake bake all articles
$ bin/cake bake all tags
$ bin/cake bake all --everything
Less typey-typey, more clicky-clicky
What? A working application!
Fixing broken stuff
•Interactive stack trace
•Method argument inspection
•Possible solution hints
•Inspired by Whoops!
DebugKit
•CakePHP 3 comes with a debug
toolbar pre-installed
•Facilitates in-depth application
inspection
•Continuously being improved
Putting the rapid into RAD
•How do we prevent repetitive controller code?
•How do we have both a web and REST interface?
•How about a JSON API spec compatible interface?
•How do we do this without creating messy spaghetti code?
The CRUD plugin
•Dynamic, event-driven and production ready scaffolding
•Automatic REST API generation
•Single responsibility action classes
Installing CRUD
•Remove all code from your controllers
•Go on holiday, your work is done
class AppController extends Controller

{

use CrudControllerControllerTrait;



public function initialize()

{

$this->loadComponent('Crud.Crud', [

'actions' => [

'Crud.Index',

'Crud.Add',

'Crud.Edit',

'Crud.View',

'Crud.Delete'

]

]);

}

}
$ composer require friendsofcake/crud OR use Mixer
Creating a REST API
•Converts all actions into a web service capable of responding in JSON or XML
•Takes care of all error handling and validation errors
•Automatically adds a “layout” to your responses
// config/routes.php

$routes->extensions(['json', 'xml']);
public function initialize()

{

...

$this->loadComponent('RequestHandler');



$this->Crud->addListener('Crud.Api');

$this->Crud->addListener('Crud.ApiPagination');

$this->Crud->addListener('Crud.ApiQueryLog');

}
Creating a REST API
$ curl –X GET localhost:8765/articles -H ‘Accept: application/json’
{
"success": true,
"data": [
{
"id": 1,
"user_id": 1,
"title": "First Post",
"slug": "first-post",
"body": "This is the first post.",
"published": true,
"created": "2017-07-03T17:23:06+00:00",
"modified": "2017-07-03T17:23:06+00:00"
}
],
"pagination": {
"page_count": 1,
"current_page": 1,
"has_next_page": false,
"has_prev_page": false,
"count": 1,
"limit": null
}
}
But, I want JSON API
•Converts all actions into a web service capable of responding in spec complaint JSON API
•Takes care of all error handling and validation errors as per the JSON API spec
•Works with the standard JSON API too
public function initialize()

{

...

$this->loadComponent('RequestHandler');



$this->Crud->addListener(‘CrudJsonApi.JsonApi');

}
$ composer require friendsofcake/crud-json-api OR use Mixer
JSON API
$ curl –X GET ‘localhost:8765/articles?include=users’ -H ‘Accept: application/vnd.api+json’
{
"data": [
{
"type": "articles",
"id": "1",
"attributes": {
"title": "First Post",
"slug": "first-post",
"body": "This is the first post.",
"published": true,
"created": "2017-07-03T17:25:23+00:00",
"modified": "2017-07-03T17:25:23+00:00"
},
"relationships": {
"user": {
"data": {
"type": "users",
"id": "1"
},
"links": {
"self": "/users/view/1"
}
}
},
"links": {
"self": "/articles/view/1"
}
}
],
"included": [
{
"type": "users",
"id": "1",
"attributes": {
"email": "cakephp@example.com",
"created": "2017-07-03T17:25:23+00:00",
"modified": "2017-07-03T17:25:23+00:00"
},
"links": {
"self": "/users/view/1"
}
}
]
}
Why write HTML?
•Generate always-up-to-date admin interfaces
•Delete all your template files
public function initialize()

{

...

$this->loadComponent('RequestHandler');



$this->Crud->addListener(‘CrudView.View’);

}
public function beforeRender()

{ 

$this->viewBuilder()->className(‘CrudViewViewCrudView’);

}
$ composer require friendsofcake/crud-view OR use Mixer (Also install friendsofcake/bootstrap-ui)
Intro to CakePHP
Other awesome plugins
•TinyAuth – Light weight role based authentication
•Friends of Cake Search – Simple interface for creating paginate-able filters
•TwigView – Use Twig for your templates
•Liquid – Use Liquid for your templates
•CakePDF – Easily create PDF files
•The Queue plugin – Dependency-free worker queues
Many many more available from https://github.com/friendsofcake/awesome-cakephp
and via Mixer
Also keep an eye on the @cakephp twitter feed for weekly featured plugins!
Walther Lalk
CakePHP core team member
Croogo core team member
Software Developer at
Troop Scouter at 9th Pretoria (Irene) Air Scouts
Husband
github.com/dakota
@dakotairene
waltherlalk.com
Thank you
github.com/dakota
@dakotairene
waltherlalk.com
Don’t forget to buy Swag!
swag.cakephp.org
Ad

More Related Content

What's hot (20)

Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
Betclic Everest Group Tech Team
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
Daniel Woods
 
Learning chef
Learning chefLearning chef
Learning chef
Jonathan Carrillo
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Software, Inc.
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Josh Padnick
 
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Chef
 
Michelin Starred Cooking with Chef
Michelin Starred Cooking with ChefMichelin Starred Cooking with Chef
Michelin Starred Cooking with Chef
Jon Cowie
 
Docker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 WorkshopDocker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 Workshop
Chris Tankersley
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
Ethan Ram
 
Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)
Chris Tankersley
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
Jennifer Davis
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
Chef Software, Inc.
 
Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016
Chris Tankersley
 
CPAN Workshop, Chicago 2014
CPAN Workshop, Chicago 2014CPAN Workshop, Chicago 2014
CPAN Workshop, Chicago 2014
brian d foy
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
Damith Kothalawala
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
Bryan Berry
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
Tuenti
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Chef
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Software, Inc.
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
Chef Software, Inc.
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
Daniel Woods
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Software, Inc.
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Josh Padnick
 
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Chef
 
Michelin Starred Cooking with Chef
Michelin Starred Cooking with ChefMichelin Starred Cooking with Chef
Michelin Starred Cooking with Chef
Jon Cowie
 
Docker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 WorkshopDocker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 Workshop
Chris Tankersley
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
Ethan Ram
 
Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)
Chris Tankersley
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
Jennifer Davis
 
Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016
Chris Tankersley
 
CPAN Workshop, Chicago 2014
CPAN Workshop, Chicago 2014CPAN Workshop, Chicago 2014
CPAN Workshop, Chicago 2014
brian d foy
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
Bryan Berry
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
Tuenti
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Chef
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Software, Inc.
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
Chef Software, Inc.
 

Similar to Intro to CakePHP (20)

Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
chukShirley
 
[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
European Collaboration Summit
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGI
Matthew Wilkes
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
AppScale @ LA.rb
AppScale @ LA.rbAppScale @ LA.rb
AppScale @ LA.rb
Chris Bunch
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
Jonathan Klein
 
Apereo OAE - Architectural overview
Apereo OAE - Architectural overviewApereo OAE - Architectural overview
Apereo OAE - Architectural overview
Nicolaas Matthijs
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
RX-M Enterprises LLC
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
Ortus Solutions, Corp
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7
Shekhar Gulati
 
PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matter
Mizno Kruge
 
Apereo OAE - Bootcamp
Apereo OAE - BootcampApereo OAE - Bootcamp
Apereo OAE - Bootcamp
Nicolaas Matthijs
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
Chef
 
Exploring pwa for shopware
Exploring pwa for shopwareExploring pwa for shopware
Exploring pwa for shopware
Sander Mangel
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Nathen Harvey
 
Apigility-Powered APIs on IBM i
Apigility-Powered APIs on IBM iApigility-Powered APIs on IBM i
Apigility-Powered APIs on IBM i
chukShirley
 
Coders Workshop: API First Mobile Development Featuring Angular and Node
Coders Workshop: API First Mobile Development Featuring Angular and NodeCoders Workshop: API First Mobile Development Featuring Angular and Node
Coders Workshop: API First Mobile Development Featuring Angular and Node
Apigee | Google Cloud
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & Python
SmartBear
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11
Derek Jacoby
 
Key alias dev standard final
Key alias   dev standard finalKey alias   dev standard final
Key alias dev standard final
Raditya Alwafi Surachman
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
chukShirley
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGI
Matthew Wilkes
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
AppScale @ LA.rb
AppScale @ LA.rbAppScale @ LA.rb
AppScale @ LA.rb
Chris Bunch
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
Jonathan Klein
 
Apereo OAE - Architectural overview
Apereo OAE - Architectural overviewApereo OAE - Architectural overview
Apereo OAE - Architectural overview
Nicolaas Matthijs
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
RX-M Enterprises LLC
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7
Shekhar Gulati
 
PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matter
Mizno Kruge
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
Chef
 
Exploring pwa for shopware
Exploring pwa for shopwareExploring pwa for shopware
Exploring pwa for shopware
Sander Mangel
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Nathen Harvey
 
Apigility-Powered APIs on IBM i
Apigility-Powered APIs on IBM iApigility-Powered APIs on IBM i
Apigility-Powered APIs on IBM i
chukShirley
 
Coders Workshop: API First Mobile Development Featuring Angular and Node
Coders Workshop: API First Mobile Development Featuring Angular and NodeCoders Workshop: API First Mobile Development Featuring Angular and Node
Coders Workshop: API First Mobile Development Featuring Angular and Node
Apigee | Google Cloud
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & Python
SmartBear
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11
Derek Jacoby
 
Ad

Recently uploaded (20)

Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Ad

Intro to CakePHP

  • 3. What is CakePHP? CakePHP is a modern, free, open-source, rapid development framework for PHP. It's a foundational structure for programmers to create web applications. Our primary goal is to enable you to work in a structured and rapid manner–without loss of flexibility. CakePHP takes the monotony out of web development.
  • 4. •One of the original PHP frameworks, dating from late 2004 •An opinionated MVC framework •Convention over configuration •Encourages DRY coding principles •Aims to solve 80% of the problem, and then stay out of your way What is CakePHP?
  • 5. •Active and friendly community •A core team of highly motivated and experienced developers •Long support life cycles for major releases •Backwards compatibility between minor releases What is CakePHP?
  • 6. The CakePHP Community •Active, supportive and helpful community •CakePHP Forum – discourse.cakephp.org •Slack and IRC – cakesf.herokuapp.com •Stackoverflow •Large eco-system of plugins and packages •Regular live training sessions – training.cakephp.org •An awesome full-time community manager – [email protected] •@cakephp
  • 8. CakeFest Learn new skills Meet awesome people Eat cake
  • 11. What’s new in CakePHP 3 •A new ORM that is powerful, flexible and lightweight •Simple Form generator •Internationalization out the box (And it makes sense) •Standards complaint (PSR-2, 3, 4 and 7) •Middleware oriented stack
  • 12. Easy, one-liner pagination (Even for complex queries) Automatic association saving Flexible association strategies Result streaming Query caching Finder callbacks Composite key support (Including foreign keys) Tree structures CSRF protection Form tampering protection Mailer classes Authentication Code generation Advanced date and time support (Thanks to the Chronos library) Database migrations (Thanks to Phinx)
  • 13. Standalone packages •You can use bits of CakePHP without using CakePHP •Separate components that can be used in any PHP project cakephp/cache
 cakephp/event
 cakephp/validation
 cakephp/orm
 cakephp/collection cakephp/authentication cakephp/phinx cakephp/i18n
  • 14. PSR-7 support •3.4 is fully PSR-7 compatible •Uses a middleware stack •Both request and response objects are immutable •A large collection of middleware already included, and most other middleware is supported
  • 16. The future* •3.5 – Middle 2017 •Routable Middleware •Migrating certain bits of functionality into middleware •3.6 – End 2017 •Route builder DSL •Replace Shell with a Command builder •Hard deprecate the soft deprecated functionality •4.0 – Early 2018 •Clean-up by removing all deprecated functionality
 https://github.com/cakephp/cakephp/wiki
 https://bakery.cakephp.org/2017/06/23/upcoming-cakephp-roadmap.html * Subject to change depending on community feedback
  • 17. The future* •2.x long term support? •Bug fixes for 12 months •Security fixes for 18 months •3.x long term support? •Bug fixes for 18 months •Security fixes for 36 months * Subject to change depending on community feedback
  • 19. Installing CakePHP Full virtual environment available https:// github.com/FriendsOfCake/vagrant-chef $ composer create-project cakephp/app $ cd app && bin/cake server Easier than baking a cake!
  • 20. •Download Oven from https://github.com/cakedc/oven •Put the oven.php file on your server •Open the script in your browser (etc. http://localhost/oven.php) Now even, easier than baking a cake with
  • 24. •A web-based CakePHP plugin installer •Helps you discover new CakePHP plugins •Includes “Kitchen” which is a web-frontend for the Cake Bake tool (More on that later) •Install with composer, or with Oven •Access via http://localhost/mixer Introducing
  • 27. Create a database •Schema from https://book.cakephp.org/3.0/en/tutorials-and-examples/cms/ database.html
  • 28. Skip the hard work $ bin/cake bake all users $ bin/cake bake all articles $ bin/cake bake all tags $ bin/cake bake all --everything
  • 29. Less typey-typey, more clicky-clicky
  • 30. What? A working application!
  • 31. Fixing broken stuff •Interactive stack trace •Method argument inspection •Possible solution hints •Inspired by Whoops!
  • 32. DebugKit •CakePHP 3 comes with a debug toolbar pre-installed •Facilitates in-depth application inspection •Continuously being improved
  • 33. Putting the rapid into RAD •How do we prevent repetitive controller code? •How do we have both a web and REST interface? •How about a JSON API spec compatible interface? •How do we do this without creating messy spaghetti code? The CRUD plugin •Dynamic, event-driven and production ready scaffolding •Automatic REST API generation •Single responsibility action classes
  • 34. Installing CRUD •Remove all code from your controllers •Go on holiday, your work is done class AppController extends Controller
 {
 use CrudControllerControllerTrait;
 
 public function initialize()
 {
 $this->loadComponent('Crud.Crud', [
 'actions' => [
 'Crud.Index',
 'Crud.Add',
 'Crud.Edit',
 'Crud.View',
 'Crud.Delete'
 ]
 ]);
 }
 } $ composer require friendsofcake/crud OR use Mixer
  • 35. Creating a REST API •Converts all actions into a web service capable of responding in JSON or XML •Takes care of all error handling and validation errors •Automatically adds a “layout” to your responses // config/routes.php
 $routes->extensions(['json', 'xml']); public function initialize()
 {
 ...
 $this->loadComponent('RequestHandler');
 
 $this->Crud->addListener('Crud.Api');
 $this->Crud->addListener('Crud.ApiPagination');
 $this->Crud->addListener('Crud.ApiQueryLog');
 }
  • 36. Creating a REST API $ curl –X GET localhost:8765/articles -H ‘Accept: application/json’ { "success": true, "data": [ { "id": 1, "user_id": 1, "title": "First Post", "slug": "first-post", "body": "This is the first post.", "published": true, "created": "2017-07-03T17:23:06+00:00", "modified": "2017-07-03T17:23:06+00:00" } ], "pagination": { "page_count": 1, "current_page": 1, "has_next_page": false, "has_prev_page": false, "count": 1, "limit": null } }
  • 37. But, I want JSON API •Converts all actions into a web service capable of responding in spec complaint JSON API •Takes care of all error handling and validation errors as per the JSON API spec •Works with the standard JSON API too public function initialize()
 {
 ...
 $this->loadComponent('RequestHandler');
 
 $this->Crud->addListener(‘CrudJsonApi.JsonApi');
 } $ composer require friendsofcake/crud-json-api OR use Mixer
  • 38. JSON API $ curl –X GET ‘localhost:8765/articles?include=users’ -H ‘Accept: application/vnd.api+json’ { "data": [ { "type": "articles", "id": "1", "attributes": { "title": "First Post", "slug": "first-post", "body": "This is the first post.", "published": true, "created": "2017-07-03T17:25:23+00:00", "modified": "2017-07-03T17:25:23+00:00" }, "relationships": { "user": { "data": { "type": "users", "id": "1" }, "links": { "self": "/users/view/1" } } }, "links": { "self": "/articles/view/1" }
  • 39. } ], "included": [ { "type": "users", "id": "1", "attributes": { "email": "[email protected]", "created": "2017-07-03T17:25:23+00:00", "modified": "2017-07-03T17:25:23+00:00" }, "links": { "self": "/users/view/1" } } ] }
  • 40. Why write HTML? •Generate always-up-to-date admin interfaces •Delete all your template files public function initialize()
 {
 ...
 $this->loadComponent('RequestHandler');
 
 $this->Crud->addListener(‘CrudView.View’);
 } public function beforeRender()
 { 
 $this->viewBuilder()->className(‘CrudViewViewCrudView’);
 } $ composer require friendsofcake/crud-view OR use Mixer (Also install friendsofcake/bootstrap-ui)
  • 42. Other awesome plugins •TinyAuth – Light weight role based authentication •Friends of Cake Search – Simple interface for creating paginate-able filters •TwigView – Use Twig for your templates •Liquid – Use Liquid for your templates •CakePDF – Easily create PDF files •The Queue plugin – Dependency-free worker queues Many many more available from https://github.com/friendsofcake/awesome-cakephp and via Mixer Also keep an eye on the @cakephp twitter feed for weekly featured plugins!
  • 43. Walther Lalk CakePHP core team member Croogo core team member Software Developer at Troop Scouter at 9th Pretoria (Irene) Air Scouts Husband github.com/dakota @dakotairene waltherlalk.com
  • 45. Don’t forget to buy Swag! swag.cakephp.org