SlideShare a Scribd company logo
CAKE 3Introduction to CakePHP 3
CAKE 3
CakePHP is a web development framework running on PHP 7
(min. PHP 5.5.9).
CakePHP is designed to make common web-development tasks
simple, and easy.
Follow MVC (Model, View, Controller) format
Conventions Over Configuration
Conventions Over Configuration
➤ CakePHP provides a basic organizational structure that covers
class names, filenames, database table names, and other
conventions. CakePHP provides that you can avoid needless
configuration and make a uniform application structure that
makes working with various projects simple.
CONVENTIONS OVER CONFIGURATION
➤ Table names will be plural (e.g., orders)
➤ The name of the primary key field will be id
➤ The names of any foreign key fields will be based on the
referenced table name followed by _id (e.g., the foreign key
into a customers table would be named customer_id).
LATEST IN CAKE3 IS THE NEW ORM !!!
➤ No more array in return.
➤ Cake3 return Entity/Object as return value
➤ Validation removed from Model
➤ Now its separated for reusable or more extensible
➤ Associations No Longer Defined as Properties
In ArticlesTable.php:
class ArticlesTable extends Table {
public function initialize(array $config) {
$this->belongsTo('Users');
}
}
➤ New api function patchEntity, removing not related data from saving
$user = $this->Users->patchEntity($user, $this->request->data);
➤ Cake’s ORM would by default retrieve any associated tables
when performing a query. As a result, a simple “find all” query
could potentially become quite bloated as the underlying SQL
would retrieve all data from all associated tables. In version 3,
this behavior is no longer the default.
use CakeORMTableRegistry;
Controller:
$users = TableRegistry::get(‘Users’);
View:
<?php foreach ($users as $user): ?>
<li class="user">
<?= $this->element('user', ['user' => $user]) ?>
</li>
<?php endforeach; ?>
REQUIREMENTS
➤ CakePHP 3.x supports PHP Version 5.4.16 and above.
➤ CakePHP 3.x requires the mbstring extension.
➤ CakePHP 3.x requires the intl extension.
➤ CakePHP should be installed with Composer
MIGRATION
➤ Upgrade tools for CakePHP meant to facilitate migrating from
CakePHP 2.x to 3.0.0.
Warning This tool is still under development and doesn't handle
all aspects of migrating.
POV: Do not migrate your project from Cake2 to Cake3
Solution: Redesigned the system and Adopt Cake3 standard

More Related Content

PPTX
System performance tuning
ODP
Database Connection With Mysql
PPT
MYSQL - PHP Database Connectivity
PDF
PHP and Mysql
ODP
My sql
PDF
Introduction to php database connectivity
PPT
Database presentation
System performance tuning
Database Connection With Mysql
MYSQL - PHP Database Connectivity
PHP and Mysql
My sql
Introduction to php database connectivity
Database presentation

What's hot (20)

PDF
REST API with CakePHP
PPTX
Php basics
PPT
PHP - Getting good with MySQL part II
PDF
lab56_db
PPT
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PDF
4.3 MySQL + PHP
PPT
PHP - PDO Objects
PPT
Php MySql For Beginners
PDF
Phinx talk
PPTX
Database Connectivity in PHP
PPT
Php with MYSQL Database
PPT
PHP and MySQL
PPTX
Working with WP_Query in WordPress
PDF
PDO Basics - PHPMelb 2014
PPTX
An introduction to Laravel Passport
PDF
Codeigniter : Two Step View - Concept Implementation
PDF
Codeigniter : Custom Routing - Manipulate Uri
PDF
Extending the WordPress REST API - Josh Pollock
PPTX
Message enricher in mule
PPTX
Php Training Workshop by Vtips
REST API with CakePHP
Php basics
PHP - Getting good with MySQL part II
lab56_db
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
4.3 MySQL + PHP
PHP - PDO Objects
Php MySql For Beginners
Phinx talk
Database Connectivity in PHP
Php with MYSQL Database
PHP and MySQL
Working with WP_Query in WordPress
PDO Basics - PHPMelb 2014
An introduction to Laravel Passport
Codeigniter : Two Step View - Concept Implementation
Codeigniter : Custom Routing - Manipulate Uri
Extending the WordPress REST API - Josh Pollock
Message enricher in mule
Php Training Workshop by Vtips
Ad

