SlideShare a Scribd company logo
1 of 21
Download to read offline
www.edureka.co/php-mysql
View PHP & MySQL with MVC Frameworks course details at www.edureka.co/php-mysql
For Queries:
Post on Twitter @edurekaIN: #askEdureka
Post on Facebook /edurekaIN
For more details please contact us:
US : 1800 275 9730 (toll free)
INDIA : +91 88808 62004
Email us : sales@edureka.co
Rapid Development with CakePHP
Slide 2 www.edureka.co/php-mysqlSlide 2
Objectives
At the end of this module, you will be able to understand:
MVC Architecture
CakePHP Introduction
Why to Use CakePHP
How to Configure CakePHP
Creating a Simple Web Application Using CakePHP
Slide 3 www.edureka.co/php-mysqlSlide 3
 Coding in straight PHP can lead to spaghetti code. Long lines of code that have multiple interactions and typically
have HTML code in it
 Leads to disorganization
 Difficult to re-use code
 Change one thing, break another
 Everything must be tested, which is difficult
 Hard code everything from scratch
 Teamwork challenges - parallel programming cannot be done efficiently
Drawbacks of Designing an Application Without Using a Framework
Design Patterns is a way to organize a program in a proper manner
One such design pattern is MVC
Slide 4 www.edureka.co/php-mysql
Introduction – What is MVC
MVC Introduction
 MVC is acronym for Model-View-Controller
 MVC is software design pattern for developing web and desktop applications
 It separates the application logic in easily manageable containers viz Model, View and
Controller
Slide 5 www.edureka.co/php-mysql
MVC Introduction - Model
 The Model container manages the data and business logic of the application
 Model receives requests for data access from View
 It also receives requests from Controller to update the data
 Model encapsulates the database and file access from rest of the application logic
Model
Slide 6 www.edureka.co/php-mysql
MVC Introduction - View
 The View container manages the presentation of data in specific format
 Each model can have multiple views associated with it
 View handles all the user interface elements e.g. forms, tables, formatted data
 View also implements templates to unify the overall look and feel of the website
View
Slide 7 www.edureka.co/php-mysql
MVC Introduction - Controller
 The Controller container manages all the communication between Model and view
 Controller is the entry point of all the requests made in the web application
 Controller responds to the events, communicate with model and sets data for view
 Controller can be considered as brain of the application
Controller
Slide 8 www.edureka.co/php-mysql
MVC Introduction - Illustration
Web
Browser/Client
HTTP Request
HTTP Response
CONTROLLER MODEL
VIEW
Data object
Request
Data Objects
Response
Render dataEvents
(GET/POST)
Handled by Framework
(Hidden from user)
Database
Database
Request
Raw Data
Response
MVC Container
Website User
http://www.mywebsite.com
Slide 9 www.edureka.co/php-mysql
CakePHP - Introduction
What is CakePHP?
 It is free, open source, rapid development framework for PHP
 Follows and implements MVC architecture
 Provides a basic structure for organizing files and database table names - keeping everything consistent and
logical.
 Other available frameworks are Zend framework, CodeIgniter, Laravel etc.
Slide 10 www.edureka.co/php-mysql
CakePHP - Introduction
Why CakePHP?
 Open source with flexible licensing
 Supports MVC architecture
 Easy to install with minimal configuration, faster to learn
 Powerful in-build form validation using models
 CakeBake to generate ready to use code
 Integrated CRUD for database interaction
 View helpers for AJAX, JavaScript, HTML forms and more
 Email, cookie, security, session, and request handling Components
Slide 11 www.edureka.co/php-mysqlSlide 11Slide 11Slide 11
Cake PHP Features
Code generation and scaffolding
 Scaffolding is a programming technique
popularized by Ruby on Rails where
code is generated for basic DB
operations
Easy configuration
 Two changes to a file, generate
database config
Out-of-the-box functionality
 DB Support, Form creation , validation
Users, authentication
Community
 Strong, Active
 Maintained Plugins
Clean MVC Implementation
 Industry standard design pattern
 Structured application
 Easy for developers to read
Cake PHP for a long time from 2005
 Broad user base
 Available documentation
Slide 12 www.edureka.co/php-mysql
CakePHP - Prerequisite
Prerequisite for CakePHP 2.5.6
 Apache httpd server 2.4
 PHP 5.2.8 or higher
 MySQL 4 or higher
 We are assuming that we already have PHP and MySQL setup running on the
