Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Cook up Web sites fast with CakePHP, Part 4: Use CakePHP's Session and Request Handler components

Streamline PHP applications

Sean Kelly (skelly@idsociety.com), Web Application Developer, ID Society
Sean Kelly graduated with a degree in mathematics from Reed College. He is currently a Web application developer for ID Society, a full-service Internet marketing agency in New York City. He is a supporter of open source content management systems, and contributes to Joomla! and the Wikipedia project.

Summary:  CakePHP is a stable production-ready, rapid-development aid for building Web sites in PHP. This "Cook up Web sites fast with CakePHP" series shows you how to build an online product catalog using CakePHP. Part 4 focuses primarily on the Session component of CakePHP, demonstrating three ways to save session data, as well as the Request Handler component to help you manage multiple types of requests (mobile browsers and requests containing XML or HTML).

View more content in this series

Date:  08 Feb 2011 (Published 02 Jan 2007)
Level:  Intermediate PDF:  A4 and Letter (269 KB | 28 pages)Get Adobe® Reader®

Activity:  53303 views
Comments:  

Summary

Any Web application will run into the problem of storing sessions eventually. With CakePHP, you are given a great deal of flexibility on how you want to address the issue. Database sessions can easily be set up by changing a parameter and creating a table, which is a big time-saver.

You also learned about how the Request Handler is a multipurpose tool for changing the way your application is output. You saw how it can be used to handle Ajax requests and output RSS feeds. When you are playing around with CakePHP, try experimenting with other request types, such as detecting mobile devices.

5 of 8 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source
ArticleID=390856
TutorialTitle=Cook up Web sites fast with CakePHP, Part 4: Use CakePHP's Session and Request Handler components
publish-date=02082011
author1-email=skelly@idsociety.com
author1-email-cc=