Similar to Cake PHP 3 Presentaion (20)

PDF
CakePHP
PPT
Synapseindia reviews sharing intro cakephp
PPTX
PDF
Intro to CakePHP
PPTX
Fundamentals, ORM and Security
PDF
An Introduction to CakePHP
PPT
Intro to CakePHP 1.3
PDF
New in cakephp3
ODP
PHP South Coast - Don't code bake, an introduction to CakePHP 3
PPTX
Ei cakephp
PPTX
Cakeph pppt
ODP
Get going with CakePHP Framework at gnuNify 2010
DOC
How to migrate Cakephp 1.x to 2.x
ODP
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
PPTX
PPTX
CakePHP workshop
PDF
Ch ch-changes cake php2
PDF
Introduction to CakePHP
PDF
Introduction to CakePHP
DOCX
10 reasons to choose CakePHP as Framework
CakePHP
Synapseindia reviews sharing intro cakephp
Intro to CakePHP
Fundamentals, ORM and Security
An Introduction to CakePHP
Intro to CakePHP 1.3
New in cakephp3
PHP South Coast - Don't code bake, an introduction to CakePHP 3
Ei cakephp
Cakeph pppt
Get going with CakePHP Framework at gnuNify 2010
How to migrate Cakephp 1.x to 2.x
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
CakePHP workshop
Ch ch-changes cake php2
Introduction to CakePHP
Introduction to CakePHP
10 reasons to choose CakePHP as Framework
Ad

Recently uploaded (20)

PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Big Data Technologies - Introduction.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25 Week I
madgavkar20181017ppt McKinsey Presentation.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
GamePlan Trading System Review: Professional Trader's Honest Take
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Machine learning based COVID-19 study performance prediction
Big Data Technologies - Introduction.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
Advanced methodologies resolving dimensionality complications for autism neur...
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25 Week I

Cake PHP 3 Presentaion

  • 2. CAKE 3 CakePHP is a web development framework running on PHP 7 (min. PHP 5.5.9). CakePHP is designed to make common web-development tasks simple, and easy. Follow MVC (Model, View, Controller) format Conventions Over Configuration
  • 3. Conventions Over Configuration ➤ CakePHP provides a basic organizational structure that covers class names, filenames, database table names, and other conventions. CakePHP provides that you can avoid needless configuration and make a uniform application structure that makes working with various projects simple.
  • 4. CONVENTIONS OVER CONFIGURATION ➤ Table names will be plural (e.g., orders) ➤ The name of the primary key field will be id ➤ The names of any foreign key fields will be based on the referenced table name followed by _id (e.g., the foreign key into a customers table would be named customer_id).
  • 5. LATEST IN CAKE3 IS THE NEW ORM !!! ➤ No more array in return. ➤ Cake3 return Entity/Object as return value ➤ Validation removed from Model ➤ Now its separated for reusable or more extensible ➤ Associations No Longer Defined as Properties In ArticlesTable.php: class ArticlesTable extends Table { public function initialize(array $config) { $this->belongsTo('Users'); } } ➤ New api function patchEntity, removing not related data from saving $user = $this->Users->patchEntity($user, $this->request->data);
  • 6. ➤ Cake’s ORM would by default retrieve any associated tables when performing a query. As a result, a simple “find all” query could potentially become quite bloated as the underlying SQL would retrieve all data from all associated tables. In version 3, this behavior is no longer the default.
  • 7. use CakeORMTableRegistry; Controller: $users = TableRegistry::get(‘Users’); View: <?php foreach ($users as $user): ?> <li class="user"> <?= $this->element('user', ['user' => $user]) ?> </li> <?php endforeach; ?>
  • 8. REQUIREMENTS ➤ CakePHP 3.x supports PHP Version 5.4.16 and above. ➤ CakePHP 3.x requires the mbstring extension. ➤ CakePHP 3.x requires the intl extension. ➤ CakePHP should be installed with Composer
  • 9. MIGRATION ➤ Upgrade tools for CakePHP meant to facilitate migrating from CakePHP 2.x to 3.0.0. Warning This tool is still under development and doesn't handle all aspects of migrating. POV: Do not migrate your project from Cake2 to Cake3 Solution: Redesigned the system and Adopt Cake3 standard