machine
Slide 13 www.edureka.co/php-mysql
Configuring CakePHP (Contd…)
 Download the CakePHP version 2.5.6 zip file from
https://github.com/cakephp/cakephp/archive/2.5.6.zip
 Extract the zip file to the apache webserver document root directory
To get the document root directory location –
» Browse to Apache 2.4 directory
» Click on conf folder and edit the httpd.conf file
» Find the word “DocumentRoot”. It will have the document root directory path.
Slide 14 www.edureka.co/php-mysql
Configuring CakePHP (Contd…)
Document root
Slide 15 www.edureka.co/php-mysql
Configuring CakePHP (Contd…)
 Now Start the apache and MySQL server if it is not already running.
 Open web browser and enter http://localhost/cakephp-2.5.6/
 Browser will show the CakePHP index page. This means your CakePHP has been setup correctly.
 There are some warnings displayed in the index page. We will resolve them in post installation steps next.
Slide 16 www.edureka.co/php-mysql
Configuring CakePHP (Contd…)
Check the installation - Output
Slide 17 www.edureka.co/php-mysql
CakePHP folder structure
CakePHP core directories
 There are 4 core directories under CakePHP
 app, lib, plugins and vendors
Slide 18 www.edureka.co/php-mysql
CakePHP folder structure
CakePHP core directories
 app
» Main working directory for CakePHP development
» Contains all custom application code including model, view and controller.
» Also contains public webroot directory (document root)
 lib
» Contains all the core CakePHP libraries
» DO NOT modify any files in this directory as it will affect the core CakePHP functionality
 plugins
» Empty by default
» Can contain custom plugins made available to enhance CakePHP functionality
 vendors
» Empty by default
» Can contains third party libraries
Slide 19 www.edureka.co/php-mysql
Creating a Simple Web Application Using CakePHP
A Web application to display all the user details with an option to add a new user, edit an existing user and to delete a
user using CakePHP
Application to perform simple CRUD (Create, Read, Update and Delete) operations
Create a Database with name 'Edureka'
mysql> create database Edureka
Create a Database Table with name "users" in "Edureka" Database with the following fields
ID
FIRST_NAME
LAST_NAME
EMAIL
MOBILE
User Management System
Slide 20 www.edureka.co/php-mysql
Questions
Slide 21 www.edureka.co/php-mysql

More Related Content

What's hot

Tutorial PHP and Dreamweaver CS3
Tutorial PHP and Dreamweaver CS3Tutorial PHP and Dreamweaver CS3
Tutorial PHP and Dreamweaver CS3Halizah Ahmad
 
APEX navigation concepts
APEX navigation conceptsAPEX navigation concepts
APEX navigation conceptsTobias Arnhold
 
Getting Started with the Joomla! Framework
Getting Started with the Joomla! FrameworkGetting Started with the Joomla! Framework
Getting Started with the Joomla! FrameworkMichael Babker
 
UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5Stuart Lodge
 
Facebook Connect Tutorial
Facebook Connect TutorialFacebook Connect Tutorial
Facebook Connect TutorialPrateek Dayal
 
Magento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | MagenestMagento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | MagenestMagenest
 
Uk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net NukeUk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net NukeStuart Lodge
 
Joomla english for the work group
Joomla english for the work groupJoomla english for the work group
Joomla english for the work groupVicent Selfa
 
First Pages HTML ASP-ASP.NET
First Pages HTML ASP-ASP.NETFirst Pages HTML ASP-ASP.NET
First Pages HTML ASP-ASP.NETsunmitraeducation
 
Facebook Developer Garage Cyberjaya
Facebook Developer Garage CyberjayaFacebook Developer Garage Cyberjaya
Facebook Developer Garage CyberjayaMehedi Hasan Sumon
 
Custom Template for Joomla! 3
Custom Template for Joomla! 3Custom Template for Joomla! 3
Custom Template for Joomla! 3Carly Willats
 
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Edureka!
 
Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)Amit Kumar Singh
 
Joomla Template Tutorial
Joomla Template TutorialJoomla Template Tutorial
Joomla Template Tutorialbrighteyes
 
iWeb NJECC June 28, 2011 DAndrea
iWeb NJECC June 28, 2011 DAndreaiWeb NJECC June 28, 2011 DAndrea
iWeb NJECC June 28, 2011 DAndreaD'Andrea
 
