SlideShare a Scribd company logo
1 of 4
Five simple tools to increase the optimization level of cakePHP websites
Summary:
The article identifies five useful techniques to optimize cakePHP website for the perfect return
on investments. The flexible license, MVC structure as well as caching and active community
has made this free, open source framework popular among students as well as developers. The
five techniques also show the compatibility of various features of cakePHP framework with the
techniques and discuss the benefits of them.
CakePHP framework provides a robust but independent organizational structure without the
APACHE configuration. The framework can work from any website directory. The web template
system shows a default web form with customization feature. The open source framework has
the independent modular approach and benefits from the popular MVC structure. The client-
server architecture is perfectly blended in the MVC approach where the model is for application
data representation, the view is for rendering the application data and controller module is for
serving and handling the client request. The three modules of the MVC model receive some help
from the components, helpers, behaviors and application extensions to speed up the routing or
the loading of the cakePHP websites. They are the extensions of the controller, view, models,
and applications respectively. A usual cakePHP request consists of request from client through
dispatcher and routes to the controller where the controller connects the model for the database
use and additional ‘behaviors’. The controller again receives ‘components’ and connect the view
via ‘helpers’. The view sends the response to the client back. The core or the built-in components
of the cakePHP consist of access control list for easy access to user interface and database,
cookies for session component as well as wrapper for the native PHP cookies, Authentication for
the default user authentication process like ‘object call back’, email, session, request handling
etc. The core or built in utility library includes reflector, string, XML, cache etc.
1. Upgrading:
The developer community has a tendency to identify the cakePHP framework as a slow
framework. However with some simple modifications, it can be one of the fastest and rapid used
frameworks in near future. Upgrading the versions of cakePHP framework can solve the slow
loading problem by nearly 70%. The average page load time of versions 1.2, 1.3 and 2.0 are
.112s, .082s, .081s respectively. Therefore upgrading the version from the previous version can
be useful in the case.
2. Debug mode:
For deploying the cakePHP application the status of the debug mode is important. The
deployment should be done after checking the visibility of the core components of cakePHP
framework. Data validation, as well as sanitization like proper use of $validator or input filtering,
is useful in this case. The deployment method should make only the ‘webroot’ directory publicly
visible. These points are crucial as improper deployment can decrease the page load time
significantly. The default debugs status is 2 and that means the setup of the core.php file is
distributed in may be environment, stages, and production. To optimize the cakePHP page the
debug mode needs to turn off or set the value as 0. Setting debug mode as 0 can help as
following:
 Stop displaying the error and notifications
 Views only show generic error messages
 Exception stacks are disabled
 Caching start for useful objects
Therefore ‘debug mode=0’ focuses only the proper elements neglecting various additional
features and plug-ins.
3. Caching query:
This is one of the important optimization techniques. Usually, the database queries are all
handled by the database servers. However, when the database server is caching the queries the
cakePHP framework still needs to be active for parsing and building the arrays of data. This
procedure only increases the workload and makes the framework and server busy for a long time.
The responding becomes time-consuming in this case. However, if the cakePHP framework
caches the queries then the consumption of time can be decreased. The points need to consider
are:
 Appmodel.php should be the root of app folder
 The default find() must be overridden
 Cacheconfig may be set with a different value of timeout period
4. Recursive Find ():
Recursive property fetches data from the different layers of the cakePHP framework using the
Find () or Read (). The status of find () calling returns different types of data. According to the
cakePHP cookbook the status values are following:
 Status= -1 returns group data without joins
 Status= 0 returns group data with domain
 Status= 1 returns domains and corresponding users
 Status= 2 returns group, domain, user and related articles
The default value is set to 0 for the cakePHP framework. Therefore, the framework has a
tendency to join relative models and increase the load on the server. The status value needs to be
-1 to receive the exact data user wants.
5. Memory based caching:
The cakePHP framework stores its session in a disk or more specifically in a temporary folder.
For accessing the session every time the framework have to open the session file for decoding.
The storing option in the disk file is costly. To remove this problem the cakePHP framework
provides option of memory based caching. To create a session related disk I/O there are two
ways. A physical memory location or RAM can be configured on server so that the session.
Save_path value updates it on the new location. Another way is to use some software like
MEMCACHE or REDIS to provide virtual memory space for the objects. This kind of open
source platforms can be installed in another system and serve as memory once the session path is
updated.
Conclusion:
The article defines the cakePHP framework and identifies five simple tips to optimize the
cakePHP websites to the highest level. The tips are easy to understand and usable for both
students and the developers. The simple modifications include upgrading, change in debugging
and caching, removing recursive find statements etc.
About Ncode Technologies:
‘Ncode technologies’ is one of the emerging web design and development company with 1000 of
projects’ experience. The first rate reputation of the company comes from the combination of
strict professional service, effective communication and use of web 2.0 strategies. According to
Russian federation, the company is best' iPhone app development' company with an innovative
strategy for three consecutive terms.

