Category: CakePHP

  • Maintaining the back button with AJAX

    When I blogged about whether or not you can use too much AJAX on your website.  The short answer was no; with one caveat being that you must not lose the user interaction experience.  In this scenario I’m referring to the back button.  If the user has “felt” like the content changed, they are likely to click the back button to return.  If they do this, it’s important for them to “go back” to where they “think” they were and not the last page that was loaded without AJAX and simply relying on Javascript events!  I’ve put together a quick example of how to do this. (more…)

  • Optimizing CakePHP Websites

    CakePHP offers a lot of functionality to us as developers. The ability to develop websites rapidly provides a trade-off in how quickly the website will load. As we expand our skills, we will learn the techniques that will slow down/speed up performance.

    Objectives

    • Apply techniques to speed up CakePHP’s load time
    • Optimize our queries
    • Cache query results

    (more…)

  • Adding SEO functionality

    Two of the biggest things that will improve your search engine rankings are keyword rich website titles and keyword rich links to your content. Today’s lessons will cover both of these topics.

    Objectives

    • Improve our search engine rankings
    • Set a title tag
    • Map a specific URL to a custom controller and action
    • Avoid using ids or numbers in our URL

    Before I start, I would like to make it clear that this article is and does not intend to be a be-all-to-end-all of the SEO necessities for your website. It is meant to describe some excellent techniques to quickly and easily improve upon CakePHP to make it more SEO friendly. (more…)

  • unbindModel and $this->paginate()

    Ugggh what a disaster today was!  On a client’s site, we have an older version of CakePHP, pre containable functionality.  Because of this, we have to use unbindModel and bindModel to accomplish the same functionality.

    Over the past while, it has not been such a big deal.  However, for some other unknown reason, a search feature wasn’t returning back the appropriate associative data.  This had been working for quite some time, then suddenly stopped.  As I mentioned, I’m not exactly sure when and why it stopped working, but it did. (more…)

  • Photobucket, Photos, and You

    It seems like photo sharing and social network applications are the in thing right now. Let’s take advantage of this. Today I will provide a simple class that will allow you to post photos to a user’s Photobucket account in minutes.

    Step 1: Visit http://photobucket.com/developer/register to register for an API key

    Follow the steps to create a new application on Photobucket. When you have finished, Photobucket will send you an email with your API and Secret key. Keep this email for later use.

    (more…)