Building an interactive timeline from facebook photos
Building an interactive timeline from facebook photosBuilding an interactive timeline from facebook photos
Building an interactive timeline from facebook photosRakesh Rajan
 
How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2Magestore
 

What's hot (20)

Tutorial PHP and Dreamweaver CS3
Tutorial PHP and Dreamweaver CS3Tutorial PHP and Dreamweaver CS3
Tutorial PHP and Dreamweaver CS3
 
APEX navigation concepts
APEX navigation conceptsAPEX navigation concepts
APEX navigation concepts
 
Asp.Net Tutorials
Asp.Net TutorialsAsp.Net Tutorials
Asp.Net Tutorials
 
Getting Started with the Joomla! Framework
Getting Started with the Joomla! FrameworkGetting Started with the Joomla! Framework
Getting Started with the Joomla! Framework
 
UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5
 
JOOMLA
JOOMLAJOOMLA
JOOMLA
 
Facebook Connect Tutorial
Facebook Connect TutorialFacebook Connect Tutorial
Facebook Connect Tutorial
 
Magento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | MagenestMagento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | Magenest
 
Uk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net NukeUk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net Nuke
 
Joomla english for the work group
Joomla english for the work groupJoomla english for the work group
Joomla english for the work group
 
First Pages HTML ASP-ASP.NET
First Pages HTML ASP-ASP.NETFirst Pages HTML ASP-ASP.NET
First Pages HTML ASP-ASP.NET
 
Facebook Developer Garage Cyberjaya
Facebook Developer Garage CyberjayaFacebook Developer Garage Cyberjaya
Facebook Developer Garage Cyberjaya
 
Custom Template for Joomla! 3
Custom Template for Joomla! 3Custom Template for Joomla! 3
Custom Template for Joomla! 3
 
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
 
Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)
 
Joomla Template Tutorial
Joomla Template TutorialJoomla Template Tutorial
Joomla Template Tutorial
 
iWeb NJECC June 28, 2011 DAndrea
iWeb NJECC June 28, 2011 DAndreaiWeb NJECC June 28, 2011 DAndrea
iWeb NJECC June 28, 2011 DAndrea
 
Building an interactive timeline from facebook photos
Building an interactive timeline from facebook photosBuilding an interactive timeline from facebook photos
Building an interactive timeline from facebook photos
 
How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2
 
Developing a website
Developing a websiteDeveloping a website
Developing a website
 

Viewers also liked

Learning CakePHP2 from source code vol2
Learning CakePHP2 from source code vol2Learning CakePHP2 from source code vol2
Learning CakePHP2 from source code vol2Hideshi Ogoshi
 
How to create test data
How to create test dataHow to create test data
How to create test dataHideshi Ogoshi
 
Road to CakePHP 3.0
Road to CakePHP 3.0Road to CakePHP 3.0
Road to CakePHP 3.0markstory
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsVforce Infotech
 
PHP MVC Tutorial
PHP MVC TutorialPHP MVC Tutorial
PHP MVC TutorialYang Bruce
 
A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!Muhammad Ghazali
 
Un exemple élémentaire d'application MVC en PHP
Un exemple élémentaire d'application MVC en PHPUn exemple élémentaire d'application MVC en PHP
Un exemple élémentaire d'application MVC en PHPKristen Le Liboux
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorialalexjones89
 
Roll Your Own Content Management System
Roll Your Own Content Management SystemRoll Your Own Content Management System
Roll Your Own Content Management Systemguest0fe006
 
Joomla-Content Management System
Joomla-Content Management SystemJoomla-Content Management System
Joomla-Content Management SystemsilenceIT Inc.
 
Content Management System
Content Management SystemContent Management System
Content Management SystemOmnePresent
 

Viewers also liked (18)

Node js - Yns
Node js - YnsNode js - Yns
Node js - Yns
 
Learning CakePHP2 from source code vol2
Learning CakePHP2 from source code vol2Learning CakePHP2 from source code vol2
Learning CakePHP2 from source code vol2
 
How to create test data
How to create test dataHow to create test data
How to create test data
 
Road to CakePHP 3.0
Road to CakePHP 3.0Road to CakePHP 3.0
Road to CakePHP 3.0
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web Applications
 
Advanced Querying with CakePHP 3
Advanced Querying with CakePHP 3Advanced Querying with CakePHP 3
Advanced Querying with CakePHP 3
 
PHP MVC Tutorial
PHP MVC TutorialPHP MVC Tutorial
PHP MVC Tutorial
 