More Related Content

What's hot

Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Oracle Developers
 
Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.John Martin
 
Jsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webappsJsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webappsOPENLANE
 
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A StudyVijay Prasad Gupta
 
How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in muleRamakrishna kapa
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routerssathyaraj Anand
 
JDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to you
JDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to youJDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to you
JDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to youAlex Theedom
 
Laravel & Composer presentation - extended
Laravel & Composer presentation - extendedLaravel & Composer presentation - extended
Laravel & Composer presentation - extendedCvetomir Denchev
 
ITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul ServicesITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul ServicesOrtus Solutions, Corp
 
Java EE 8: What Servlet 4.0 and HTTP2 mean to you
Java EE 8: What Servlet 4.0 and HTTP2 mean to youJava EE 8: What Servlet 4.0 and HTTP2 mean to you
Java EE 8: What Servlet 4.0 and HTTP2 mean to youAlex Theedom
 
Esc 209 paper_doin
Esc 209 paper_doinEsc 209 paper_doin
Esc 209 paper_doinJonny Doin
 

What's hot (17)

How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data
 
Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.
 
Jsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webappsJsp and servlet_netbeans-webapps
Jsp and servlet_netbeans-webapps
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
 
How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in mule
 
Apache error
Apache errorApache error
Apache error
 
Web servers
Web serversWeb servers
Web servers
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 
JDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to you
JDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to youJDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to you
JDKIO: Java EE 8 what Servlet 4 and HTTP2 mean to you
 
Mla Databases
Mla DatabasesMla Databases
Mla Databases
 
Laravel & Composer presentation - extended
Laravel & Composer presentation - extendedLaravel & Composer presentation - extended
Laravel & Composer presentation - extended
 
ITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul ServicesITB2016 - Building ColdFusion RESTFul Services
ITB2016 - Building ColdFusion RESTFul Services
 
Java EE 8: What Servlet 4.0 and HTTP2 mean to you
Java EE 8: What Servlet 4.0 and HTTP2 mean to youJava EE 8: What Servlet 4.0 and HTTP2 mean to you
Java EE 8: What Servlet 4.0 and HTTP2 mean to you
 
Esc 209 paper_doin
Esc 209 paper_doinEsc 209 paper_doin
Esc 209 paper_doin
 

Similar to sample1

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
 
5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibm5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibmbalajipala
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHPEdureka!
 
2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida realPHP Conference Argentina
 
WEB MODULE 5.pdf
WEB MODULE 5.pdfWEB MODULE 5.pdf
WEB MODULE 5.pdfDeepika A B
 
Building Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPBuilding Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPEdureka!
 
Html5 cache mechanism & local storage
Html5 cache mechanism & local storageHtml5 cache mechanism & local storage
Html5 cache mechanism & local storageSendhil Kumar Kannan
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET Journal
 

Similar to sample1 (20)

Cakephp manual-11
Cakephp manual-11Cakephp manual-11
Cakephp manual-11
 
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 ...
 
cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)
 
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
 
Manual 5
Manual 5Manual 5
Manual 5
 
Cakephp
CakephpCakephp
Cakephp
 
Cakephp
CakephpCakephp
Cakephp
 
Cakephp
CakephpCakephp
Cakephp
 
5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibm5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibm
 
Rapid Development With CakePHP
Rapid Development With CakePHPRapid Development With CakePHP
Rapid Development With CakePHP
 
2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real
 
CakePHP Development
CakePHP DevelopmentCakePHP Development
CakePHP Development
 
WEB MODULE 5.pdf
WEB MODULE 5.pdfWEB MODULE 5.pdf
WEB MODULE 5.pdf
 
Building Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHPBuilding Restful Web App Rapidly in CakePHP
Building Restful Web App Rapidly in CakePHP
 
WEB Mod5@AzDOCUMENTS.in.pdf
WEB Mod5@AzDOCUMENTS.in.pdfWEB Mod5@AzDOCUMENTS.in.pdf
WEB Mod5@AzDOCUMENTS.in.pdf
 
PPT - A slice of cake php
PPT - A slice of cake phpPPT - A slice of cake php
PPT - A slice of cake php
 
Php Framework
Php FrameworkPhp Framework
Php Framework
 
Php framework
Php frameworkPhp framework
Php framework
 
Html5 cache mechanism & local storage
Html5 cache mechanism & local storageHtml5 cache mechanism & local storage
Html5 cache mechanism & local storage
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 

