views:

45

answers:

2

We are developing some new GUI screens to display tabular data which require sorting/filtering/paging. What are the pros/cons of using a JQuery grid approach vs the "traditional" model where these functions are done on the server and where you do a new server request for each action (ie: "next page", "sort on a column", etc)?

Some of the pros/cons we can think of for using a JQuery grid are:

Pros

  • Sorting/paging/filtering can be done entirely by Grid add-on. No need to custom build this on the server.
  • Sorting/paging/filtering functions are super fast as they run on the client
  • Built in ability to do an AJAX request to handle data updates without going back to server
  • Built in professional looking aesthetic

Cons

  • To do sorting/paging/filtering on the client using the grid you need to download the entire data set to the client
  • JQuery learning curve
  • Possible complexity handling cases such as displaying input validation errors to the client, ajax based updates. ??
A: 

I think the one important problem with Jquery grid approach is that it's more difficult to debug than server-side code.

Besides, time to develop with jQuery approach may take more time than that with the traditional one.

For the sake speed and usability, I prefer Jquery approach. But if there's a tight deadline, traditional model may be preferred. In next versions, grids can be replaced by jQuery grids.

Zafer
A: 

What is the end goal of these grids?

Do you want to be able to export to excel or another spread sheet? DO you want to be able to print/save as an image etc. Are you going to have a large amount of data coming to your page?

All these things can be done both ways. server controlled or client controlled. It just changes what information you pass to the server.

There is no clear answer to this. You can do grids entirely client side, or allow the server to do the heavy lifting.

But some general rules I try to develop by: 1) Be a fricken ninja. In and out. If you are showing 15 results per page, only get 15 results and use AJAX to load the rest when needed. 2) Keep it simple, and low maintenance. Pick one way, and make it so it's easily built on / "fixed" when needed.

If you are having issues with people not getting time to learn JQuery, make it a priority to have a 1-2 hour pizza lunch or something and do a quick explanation on JQuery, and how you intend to use it in your product. This is a way better approach than people having to learn it when they need to fix it.

Personally I would do the JQuery route. It delivers better and presents better.

Ryan Ternier
Data is mostly display only but some user updates are allowed. No saving/printing. There can be a lot of data 15K rows at maybe 50-100 bytes per row..
Marcus
The benifits of JQuery is the data you send to your server is small, compared to sending the entire form. As far as debugging, FireBug, IE WEb Developer and Chrome Developer all have JS debugging features which makes JQuery very easy to debug.
Ryan Ternier