SlideShare a Scribd company logo
1 of 17
CAKEPHP
CakePHP is a free, open-source, rapid application
development(RAD) 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.
RAD
• RAD model is Rapid Application Development
model. It is a type of incremental model. In
RAD model the components or functions are
developed in parallel as if they were mini
projects.
Advantages of the RAD model:
• Reduced development time.
• Increases reusability of components
• Quick initial reviews occur
• Give support customer feedback
• Integration from very beginning solves a lot
of integration issues.
• RAD should be used when there is a need to create a
system that can be modularized in 2-3 months of time.
• It should be used if there’s high availability of designers
for modeling and the budget is high enough to afford
their cost along with the cost of automated code
generating tools.
• list of features you will enjoy when
using CakePHP:
• Active, friendly community
• Flexible licensing
• Compatible with versions 4 and 5 of PHP
• Integrated CRUD for database interaction
• Application scaffolding
• Code generation
• MVC architecture
• Request dispatcher with clean, custom URLs and
routes
• Built-in validation
Installation
Download CakePHP package
from http://cakephp.org/ and extract
that package and locate it your
xampp htdocs.
Run server (eg. Localhost/cakephp/)
Basics of CakePhp
•Folder Structure
• –App
• •Config: all configuration files
• •Models : application’s models, data sources and behaviors
• •Controllers : application’s controllers and components
• •Views : presentational files
• •Vendors : 3rdparty classes or libraries
• •Webroot: acts as document root for the application
• •Locale : stores string files for internationalization
• •Tmp: stores temporary data
• •Plugins: pluginpackages
• –Cake
• –Vendors
Steps
• •Creating the database
• •Creating a model
• •Creating a controller
• •Creating the views
Creating the database
• •Create a new table (name should be
according to the naming conventions)
• •Enter the data.
• •(Using phpmyadmin)
Creating a model
• •Separates the domain logic from presentation isolating
the application logic.
• •Extends AppModel(extends Model)
• •Contains data validation rules, association information and
methods specific to the table it uses.
• •For complete reference http://api.cakephp.org
• •Cakephpdynamically creates a model object
• class Book extends AppModel{
• var$name = ‘Book';
• }
• •We do can add some behaviors to each model.
Creating a controller
• •Manages the logic for a part of our application
• •Can access the model object by $this->Book
• class BooksControllerextends AppController{
• var$name = 'Books';
• function index() {
• $this->set('books', $this->Book->find('all'));
• }
• }
• •$this->loadModel(‘Article'); loads a different model
• •Components (packages of logic that are shared
between controllers)
Creating the views
• •Layouts (placed in /app/views/layouts)
• •Elements (reusable parts)
• •Helpers
• (var$helpers = array('Form', 'Html',
'Javascript', 'Time');)
Sample model
• <?php
• class Book extends AppModel
• {
• var$name = 'Book';
• var$validate = array(
• 'title' => array(
• 'rule' => 'notEmpty'
• ),
• 'author' => array(
• 'rule' => 'notEmpty'
• )
• );
• }
• ?>
Sample Controller
• <?php
• class BooksControllerextends AppController{
• var$name = 'Books';
• var$helpers = array('Html','Ajax','Javascript');
• function index()
• {
• $this->set('books', $this->Book->find('all'));
• }
• function view($id = null) {
• $this->Book->id = $id;
• $this->set('book', $this->Book->read());
• print_r($this->viewVars);
• }
• }
Sample view
• <h1>Books</h1>
• <table>
• <tr>
• <th>Id</th>
• <th>Title</th>
• <th>Author</th>
• </tr>
• <?phpforeach($books as $book: ?>
• <tr>
• <td><?phpecho $book*‘Book'+*'id'+; ?></td>
• <td>
• <?phpecho $html->link($book*‘Book+*'title'+,
• array('controller' => ‘books’, 'action' => 'view', $book*‘Book+*'id'+)); ?>
• </td>
• <td><?phpecho $book*‘Book+*‘author'+; ?></td>
• </tr>
• <?phpendforeach; ?>
• </table>
• The webserver rewrite rules direct the request to
webroot/index.php.
• Your application’s autoloader and bootstrap files are
executed.
• Any dispatch filters that are configured can handle the
request, and optionally generate a response.
• The dispatcher selects the appropriate controller & action
based on routing rules.
• The controller’s action is called and the controller interacts
with the required Models and Components.
• The controller delegates response creation to the View to
generate the output resulting from the model data.
• The view uses Helpers and Cells to generate the response
body and headers.
• The response is sent back to the client.
Thank You

More Related Content

What's hot

Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel frameworkAhmad Fatoni
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!Fioriela Bego
 
OData RESTful implementation
OData RESTful implementationOData RESTful implementation
OData RESTful implementationHari Wiz
 
CakeFest 2013 - A-Z REST APIs
CakeFest 2013 - A-Z REST APIsCakeFest 2013 - A-Z REST APIs
CakeFest 2013 - A-Z REST APIsanthony_putignano
 
An Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemAn Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemRami Sayar
 
4. Introduction to ASP.NET MVC - Part I
4. Introduction to ASP.NET MVC - Part I4. Introduction to ASP.NET MVC - Part I
4. Introduction to ASP.NET MVC - Part IRohit Rao
 
SharePoint 2013 APIs
SharePoint 2013 APIsSharePoint 2013 APIs
SharePoint 2013 APIsJohn Calvert
 
Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Brooklyn Zelenka
 
SynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseindiappsdevelopment
 
IA& Taxonomy Planning for SharePoint Online & Office 365
IA& Taxonomy Planning for SharePoint Online & Office 365IA& Taxonomy Planning for SharePoint Online & Office 365
IA& Taxonomy Planning for SharePoint Online & Office 365DocFluix, LLC
 
Introduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APIIntroduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APISparkhound Inc.
 
Learn AJAX at ASIT
Learn AJAX at ASITLearn AJAX at ASIT
Learn AJAX at ASITASIT
 
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26Ruby Meditation
 
XpDays - Automated testing of responsive design (GalenFramework)
XpDays - Automated testing of responsive design (GalenFramework)XpDays - Automated testing of responsive design (GalenFramework)
XpDays - Automated testing of responsive design (GalenFramework)Alex Fruzenshtein
 

What's hot (18)

Building a spa_in_30min
Building a spa_in_30minBuilding a spa_in_30min
Building a spa_in_30min
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!
 
OData RESTful implementation
OData RESTful implementationOData RESTful implementation
OData RESTful implementation
 
CakeFest 2013 - A-Z REST APIs
CakeFest 2013 - A-Z REST APIsCakeFest 2013 - A-Z REST APIs
CakeFest 2013 - A-Z REST APIs
 
MVC Web Application
MVC Web ApplicationMVC Web Application
MVC Web Application
 
An Intense Overview of the React Ecosystem
An Intense Overview of the React EcosystemAn Intense Overview of the React Ecosystem
An Intense Overview of the React Ecosystem
 
4. Introduction to ASP.NET MVC - Part I
4. Introduction to ASP.NET MVC - Part I4. Introduction to ASP.NET MVC - Part I
4. Introduction to ASP.NET MVC - Part I
 
Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
 
SharePoint 2013 APIs
SharePoint 2013 APIsSharePoint 2013 APIs
SharePoint 2013 APIs
 
Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)
 
SynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseIndia dotnet client library Development
SynapseIndia dotnet client library Development
 
IA& Taxonomy Planning for SharePoint Online & Office 365
IA& Taxonomy Planning for SharePoint Online & Office 365IA& Taxonomy Planning for SharePoint Online & Office 365
IA& Taxonomy Planning for SharePoint Online & Office 365
 
Introduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APIIntroduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST API
 
Learn AJAX at ASIT
Learn AJAX at ASITLearn AJAX at ASIT
Learn AJAX at ASIT
 
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26New features in Rails 6 -  Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
 
XpDays - Automated testing of responsive design (GalenFramework)
XpDays - Automated testing of responsive design (GalenFramework)XpDays - Automated testing of responsive design (GalenFramework)
XpDays - Automated testing of responsive design (GalenFramework)
 
Ajax
AjaxAjax
Ajax
 

Viewers also liked

Project Involved_Mud Logger
Project Involved_Mud LoggerProject Involved_Mud Logger
Project Involved_Mud LoggerIbrando Silalahi
 
NetIQ POC for Kerberos & WSS Integrated System
NetIQ POC for Kerberos & WSS Integrated SystemNetIQ POC for Kerberos & WSS Integrated System
NetIQ POC for Kerberos & WSS Integrated SystemRajesh Kumar
 
Nil card
Nil cardNil card
Nil cardbjunque
 
Poetic terms - WorWic FA2016
Poetic terms - WorWic FA2016Poetic terms - WorWic FA2016
Poetic terms - WorWic FA2016Carol Matthews
 
Temas 5 y 6
Temas 5 y 6Temas 5 y 6
Temas 5 y 6cacc93
 
การจัดทำรายงานประจำปีของสถานศึกษา
การจัดทำรายงานประจำปีของสถานศึกษาการจัดทำรายงานประจำปีของสถานศึกษา
การจัดทำรายงานประจำปีของสถานศึกษาworapanthewaha
 
Resume-format-for-freshers-2
Resume-format-for-freshers-2Resume-format-for-freshers-2
Resume-format-for-freshers-2Gokul sivaa
 
Taller sustentabilidad turistica y mkt verde
Taller sustentabilidad turistica y mkt verdeTaller sustentabilidad turistica y mkt verde
Taller sustentabilidad turistica y mkt verdeVicente Ferreyra
 
Temas 5 y 6
Temas 5 y 6Temas 5 y 6
Temas 5 y 6cacc93
 
25th issue oct_2010_janata_ka_aa (2)
25th issue oct_2010_janata_ka_aa (2)25th issue oct_2010_janata_ka_aa (2)
25th issue oct_2010_janata_ka_aa (2)Janta Ka Aaina
 
Transmitiendo Cultura / Transmitting Culture
Transmitiendo Cultura / Transmitting  CultureTransmitiendo Cultura / Transmitting  Culture
Transmitiendo Cultura / Transmitting Culturelynemelendez
 
MS SQL SERVER: Programming sql server data mining
MS SQL SERVER: Programming sql server data miningMS SQL SERVER: Programming sql server data mining
MS SQL SERVER: Programming sql server data miningDataminingTools Inc
 
A Quick Guide to Maintenance Function
A Quick Guide to Maintenance FunctionA Quick Guide to Maintenance Function
A Quick Guide to Maintenance FunctionAnanth Palaniappan
 
Poetic Devices Presentation
Poetic Devices PresentationPoetic Devices Presentation
Poetic Devices Presentationmrsweeks
 
Internet an how it works
Internet an how it worksInternet an how it works
Internet an how it worksshahnaz10
 

Viewers also liked (19)

Project Involved_Mud Logger
Project Involved_Mud LoggerProject Involved_Mud Logger
Project Involved_Mud Logger
 
Símbolos patrios del perú
Símbolos patrios del perúSímbolos patrios del perú
Símbolos patrios del perú
 
NetIQ POC for Kerberos & WSS Integrated System
NetIQ POC for Kerberos & WSS Integrated SystemNetIQ POC for Kerberos & WSS Integrated System
NetIQ POC for Kerberos & WSS Integrated System
 
Nil card
Nil cardNil card
Nil card
 
Poetic terms - WorWic FA2016
Poetic terms - WorWic FA2016Poetic terms - WorWic FA2016
Poetic terms - WorWic FA2016
 
Temas 5 y 6
Temas 5 y 6Temas 5 y 6
Temas 5 y 6
 
การจัดทำรายงานประจำปีของสถานศึกษา
การจัดทำรายงานประจำปีของสถานศึกษาการจัดทำรายงานประจำปีของสถานศึกษา
การจัดทำรายงานประจำปีของสถานศึกษา
 
Resume-format-for-freshers-2
Resume-format-for-freshers-2Resume-format-for-freshers-2
Resume-format-for-freshers-2
 
Taller sustentabilidad turistica y mkt verde
Taller sustentabilidad turistica y mkt verdeTaller sustentabilidad turistica y mkt verde
Taller sustentabilidad turistica y mkt verde
 
Temas 5 y 6
Temas 5 y 6Temas 5 y 6
Temas 5 y 6
 
Hebreeen 6
Hebreeen 6Hebreeen 6
Hebreeen 6
 
25th issue oct_2010_janata_ka_aa (2)
25th issue oct_2010_janata_ka_aa (2)25th issue oct_2010_janata_ka_aa (2)
25th issue oct_2010_janata_ka_aa (2)
 
Transmitiendo Cultura / Transmitting Culture
Transmitiendo Cultura / Transmitting  CultureTransmitiendo Cultura / Transmitting  Culture
Transmitiendo Cultura / Transmitting Culture
 
MS SQL SERVER: Programming sql server data mining
MS SQL SERVER: Programming sql server data miningMS SQL SERVER: Programming sql server data mining
MS SQL SERVER: Programming sql server data mining
 
A Quick Guide to Maintenance Function
A Quick Guide to Maintenance FunctionA Quick Guide to Maintenance Function
A Quick Guide to Maintenance Function
 
Que es un port (mestre) primaria
Que es un port (mestre) primaria Que es un port (mestre) primaria
Que es un port (mestre) primaria
 
Presentación sobre Dinardap
Presentación sobre DinardapPresentación sobre Dinardap
Presentación sobre Dinardap
 
Poetic Devices Presentation
Poetic Devices PresentationPoetic Devices Presentation
Poetic Devices Presentation
 
Internet an how it works
Internet an how it worksInternet an how it works
Internet an how it works
 

Similar to Ei cakephp

cake phptutorial
cake phptutorialcake phptutorial
cake phptutorialice27
 
Synapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindiaComplaints
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowMatt Ray
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineYared Ayalew
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxMichael Hackstein
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service BIOVIA
 
Leveraging the Chaos tool suite for module development
Leveraging the Chaos tool suite  for module developmentLeveraging the Chaos tool suite  for module development
Leveraging the Chaos tool suite for module developmentzroger
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino DesignerPaul Withers
 
Modern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint OnlineModern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint OnlineDocFluix, LLC
 
Tips for Tuning Solr Search: No Coding Required
Tips for Tuning Solr Search: No Coding RequiredTips for Tuning Solr Search: No Coding Required
Tips for Tuning Solr Search: No Coding RequiredAcquia
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5jakemallory
 
A Beginner's Guide to Ember
A Beginner's Guide to EmberA Beginner's Guide to Ember
A Beginner's Guide to EmberRichard Martin
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoopclairvoyantllc
 
Lecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptxLecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptxSaziaRahman
 
Django Overview
Django OverviewDjango Overview
Django OverviewBrian Tol
 

Similar to Ei cakephp (20)

cake phptutorial
cake phptutorialcake phptutorial
cake phptutorial
 
Synapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephp
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App Engine
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB Foxx
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 
WebDev Crash Course
WebDev Crash CourseWebDev Crash Course
WebDev Crash Course
 
Leveraging the Chaos tool suite for module development
Leveraging the Chaos tool suite  for module developmentLeveraging the Chaos tool suite  for module development
Leveraging the Chaos tool suite for module development
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 
Modern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint OnlineModern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint Online
 
Tips for Tuning Solr Search: No Coding Required
Tips for Tuning Solr Search: No Coding RequiredTips for Tuning Solr Search: No Coding Required
Tips for Tuning Solr Search: No Coding Required
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
12 Introduction to Rails
12 Introduction to Rails12 Introduction to Rails
12 Introduction to Rails
 
URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5
 
SolrCloud on Hadoop
SolrCloud on HadoopSolrCloud on Hadoop
SolrCloud on Hadoop
 
A Beginner's Guide to Ember
A Beginner's Guide to EmberA Beginner's Guide to Ember
A Beginner's Guide to Ember
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
Lecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptxLecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptx
 
Django Overview
Django OverviewDjango Overview
Django Overview
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Ei cakephp

  • 1. CAKEPHP CakePHP is a free, open-source, rapid application development(RAD) 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.
  • 2. RAD • RAD model is Rapid Application Development model. It is a type of incremental model. In RAD model the components or functions are developed in parallel as if they were mini projects.
  • 3. Advantages of the RAD model: • Reduced development time. • Increases reusability of components • Quick initial reviews occur • Give support customer feedback • Integration from very beginning solves a lot of integration issues. • RAD should be used when there is a need to create a system that can be modularized in 2-3 months of time. • It should be used if there’s high availability of designers for modeling and the budget is high enough to afford their cost along with the cost of automated code generating tools.
  • 4. • list of features you will enjoy when using CakePHP: • Active, friendly community • Flexible licensing • Compatible with versions 4 and 5 of PHP • Integrated CRUD for database interaction • Application scaffolding • Code generation • MVC architecture • Request dispatcher with clean, custom URLs and routes • Built-in validation
  • 5. Installation Download CakePHP package from http://cakephp.org/ and extract that package and locate it your xampp htdocs. Run server (eg. Localhost/cakephp/)
  • 6. Basics of CakePhp •Folder Structure • –App • •Config: all configuration files • •Models : application’s models, data sources and behaviors • •Controllers : application’s controllers and components • •Views : presentational files • •Vendors : 3rdparty classes or libraries • •Webroot: acts as document root for the application • •Locale : stores string files for internationalization • •Tmp: stores temporary data • •Plugins: pluginpackages • –Cake • –Vendors
  • 7. Steps • •Creating the database • •Creating a model • •Creating a controller • •Creating the views
  • 8. Creating the database • •Create a new table (name should be according to the naming conventions) • •Enter the data. • •(Using phpmyadmin)
  • 9. Creating a model • •Separates the domain logic from presentation isolating the application logic. • •Extends AppModel(extends Model) • •Contains data validation rules, association information and methods specific to the table it uses. • •For complete reference http://api.cakephp.org • •Cakephpdynamically creates a model object • class Book extends AppModel{ • var$name = ‘Book'; • } • •We do can add some behaviors to each model.
  • 10. Creating a controller • •Manages the logic for a part of our application • •Can access the model object by $this->Book • class BooksControllerextends AppController{ • var$name = 'Books'; • function index() { • $this->set('books', $this->Book->find('all')); • } • } • •$this->loadModel(‘Article'); loads a different model • •Components (packages of logic that are shared between controllers)
  • 11. Creating the views • •Layouts (placed in /app/views/layouts) • •Elements (reusable parts) • •Helpers • (var$helpers = array('Form', 'Html', 'Javascript', 'Time');)
  • 12. Sample model • <?php • class Book extends AppModel • { • var$name = 'Book'; • var$validate = array( • 'title' => array( • 'rule' => 'notEmpty' • ), • 'author' => array( • 'rule' => 'notEmpty' • ) • ); • } • ?>
  • 13. Sample Controller • <?php • class BooksControllerextends AppController{ • var$name = 'Books'; • var$helpers = array('Html','Ajax','Javascript'); • function index() • { • $this->set('books', $this->Book->find('all')); • } • function view($id = null) { • $this->Book->id = $id; • $this->set('book', $this->Book->read()); • print_r($this->viewVars); • } • }
  • 14. Sample view • <h1>Books</h1> • <table> • <tr> • <th>Id</th> • <th>Title</th> • <th>Author</th> • </tr> • <?phpforeach($books as $book: ?> • <tr> • <td><?phpecho $book*‘Book'+*'id'+; ?></td> • <td> • <?phpecho $html->link($book*‘Book+*'title'+, • array('controller' => ‘books’, 'action' => 'view', $book*‘Book+*'id'+)); ?> • </td> • <td><?phpecho $book*‘Book+*‘author'+; ?></td> • </tr> • <?phpendforeach; ?> • </table>
  • 15.
  • 16. • The webserver rewrite rules direct the request to webroot/index.php. • Your application’s autoloader and bootstrap files are executed. • Any dispatch filters that are configured can handle the request, and optionally generate a response. • The dispatcher selects the appropriate controller & action based on routing rules. • The controller’s action is called and the controller interacts with the required Models and Components. • The controller delegates response creation to the View to generate the output resulting from the model data. • The view uses Helpers and Cells to generate the response body and headers. • The response is sent back to the client.