Paging and caching large record sets Support

How to optimise this process both for the person doing the viewing and for the server processing the page.

Today we look at viewing large record sets, and how to optimise this process both for the person doing the viewing and for the server processing the page. To handle the former, we'll use a technique known as paging, and for the latter, caching. This caching is not the client side browser caching we've all come to know and hate; this caching is done entirely on the server.

 

The code supplied is half the length of the Dreamweaver-generated code, and is hugely beneficial if you have a site where users look through large lists of data without amending it.

Advertisement DMXzone Paginator ASP

Add the coolest page navigation to your site and make browsing through large lists of items or tables easy and quick. Choose from 22 different styles, used by many sites such as Digg, Yahoo, Flickr and much more, to fit perfectly with your design and display the total number of items.

All paging styles are fully CSS based, so you can always fine tune the colors and borders to your site design.

 

Conclusion

Today, you learnt how to use Dreamweaver Server Behaviours to achieve recordset paging in record time. You then learnt how that speed came at a cost; processing time.

Of course, if your Dreamweaver Server Behaviour page is to be used on a site which has 50 viewers a day, this is not a problem. 5000 viewers however will start to cause the web server some strain. Just for interest's sake, the hand-coded script is 124 lines, and the Dreamweaver page is 252 lines. The hand-coded script is half as big but provides easily 4 times the benefit!

You learnt about the benefits of caching data in server memory, and invalidating this data whenever updates happen to the database. Finally, you were led by the nose through a working example of hand-coded session based caching and paging. I hope you understood everything, as the techniques described above have helped me streamline growing web applications tremendously! Again, I urge you to grab the sample files, break them, make them work again, plug your own data in, go mad. The best teacher is play!

Robert Stuttaford

Robert StuttafordI live in Cape Town, South Africa. I've been pushing 1's and 0's ever since my first computer at the age of 11. Ever since then I've always known I'll be a geek. I now work for Wireframe Studio in sunny Cape Town, and have been for the last 3 years. I'm the database / ASP / dynamic Flash guy here. I'm also one of the XHTML / CSS guys. I have alot of fun in my work because I develop solutions in a variety of ways. I always have something to do, and one project is always different to the next. I actually do have a girlfriend amongst all that!

See All Postings From Robert Stuttaford >>