Category: Development

  • Changes to Model:find(‘first’) in CakePHP 2.3

    A new stable release of CakePHP has just been released a few days ago, version 2.3.  With this many great new changes have come out of it.  You can read the full change log here:
    http://bakery.cakephp.org/articles/lorenzo/2013/01/28/cakephp_2_3_0_is_out

    One of the things that immediately caught my mind was this great big bolded sentence:

    IMPORTANT: Model::find('first') will now return an empty JavaScript array when no records are found. Make sure you update your tests!

    Immediately after reading this I thought major code changes were going to be required; however, luckily my fear was unfounded.  Let me provide an example…

    (more…)

  • Recent Guest Posts on PHPMaster.com

    I’ve had the pleasure of being a guest writer at a fantastic site called phpmaster.com.  This site is a subsidiary site to one of the most popular technology blogging sites sitepoint.com.

    The first article I wrote is an excellent extension of the various CakePHP articles I’ve written about in the past.  It discusses a variety of ways to improve the speed of CakePHP applications.  The latest article (that was just released a few days ago) discusses creating your very own OAuth server.  Since OAuth2 is still in a draft state, the article is for creating an OAuth1 server.

    In case you are not a regular of this site, here is a quick preview of the articles. (more…)

  • Node.js Versus Nginx: Bare Bones Test

    This is a quick follow up to yesterday’s post on Node.js Versus Apache2: Bare Bones Test where I performed a straight HTML test of Node.js tutorial versus Apache.  With my recent switch to Nginx, I thought it prudent to perform this exact same test swapping out Apache for Nginx.  The results are much more interesting to yesterday’s since there is no total destruction (sorry for the spoiler if you didn’t read yesterday’s article).

    (more…)

  • Node.js Versus Apache2: Bare Bones Test

    I’ve written a few recent articles on Node.js, mostly to familiarize myself with the effort involved in creating basic applications with it.  I have yet to use it in production, mostly because I’m just not sure how ready I am to use it on a large project…

    I have been quite curious with performance compared to the standard tools that I’ve used forever and ever.  In the following article, I’m going to do some basic comparisons between Node and Apache2 performance.

    (more…)

  • Node.js – Ajax Pagination without the Pages

    With my recent endeavours into Node, I thought that taking a fun article like this one – CakePHP 2-0 Ajax Pagination WITHOUT The Pages – would be a really fun experiment to see how difficult it would be to accomplish in Node.

    At the end of the day, the logic is still the exact same, retrieve the items, determine the max length, calculate the number of pages, and then perform AJAX as well scroll down to fill in more content as-needed.

    Leveraging the Express API and Jade templates, this is quite painless to implement into Node with jQuery template.

    (more…)