SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
Baking Cakes with PHP
     Central Florida PHP




                           1
Baking Cakes with PHP

• What Cake is and Why You Need It
• Ingredients
 • A Couple of Models
 • A Bunch of Views
 • A Controller or Two
 • A Pinch of ActiveRecord



                                     2
What Cake Is
     and
Why You Need It



                  3
Cake is...

• A platform for rapid development
• MVC + AR
• Application Scaffolding
• Compatible with PHP4 and PHP5




                                     4
MVC + AR = CakePHP




                     5
Model,View, Controller

• A design pattern for three tiers of data-
  driven applications
  • Modes represent data
  • Views represent the UI
  • Controllers handle logic




                                              6
Models

• Represent data used within an application
• Establish entity relationships
  • hasOne, hasMany, belongsTo,
    hasManyAndBelongsTo
• Provide validation rules



                                              7
Views

• Represent a page template
• Are directly associated with a controller’s
  action
• Usually are XHTML pages in a site,
  however may serve any content:
  • RSS Feeds, Email Messages, etc...



                                                8
Controllers

• Manage logic for a section of an app
• Act as a liaison between models and views
• Use actions to trigger functionality in an app
  • index, view, add, edit, delete, etc...




                                                   9
ActiveRecord

• Another design pattern specifically reading
  and writing to a database
• Represents a single record
• Adds additional functionality to models for
  saving and destroying a record
• Eliminates manual SQL completely


                                                10
Example anyone?




                  11

Contenu connexe

Tendances

Scaling a Web Service
Scaling a Web ServiceScaling a Web Service
Scaling a Web Service
Leon Ho
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
Shiju Varghese
 
Alfresco : Customizing the User Interface
Alfresco : Customizing the User InterfaceAlfresco : Customizing the User Interface
Alfresco : Customizing the User Interface
Wildan Maulana
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
guestd34230
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
Tuyển Đoàn
 

Tendances (20)

Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
Scaling a Web Service
Scaling a Web ServiceScaling a Web Service
Scaling a Web Service
 
Simple Web Services with PHP
Simple Web Services with PHPSimple Web Services with PHP
Simple Web Services with PHP
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
 
Blazor - An Introduction
Blazor - An IntroductionBlazor - An Introduction
Blazor - An Introduction
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
 
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
 
Alfresco : Customizing the User Interface
Alfresco : Customizing the User InterfaceAlfresco : Customizing the User Interface
Alfresco : Customizing the User Interface
 
JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 
MEAN stack
MEAN stackMEAN stack
MEAN stack
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
CakePHP 3
CakePHP 3CakePHP 3
CakePHP 3
 
Thin client SPAs? Stream UI using web standards (CodeNight)
Thin client SPAs? Stream UI using web standards (CodeNight)Thin client SPAs? Stream UI using web standards (CodeNight)
Thin client SPAs? Stream UI using web standards (CodeNight)
 
Thin client SPAs. Stream UI using web standards
Thin client SPAs. Stream UI using web standardsThin client SPAs. Stream UI using web standards
Thin client SPAs. Stream UI using web standards
 

Similaire à Baking Cakes With Php

An Introduction to CakePHP
An Introduction to CakePHPAn Introduction to CakePHP
An Introduction to CakePHP
elliando dias
 
Introduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVCIntroduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVC
cltru
 
Josin Wang Resume
Josin Wang ResumeJosin Wang Resume
Josin Wang Resume
Josin Wang
 

Similaire à Baking Cakes With Php (20)

An Introduction to CakePHP
An Introduction to CakePHPAn Introduction to CakePHP
An Introduction to CakePHP
 
Introduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVCIntroduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVC
 
PHP & MVC
PHP & MVCPHP & MVC
PHP & MVC
 
software programs
software programssoftware programs
software programs
 
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
 
Asp.Net Mvc Dev Days09
Asp.Net Mvc Dev Days09Asp.Net Mvc Dev Days09
Asp.Net Mvc Dev Days09
 
Introduction Asp.Net Core, MVC, Docker (Linux), Postman and Swagger
Introduction Asp.Net Core, MVC, Docker (Linux), Postman and SwaggerIntroduction Asp.Net Core, MVC, Docker (Linux), Postman and Swagger
Introduction Asp.Net Core, MVC, Docker (Linux), Postman and Swagger
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkGeneric repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity Framework
 
Generic Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EFGeneric Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EF
 
Josin Wang Resume
Josin Wang ResumeJosin Wang Resume
Josin Wang Resume
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
Aspnetmvc 1
Aspnetmvc 1Aspnetmvc 1
Aspnetmvc 1
 
Scripting Recipes for Testers
Scripting Recipes for TestersScripting Recipes for Testers
Scripting Recipes for Testers
 
