Thursday, 22 August 2013

AJAX Update Panels Added to Data Tables

Snippet of Tiger Woods' recent season results ahead of the 2013 The Barclays showing new update message when sorting on a column (Position in this case)

Further to this old post from 2009, I have finally gotten around to reintroducing AJAX update panels to Golf Predictor. As noted previously, this will make the site more responsive for all users. AJAX allows the partial updating of a web page and you can continue to interact with the page while the data is loaded in the background. The implementation this time is restricted to the data tables on each page. This means that now when you sort a data table (or go to a different page of a large one), instead of the full web page being reloaded and you being brought back to the top of the page, only the data table itself is updated and you stay where you were on the page. This is a much better experience, especially on larger pages such as the Prediction Data page.

Unlike last time, when you select a new season, tour or tournament from a drop down box, there will still be a full page refresh. This mitigates the problem with the browser back button which resulted in the removal of the panels before. In addition, the gains in performance by placing these data tables in update panels outweighs any unexpected back button behaviour. Just to be aware, clicking on a data table column header or data table page number now doesn't affect the browser history. Therefore, pressing the back button will not return to the previous sort/page like it did before this update. You can now either reload the page to reset the table back to its original state or simply sort on another column.

This reinstatement of AJAX update panels should make Golf Predictor even better to use. If  a partial update isn't instantaneous, an updating message and graphic will appear just above the data table during the partial update to inform you that your request is being carried out. This is shown in the screenshot above, which shows a portion of the GP Season Results data table on the Prediction Data page for Tiger Woods ahead of The Barclays this week.

As part of this update I have added sorting to most of the columns on the data tables on the Season Statistics page for each golfer and the information page for each golf course. The number of rows on each page of some data tables have also been reduced for legibility reasons, e.g. the Tournament Winners table on the Tournament page. Finally, the calendar view of tournaments has also been updated with an AJAX panel to improve performance.

I hope this major enhancement will add to your Golf Predictor experience. Please contact me immediately if you experience any problems on the site. Note that you may have to reload a page for these changes to take effect.

No comments: