Category: "Ajax/JSON"

Accelerate - Focus on the end product, not the components

There is so much awesome open source code available, and some of it is very powerful. To build a powerful, cost-effective solution, the best approach is to use open source code to provide the bulk of the functionality, and then extend or integrate the remaining elements.

The complexity is in gracefully combining elements from diverse sources into a cohesive unit, and ensuring the design is manageable in the event that more than one application is used on the site.

The choice of components is extremely important. I think the only way you can really decide is to try them out.

Fast AJAX / Dual Page Population

Fast AJAX
To speed up an AJAX page load, particularly with a toolkit such as dojo, you can do the following:

  • Set the cache headers on the server for ‘far-future’ dates on toolkit files, and any other files that don’t change often. Use the directory name and a FilesMatch directive
  • Break the HTML/CSS/javascript into separate files, and set the caching properly
  • Use compression (mod_deflate). If you have a large initial page load, followed by many small AJAX requests, the compression overhead may not be worth it.
  • Use dynamic loading to defer the loading of content until it is needed where possible

Use the YSlow plugin for Mozilla Firefox to check for other performance improvements.

Dual Page Population
Often there is some server-side logic that runs the same for the initial page load and later AJAX requests. One approach is to send a flag that indicates whether it is an AJAX request, and to use json_encode followed by an exit() to return the results for AJAX, or Smarty variables to return a full HTML page.

Business Plan: Web Site

Every business plan should address the web, but not every business should have a web site.

Examples:
You have a small local service business with a well-established customer base. You are very profitable. Maybe you’re an orthodontist, and you have a steady stream of clients from the local dentists. You really stand to gain very little from a website, or even an ad in the phone book. Simply focus on the services that have made you successful.

You sell stuff. Some good stuff, some not so good stuff. Sometimes, you have good months and you make alot of money, other times, you don’t. The web probably won’t help you stabilize the sales, but you may want to consider eBay or Amazon as a sales channel. Visit those sites and read the materials - they are excellent.

You have a strong mail order business, but your web sales are very poor. This is probably an indication that you should update the web
sales channel.

You’re passionate about something and want to share that passion with people, as well as let them participate. Create a social network - consider services like http://ning.com, or a Yahoo group, or other sites that allow you to create a community without any help.

You want to inform people about a particular topic, more as a resource than an opportunity for interaction. Try a blog - like https://www.blogger.com/ or any of the other free blogging services.

Web Development/Engineering

Great resources:

Mozilla/Firefox - plugins Firebug, CSSmate/CSSedit, YSlow
XAMPP - http://www.apachefriends.org/en/xampp.html

Frames and IFrames

Using frames and iframes to support web 3.0 pages is a great way to simplify the architecture, and avoid the complexity of AJAX. It also makes implementation of a CDN easier.

There are many ways to provide graceful search engine indexing of the pages - using Google’s site maps, Apache rewrite rules, and other creative approaches. Imagine the rich pages you could build, easily. Augment it with sophisticated browser caching and you can greatly speed the pages and reduce bandwidth requirements.

This also supports the idea of micro pages mentioned earlier.

:D