Building Composite Applications in Lotus Notes
Building Composite Applications in Lotus NotesBuilding Composite Applications in Lotus Notes
Building Composite Applications in Lotus Notes
 
Laravel session 1
Laravel  session 1Laravel  session 1
Laravel session 1
 
SQLite3
SQLite3SQLite3
SQLite3
 
Unified Process
Unified ProcessUnified Process
Unified Process
 
Cakephp manual-11
Cakephp manual-11Cakephp manual-11
Cakephp manual-11
 
Couch Db
Couch DbCouch Db
Couch Db
 
Aspose pdf
Aspose pdfAspose pdf
Aspose pdf
 

Plus de Michael Girouard

JavaScript From Scratch: Writing Java Script Applications
JavaScript From Scratch: Writing Java Script ApplicationsJavaScript From Scratch: Writing Java Script Applications
JavaScript From Scratch: Writing Java Script Applications
Michael Girouard
 
A Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented PhpA Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented Php
Michael Girouard
 
Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5
Michael Girouard
 
Learning To Love Java Script
Learning To Love Java ScriptLearning To Love Java Script
Learning To Love Java Script
Michael Girouard
 
Learning To Love Java Script Color
Learning To Love Java Script ColorLearning To Love Java Script Color
Learning To Love Java Script Color
Michael Girouard
 

Plus de Michael Girouard (16)

Day to Day Realities of an Independent Worker
Day to Day Realities of an Independent WorkerDay to Day Realities of an Independent Worker
Day to Day Realities of an Independent Worker
 
Responsible JavaScript
Responsible JavaScriptResponsible JavaScript
Responsible JavaScript
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
The Beauty of Java Script
The Beauty of Java ScriptThe Beauty of Java Script
The Beauty of Java Script
 
Ajax for PHP Developers
Ajax for PHP DevelopersAjax for PHP Developers
Ajax for PHP Developers
 
JavaScript From Scratch: Writing Java Script Applications
JavaScript From Scratch: Writing Java Script ApplicationsJavaScript From Scratch: Writing Java Script Applications
JavaScript From Scratch: Writing Java Script Applications
 
JavaScript From Scratch: Events
JavaScript From Scratch: EventsJavaScript From Scratch: Events
JavaScript From Scratch: Events
 
JavaScript From Scratch: Playing With Data
JavaScript From Scratch: Playing With DataJavaScript From Scratch: Playing With Data
JavaScript From Scratch: Playing With Data
 
JavaScript from Scratch: Getting Your Feet Wet
JavaScript from Scratch: Getting Your Feet WetJavaScript from Scratch: Getting Your Feet Wet
JavaScript from Scratch: Getting Your Feet Wet
 
Its More Than Just Markup
Its More Than Just MarkupIts More Than Just Markup
Its More Than Just Markup
 
Web Standards Evangelism
Web Standards EvangelismWeb Standards Evangelism
Web Standards Evangelism
 
A Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented PhpA Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented Php
 
Cfphp Zce 01 Basics
Cfphp Zce 01 BasicsCfphp Zce 01 Basics
Cfphp Zce 01 Basics
 
Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5
 
Learning To Love Java Script
Learning To Love Java ScriptLearning To Love Java Script
Learning To Love Java Script
 
Learning To Love Java Script Color
Learning To Love Java Script ColorLearning To Love Java Script Color
Learning To Love Java Script Color
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Baking Cakes With Php

  • 1. Baking Cakes with PHP Central Florida PHP 1
  • 2. Baking Cakes with PHP • What Cake is and Why You Need It • Ingredients • A Couple of Models • A Bunch of Views • A Controller or Two • A Pinch of ActiveRecord 2
  • 3. What Cake Is and Why You Need It 3
  • 4. Cake is... • A platform for rapid development • MVC + AR • Application Scaffolding • Compatible with PHP4 and PHP5 4
  • 5. MVC + AR = CakePHP 5
  • 6. Model,View, Controller • A design pattern for three tiers of data- driven applications • Modes represent data • Views represent the UI • Controllers handle logic 6
  • 7. Models • Represent data used within an application • Establish entity relationships • hasOne, hasMany, belongsTo, hasManyAndBelongsTo • Provide validation rules 7
  • 8. Views • Represent a page template • Are directly associated with a controller’s action • Usually are XHTML pages in a site, however may serve any content: • RSS Feeds, Email Messages, etc... 8
  • 9. Controllers • Manage logic for a section of an app • Act as a liaison between models and views • Use actions to trigger functionality in an app • index, view, add, edit, delete, etc... 9
  • 10. ActiveRecord • Another design pattern specifically reading and writing to a database • Represents a single record • Adds additional functionality to models for saving and destroying a record • Eliminates manual SQL completely 10