Category: Development

  • Officially published my CakePHP Book

    Finally!  It has been a long time in the making, but my book is finally finished and published!  About two years ago, I began the undertaking of writing a book.  At the time it was merely a hobby while I was working on my blog.  Seeing if I could turn the success of my blog articles into a book.

    As you may recall a few months ago, I released an e-book.  This e-book was basically my original works written for CakePHP 1.2.  I saw some success with the e-book, so that made me believe that I should seek publishing on my book.  Unfortunately, there isn’t much hope for mainstream success with a big publisher like O’Reilly because CakePHP is too small of a niche for them to focus on.

    During this time, I focused on upgrading the book to be relevant to CakePHP 1.3.  I even added a special bonus chapter about upgrading from CakePHP 1.2 to 1.3, which I must say was extremely painless; especially if you stick with the standards.

    Anyways, I hope you take the opportunity to view my CakePHP book.

    Enjoy!

  • CakePHP 1.2 VS 1.3 VS 2.0 Page Request Times

    When I first started using CakePHP a few years ago, we had a lot of complaints about speed.  If you do some Google searches comparing CakePHP to other frameworks, it seems to be near the bottom of the pack.  I previously wrote a few articles on optimizing CakePHP here:

    Implementing the following tips certainly helped; however, if there are issues with the core framework response time, no amount of optimization will truley help.  So after reading up on CakePHP 2.0 and it’s recent speed improvements, I wanted to do some straight CakePHP comparisons.  Below are 10 load times for CakePHP 1.2, 1.3, and the new 2.0.  These load times are of a brand new install simply loading the default home view, no database connection or any model loading. (more…)

  • CakePHP 2-0 Ajax Pagination WITHOUT The Pages

    As I promised in Creating AJAX Pagination WITHOUT The Pages, I have created a full CakePHP example of performing AJAX pagination without the pages.  The goal of this article is to display news articles to a user.  As the user scrolls down, we will dynamically load in additional content so they can continue to scroll and read. This example focuses on PHP but if you’re looking for Node.js tutorial I’ve also implemented this exact feature with Node.js as the server-side code.

    One of our challenges is to not load too much or too little content.  For more details on this, please review the Creating AJAX Pagination WITHOUT The Pages.  Let’s begin. (more…)

  • CakePHP CSS Enhancements From 1.2 To 1.3

    This article does seem a bit late since CakePHP 2.0 is on it’s way.  However, I felt it prudent to point out a few things that I’m really happy to see in the new default CSS provided by CakePHP.

    On CakePHP’s website, you will find an excellent migration guide from 1.2 to 1.3 here:
    http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3

    It describes in great detail the various changes throughout the entire application and there are a lot of them.  But I think it left out some of the most important stuff, the default CSS provided for people who use the bakery to create their websites!

    One of the things that irked me in 1.2 was I had to manually update the paginator helper to display what field is currently being sorted on.  Many times I had to ensure my peers were also doing the same thing and a lot of time was wasted checking this and ensuring it was done correctly. (more…)

  • Creating AJAX Pagination WITHOUT The Pages

    You may have noticed some changes in the way a few websites work.  For example, if you go to Google Images and do a search, there is no pagination (1, 2, 3, Next, Previous) anymore.  Instead Google loads the images as you need them, e.g. when you scroll down. If you’re looking for more Node.js tutorial I’ve compiled an incredible list that will take you from a Node.js beginner to expert.

    Another example is Facebook’s newsfeed.  I read an excellent article a few months back on their developer blog about this design decision.  By default, Facebook will only load a “full screen” of information with minimal scrolling which triggers a Javascript event.  However, as soon as you start scrolling they begin to fetch and display more content.  In the article, Facebook described this decision as a bandwidth saver.  They found that a lot of people would navigate away from the newsfeed before ever scrolling down or only looking at the top content.  By only showing 10-15 posts, they can keep the size of their newsfeed down oppose to loading 30+ posts that are never going to be read!  File size can easily go down 100s of KBs per page view and when you’re talking about millions of page views per second, that’s a significant number. (more…)