sample1

  • 1. Five simple tools to increase the optimization level of cakePHP websites Summary: The article identifies five useful techniques to optimize cakePHP website for the perfect return on investments. The flexible license, MVC structure as well as caching and active community has made this free, open source framework popular among students as well as developers. The five techniques also show the compatibility of various features of cakePHP framework with the techniques and discuss the benefits of them. CakePHP framework provides a robust but independent organizational structure without the APACHE configuration. The framework can work from any website directory. The web template system shows a default web form with customization feature. The open source framework has the independent modular approach and benefits from the popular MVC structure. The client- server architecture is perfectly blended in the MVC approach where the model is for application data representation, the view is for rendering the application data and controller module is for serving and handling the client request. The three modules of the MVC model receive some help from the components, helpers, behaviors and application extensions to speed up the routing or the loading of the cakePHP websites. They are the extensions of the controller, view, models, and applications respectively. A usual cakePHP request consists of request from client through dispatcher and routes to the controller where the controller connects the model for the database use and additional ‘behaviors’. The controller again receives ‘components’ and connect the view via ‘helpers’. The view sends the response to the client back. The core or the built-in components of the cakePHP consist of access control list for easy access to user interface and database, cookies for session component as well as wrapper for the native PHP cookies, Authentication for the default user authentication process like ‘object call back’, email, session, request handling etc. The core or built in utility library includes reflector, string, XML, cache etc. 1. Upgrading: The developer community has a tendency to identify the cakePHP framework as a slow framework. However with some simple modifications, it can be one of the fastest and rapid used
  • 2. frameworks in near future. Upgrading the versions of cakePHP framework can solve the slow loading problem by nearly 70%. The average page load time of versions 1.2, 1.3 and 2.0 are .112s, .082s, .081s respectively. Therefore upgrading the version from the previous version can be useful in the case. 2. Debug mode: For deploying the cakePHP application the status of the debug mode is important. The deployment should be done after checking the visibility of the core components of cakePHP framework. Data validation, as well as sanitization like proper use of $validator or input filtering, is useful in this case. The deployment method should make only the ‘webroot’ directory publicly visible. These points are crucial as improper deployment can decrease the page load time significantly. The default debugs status is 2 and that means the setup of the core.php file is distributed in may be environment, stages, and production. To optimize the cakePHP page the debug mode needs to turn off or set the value as 0. Setting debug mode as 0 can help as following:  Stop displaying the error and notifications  Views only show generic error messages  Exception stacks are disabled  Caching start for useful objects Therefore ‘debug mode=0’ focuses only the proper elements neglecting various additional features and plug-ins. 3. Caching query: This is one of the important optimization techniques. Usually, the database queries are all handled by the database servers. However, when the database server is caching the queries the cakePHP framework still needs to be active for parsing and building the arrays of data. This procedure only increases the workload and makes the framework and server busy for a long time. The responding becomes time-consuming in this case. However, if the cakePHP framework
  • 3. caches the queries then the consumption of time can be decreased. The points need to consider are:  Appmodel.php should be the root of app folder  The default find() must be overridden  Cacheconfig may be set with a different value of timeout period 4. Recursive Find (): Recursive property fetches data from the different layers of the cakePHP framework using the Find () or Read (). The status of find () calling returns different types of data. According to the cakePHP cookbook the status values are following:  Status= -1 returns group data without joins  Status= 0 returns group data with domain  Status= 1 returns domains and corresponding users  Status= 2 returns group, domain, user and related articles The default value is set to 0 for the cakePHP framework. Therefore, the framework has a tendency to join relative models and increase the load on the server. The status value needs to be -1 to receive the exact data user wants. 5. Memory based caching: The cakePHP framework stores its session in a disk or more specifically in a temporary folder. For accessing the session every time the framework have to open the session file for decoding. The storing option in the disk file is costly. To remove this problem the cakePHP framework provides option of memory based caching. To create a session related disk I/O there are two ways. A physical memory location or RAM can be configured on server so that the session. Save_path value updates it on the new location. Another way is to use some software like MEMCACHE or REDIS to provide virtual memory space for the objects. This kind of open source platforms can be installed in another system and serve as memory once the session path is updated.
  • 4. Conclusion: The article defines the cakePHP framework and identifies five simple tips to optimize the cakePHP websites to the highest level. The tips are easy to understand and usable for both students and the developers. The simple modifications include upgrading, change in debugging and caching, removing recursive find statements etc. About Ncode Technologies: ‘Ncode technologies’ is one of the emerging web design and development company with 1000 of projects’ experience. The first rate reputation of the company comes from the combination of strict professional service, effective communication and use of web 2.0 strategies. According to Russian federation, the company is best' iPhone app development' company with an innovative strategy for three consecutive terms.