Category Archives: AJAX

Making AJAX Content Loading Prettier

In today’s article on Webistrate I explore Transitioning AJAX Content into view with $.animate() using some basic jQuery.  Please note, it doesn’t look overly pretty because I’m not a designer, but the functionality is there and it can be prettied with relative ease.

Share

Improving the speed of AJAX request and response times

Today a new article was released on Webistrate that discusses how to use jQuery Templates to speed up your websites AJAX queries by return back JSON data and then doing the visual enhancements on the client-side with the use of a predefined jQuery template.

Share

AJAX Star Rating Plugin For CakePHP

First off, I didn’t write this plugin, I was browsing CakePHP’s plugin bakery and it came from there:
http://bakery.cakephp.org/articles/schneimi/2010/08/19/ajax-star-rating-plugin-1

This is an excellent plugin and very easy-to-use.  The above article is extremely detailed and provides excellent step-by-step instructions to set it up and get it running.

In reviewing the comments, like any self-made plugins there were a few issues encountered and ironed out along the way, so if you run into any issues be sure to search the comments.
Enjoy this excellent Star Rating Plugin for your next or current CakePHP site!

Share

CakePHP 2-0 Ajax Pagination WITHOUT The Pages

As I promised in this article, 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.

One of our challenges is to not load too much or too little content.  For more details on this, please review the theory article.  Let’s begin. Read more »

Share

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.

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.  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. Read more »

Share

Maintaining the back button with AJAX

Last week 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!  I’ve put together a quick example of how to do this. Read more »

Share

AJAX, can there be too much?

Like any problem, there is no one right solution.  There are always many different solutions that work for different reasons.  Some solutions require the best solution; some solutions require the more optimized solution; other solutions just need to “get done”.

As a developer, I like AJAX.  It’s easy to develop and it makes for a really good user flow.  No more loading new pages to add comments or view the description of a product.  It can all be done with a smooth interface and less waiting.

But, can you have too much AJAX?

Read more »

Share

Creating your first iGoogle Gadget

Recently at work, we’ve started diving into Google Gadgets.  They are quite fun and really extremely easy to build.  In this article, I’m going to get you started creating your very own Google Gadget.

Sit back and reserve a few minutes of your time and you will be well on your way in no time! Read more »

Share

Drag and drop category management with CakePHP

Today’s article is going to walk you through creating a slick drag and drop with AJAX category management system.

CakePHP offers a really nice built-in tree management.  In fact, at a bare minimum you simply need to create a table with 2 extra columns, tell your model to act like a “tree” and rather than doing a find(‘all’) you do a generatetreelist() or a find(‘threaded’) and CakePHP takes care of the rest.

After doing a quick test, I was quite impressed with what CakePHP did for me, but I was not satisified.  I wanted to create a really slick category management system that I can re-use and show off.  Well, in this tutorial I go about 90% of the way.  The only thing I didn’t have time to finish was, rather than redrawing my tree through AJAX, use DHTML and dynamically update my tree after dragging and dropping.  Don’t worry, I plan to finish this with a part two soon. Read more »

Share

How to add comments with AJAX in CakePHP

In today’s article we are going to create a very basic blog that allows people to create a post and posts comments on that post via AJAX.  We are going to keep it extremely basic and just focus on that actual AJAX functionality.

Ready? Let’s begin.  We are going to start by creating two database tables: posts and posts_comments.  Below is a sample create statement for the posts table: Read more »

Share

Buy one of my books