A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!
 
PHP MVC
PHP MVCPHP MVC
PHP MVC
 
Un exemple élémentaire d'application MVC en PHP
Un exemple élémentaire d'application MVC en PHPUn exemple élémentaire d'application MVC en PHP
Un exemple élémentaire d'application MVC en PHP
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
Roll Your Own Content Management System
Roll Your Own Content Management SystemRoll Your Own Content Management System
Roll Your Own Content Management System
 
Joomla-Content Management System
Joomla-Content Management SystemJoomla-Content Management System
Joomla-Content Management System
 
Content Management System
Content Management SystemContent Management System
Content Management System
 
Joomla - CMS
Joomla - CMSJoomla - CMS
Joomla - CMS
 
Content Management System
Content Management SystemContent Management System
Content Management System
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 

Similar to Rapid Development With CakePHP

Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP DevelopersEdureka!
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails DevelopersEdureka!
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET Journal
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterKHALID C
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
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 ...JPLoft Solutions
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Gaetano Giunta
 
MVC = Make Venerated Code?
MVC = Make Venerated Code?MVC = Make Venerated Code?
MVC = Make Venerated Code?Patrick Allaert
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCIan Carnaghan
 

Similar to Rapid Development With CakePHP (20)

Cakephp manual-11
Cakephp manual-11Cakephp manual-11
Cakephp manual-11
 
Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP Developers
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
 
Know about cake php framework with vertexplus
Know about  cake php framework with vertexplusKnow about  cake php framework with vertexplus
Know about cake php framework with vertexplus
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniter
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)
 
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 ...
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Php Framework
Php FrameworkPhp Framework
Php Framework
 
Php framework
Php frameworkPhp framework
Php framework
 
P H P Framework
P H P  FrameworkP H P  Framework
P H P Framework
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
 
sample1
sample1sample1
sample1
 
Magento
MagentoMagento
Magento
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
MVC = Make Venerated Code?
MVC = Make Venerated Code?MVC = Make Venerated Code?
MVC = Make Venerated Code?
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVC
 

