Batch Update in WebGrid Enterprise 7

Earlier this year, I’ve written a blog post discussing briefly on our next-generation data visualization components for Silverlight and ASP.NET platform. In this post, I’ll discuss about WebGrid 7’s major features in more details, specifically on batch update.

Over the past years, we have received tremendous requests for WebGrid to support built-in batch updating. Batch update is a data updating mechanism that processes multiple edits in a single request. Compared to the default update mode, batch update offers numerous benefits that makes it an essential feature in today’s most demanding Web 2.0 application. Some of the benefits are:

  • Richer experience. With batch update, users can perform data editing faster and more intuitive as there’s no more wait-time for each update.
  • More resources efficient. Instead of sending update to server on each changes, batch update sent all changes in a single request. That means less server overhead and less bandwith consumption.
  • Streamlined data validation and error handling. Batch update lets you perform data validation more efficiently in centralized event against multiple table changes, makes it easy to handle transaction errors.
  • Offline capability. With a proper batch update implementation, users can take their application offline, make changes locally, and synchronize the changes to server when it becomes available.

WebGrid Enterprise® 7 — which will be shipped in the upcoming WebUI Studio 2009 R1 volume release — includes comprehensive batch update features, such as discussed in the following sections. This first post on batch update will cover the feature overview, pending changes concept and built-in changes management.

Introducing SmartBatchUpdate

SmartBatchUpdate is a new feature in WebGrid Enterprise 7 which enables you to perform multiple edits across multiple tables in real-time without postback/callback. All pending changes will be submitted into server at once with a single AJAX callback, thus eliminates waiting time and improves data editing experience in overall.

The batch update feature in WebGrid 7 is specifically designed to achieve several key objectives below:

  • Robust and reliable client-side storage for storing changes.
  • Extensible architecture and API for batch update management in both client and server side.
  • Works in conjunction with in-line editing architecture to provide the richest editing experience.
  • Submit all updates in a single AJAX request via built-in WebGrid user interface, or via API.
  • Automatic changes persistence, allowing changes to be preserved as users perform navigation.
  • Support hierarchical tables by using same architecture and pattern, as well as supporting cascading inserts and deletes.
  • Intelligent support for identity management in cascading inserts (creating new rows in several tables respectively).
  • Ability to let users perform undo changes.
  • Works flawlessly with existing features, such as sorting, filtering, paging and hundreds of UI features.
  • Allow users to review all pending changes in a dialog box interface, primarily useful when used in conjunction with paging.
  • Full support for new client-side binding and data services such as Web service and WCF service.
  • Full support for ADO.NET Data Service (also known as Astoria). 

Pending Changes Concept

SmartBatchUpdate™ used state-of-the-art pending changes concept to provide solid functionality and architecture for its batch update features. With the concept, every row that has changed since its first load will result in a pending change. A record row can contain only one pending change at a time, which is one of four modes below:

  • Unmodified. When a change is undo’ed, the record will be set back to Unmodified.
  • Added. Newly added row will be marked as Added pending change.
  • Modified. Edited row will be marked as Modified pending change.
  • Deleted. Deleted row will be marked as Deleted pending change.

Each row’s pending change is stored based on its corresponding table. This means that each table contains one or more pending changes which are associated with each logical row. As a result, SmartBatchUpdate™ provides solid and consistent object models and interfaces which enable pending changes to be consumed in multiple tables (hierarchical) configuration.

The following illustration describes the pending changes concept in a hierarchical Grid.

Pending changes concept in WebGrid 7

Pending changes are stored locally on client-side and can be accessed programmatically through client-side API.

Furthermore, pending changes are automatically restored and synchronized with the current view whenever the Grid performed a FlyPostBack action – such as sorting, filtering, grouping, etc – or page full postback. This provides users with greater experience to interacting with information while maintaining current changes simultaneously.

SmartBatchUpdate™ also includes built-in pending changes management, such as ability to undo changes, accept changes, as well as review changes. The following discusses the built-in changes management in details.

Built-in Changes Management

SmartBatchUpdate™ provides a high-level built-in changes management, in addition to the solid underlying infrastructure which maintains the integrity and consistency of pending changes and batch update process.

Changes management in WebGrid Enterprise 7 includes the following features:

  • Undo Changes.

WebGrid stores all pending changes and all its associated row objects in client side. This design enables WebGrid to track the changes made on each record. Therefore, it allows users to undo a pending change completely.

Undo changes feature in WebGrid 7

You can access Undo Changes command by bringing the row’s context menu (right click on selected row). If you would like to undo all changes that you have made, you can click on Undo All Changes command in the row’s context menu. Alternatively, you can easily locate the command in the status bar.

Please note that undo changes command will revert all changes back into its original state. Thanks to the state-of-the-art pending changes architecture, the operation is done in real-time without the needs for server postback/callback.

  • Review Changes.

Designed with solid architecture, SmartBatchUpdate™ allows your end user to make dozens to hundreds of pending changes in a single session.

For instance, end user is allowed to make changes from one page, navigate to other page through paging function and make changes on the other pages, and so on. With so many changes in different views, users often have difficulty in reviewing or locating the pending changes.

To support these dynamic scenarios, users will need the ability to access all pending changes that they have made in different views. Review Changes is a powerful runtime feature that makes it easy and efficient for users to review all changes regardless of the tables and pending changes state.

Review Changes feature sports sleek dialog box interface to provide end user with a streamlined and convenient access to all pending changes within a single location. See below screenshot to get a better picture.

Review changes feature in WebGrid 7

Review Changes dialog box provides easy-access to all pending changes across tables and views – makes it easy
for users to undo several records or accept changes.

Note that the changes will be preserved even though the view has changed completely – eg, through sorting or paging.

Conclusion

By now, you should already have insights on what batch update is about, how it works, and how it could bring significant benefits to your Web application. I hope you enjoy reading this blog post and that it gives you more ideas on how you can take advantage of these features in applications.

In the next post, I’ll cover more technical aspects on the batch update feature such as how WebGrid 7 elegantly handles the batch update in various data sources – from datasource control to custom data object. I’ll also detail some interesting features such as the batch update support on hierarchical configuration, and how we handled cascading inserts automatically in hierarchical table. So stay tuned!

All the best,
Jimmy.