Recently received a review copy of Packt Publishing’s Instant jQuery 2.0 Table Manipulation How-to book. Its stated purpose is to help coders with the following tasks:
- Mark up your code to use jQuery selectors effectively
- Learn jQuery to drastically simplify tasks that would be much more difficult in plain old JavaScript
- Build interactivity into your pages without reloading the page or calling back to the server
- Take advantage of powerful AJAX techniques that allow you to communicate with the server without refreshing the page
- Use simple jQuery functions to enhance your HTML tables
Since this was a book I could see myself writing (I have an entry for this blog currently in draft mode entitled “Dynamic Table Rows” which will show how I used jQuery to solve a table row issue on a big project I was working on) I was ready to pounce on any little error I might find; but its author, Charlie Griefer, is a coder after my own heart. I could tell this immediately when the book started off talking about how even though HTML tables should not be used for laying out a web page they are still to be used when tabular data is being presented, a point I have made before in this development blog.
Instant jQuery 2.0 Table Manipulation How-to then takes the reader through several quick to fairly quick tasks starting with row striping, which can now be accomplished with CSS but it’s still good to have the brief line of jQuery in place that will provide a fallback for older browsers. From there the reader is shown how to sum up column values, show and hide rows, highlight particular cells, paginate (on either the client or server side), sort columns (again, on either the client or server side), and how to filter a table based on user input. To anyone with a decent understanding of HTML and jQuery each example is easy to follow and understand.
The book then ends by pointing out two popular and useful jQuery table plugins, each of which I have used before. Now, why would he mention plugins if they will automatically do some of the things he just showed you how to do? The answer is that sometimes a plugin is too much and you only need to do one or two table manipulations in your project. Nowadays, every bit you can save in file size helps your project. Even then, when you do use a plugin any extra understanding you have of how it works is, in my opinion, advantageous.
Griefer’s style seems to be all about keeping code pure and simple and then leveraging the power and clarity that comes from that… and I like that. And Packt’s goal seems to be to help the development world discover the rarely explored niche areas of knowledge, those insights that give your projects that professional edge… and that too is admirable.