More from Edureka!

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaEdureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaEdureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaEdureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaEdureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaEdureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaEdureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaEdureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaEdureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaEdureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaEdureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | EdurekaEdureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEdureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEdureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaEdureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaEdureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaEdureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaEdureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaEdureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | EdurekaEdureka!
 

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Recently uploaded (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Rapid Development With CakePHP

  • 1. www.edureka.co/php-mysql View PHP & MySQL with MVC Frameworks course details at www.edureka.co/php-mysql For Queries: Post on Twitter @edurekaIN: #askEdureka Post on Facebook /edurekaIN For more details please contact us: US : 1800 275 9730 (toll free) INDIA : +91 88808 62004 Email us : sales@edureka.co Rapid Development with CakePHP
  • 2. Slide 2 www.edureka.co/php-mysqlSlide 2 Objectives At the end of this module, you will be able to understand: MVC Architecture CakePHP Introduction Why to Use CakePHP How to Configure CakePHP Creating a Simple Web Application Using CakePHP
  • 3. Slide 3 www.edureka.co/php-mysqlSlide 3  Coding in straight PHP can lead to spaghetti code. Long lines of code that have multiple interactions and typically have HTML code in it  Leads to disorganization  Difficult to re-use code  Change one thing, break another  Everything must be tested, which is difficult  Hard code everything from scratch  Teamwork challenges - parallel programming cannot be done efficiently Drawbacks of Designing an Application Without Using a Framework Design Patterns is a way to organize a program in a proper manner One such design pattern is MVC
  • 4. Slide 4 www.edureka.co/php-mysql Introduction – What is MVC MVC Introduction  MVC is acronym for Model-View-Controller  MVC is software design pattern for developing web and desktop applications  It separates the application logic in easily manageable containers viz Model, View and Controller
  • 5. Slide 5 www.edureka.co/php-mysql MVC Introduction - Model  The Model container manages the data and business logic of the application  Model receives requests for data access from View  It also receives requests from Controller to update the data  Model encapsulates the database and file access from rest of the application logic Model
  • 6. Slide 6 www.edureka.co/php-mysql MVC Introduction - View  The View container manages the presentation of data in specific format  Each model can have multiple views associated with it  View handles all the user interface elements e.g. forms, tables, formatted data  View also implements templates to unify the overall look and feel of the website View
  • 7. Slide 7 www.edureka.co/php-mysql MVC Introduction - Controller  The Controller container manages all the communication between Model and view  Controller is the entry point of all the requests made in the web application  Controller responds to the events, communicate with model and sets data for view  Controller can be considered as brain of the application Controller
  • 8. Slide 8 www.edureka.co/php-mysql MVC Introduction - Illustration Web Browser/Client HTTP Request HTTP Response CONTROLLER MODEL VIEW Data object Request Data Objects Response Render dataEvents (GET/POST) Handled by Framework (Hidden from user) Database Database Request Raw Data Response MVC Container Website User http://www.mywebsite.com
  • 9. Slide 9 www.edureka.co/php-mysql CakePHP - Introduction What is CakePHP?  It is free, open source, rapid development framework for PHP  Follows and implements MVC architecture  Provides a basic structure for organizing files and database table names - keeping everything consistent and logical.  Other available frameworks are Zend framework, CodeIgniter, Laravel etc.
  • 10. Slide 10 www.edureka.co/php-mysql CakePHP - Introduction Why CakePHP?  Open source with flexible licensing  Supports MVC architecture  Easy to install with minimal configuration, faster to learn  Powerful in-build form validation using models  CakeBake to generate ready to use code  Integrated CRUD for database interaction  View helpers for AJAX, JavaScript, HTML forms and more  Email, cookie, security, session, and request handling Components
  • 11. Slide 11 www.edureka.co/php-mysqlSlide 11Slide 11Slide 11 Cake PHP Features Code generation and scaffolding  Scaffolding is a programming technique popularized by Ruby on Rails where code is generated for basic DB operations Easy configuration  Two changes to a file, generate database config Out-of-the-box functionality  DB Support, Form creation , validation Users, authentication Community  Strong, Active  Maintained Plugins Clean MVC Implementation  Industry standard design pattern  Structured application  Easy for developers to read Cake PHP for a long time from 2005  Broad user base  Available documentation
  • 12. Slide 12 www.edureka.co/php-mysql CakePHP - Prerequisite Prerequisite for CakePHP 2.5.6  Apache httpd server 2.4  PHP 5.2.8 or higher  MySQL 4 or higher  We are assuming that we already have PHP and MySQL setup running on the machine
  • 13. Slide 13 www.edureka.co/php-mysql Configuring CakePHP (Contd…)  Download the CakePHP version 2.5.6 zip file from https://github.com/cakephp/cakephp/archive/2.5.6.zip  Extract the zip file to the apache webserver document root directory To get the document root directory location – » Browse to Apache 2.4 directory » Click on conf folder and edit the httpd.conf file » Find the word “DocumentRoot”. It will have the document root directory path.
  • 14. Slide 14 www.edureka.co/php-mysql Configuring CakePHP (Contd…) Document root
  • 15. Slide 15 www.edureka.co/php-mysql Configuring CakePHP (Contd…)  Now Start the apache and MySQL server if it is not already running.  Open web browser and enter http://localhost/cakephp-2.5.6/  Browser will show the CakePHP index page. This means your CakePHP has been setup correctly.  There are some warnings displayed in the index page. We will resolve them in post installation steps next.
  • 16. Slide 16 www.edureka.co/php-mysql Configuring CakePHP (Contd…) Check the installation - Output
  • 17. Slide 17 www.edureka.co/php-mysql CakePHP folder structure CakePHP core directories  There are 4 core directories under CakePHP  app, lib, plugins and vendors
  • 18. Slide 18 www.edureka.co/php-mysql CakePHP folder structure CakePHP core directories  app » Main working directory for CakePHP development » Contains all custom application code including model, view and controller. » Also contains public webroot directory (document root)  lib » Contains all the core CakePHP libraries » DO NOT modify any files in this directory as it will affect the core CakePHP functionality  plugins » Empty by default » Can contain custom plugins made available to enhance CakePHP functionality  vendors » Empty by default » Can contains third party libraries
  • 19. Slide 19 www.edureka.co/php-mysql Creating a Simple Web Application Using CakePHP A Web application to display all the user details with an option to add a new user, edit an existing user and to delete a user using CakePHP Application to perform simple CRUD (Create, Read, Update and Delete) operations Create a Database with name 'Edureka' mysql> create database Edureka Create a Database Table with name "users" in "Edureka" Database with the following fields ID FIRST_NAME LAST_NAME EMAIL MOBILE User Management System