Intersoft WebGrid Documentation
Client Binding Consideration and Best Practices
See Also Send comments on this topic.
Intersoft WebGrid > WebGrid Features Overview > Displaying Data > Client-side Binding > Client Binding Consideration and Best Practices

Glossary Item Box

This section discusses the consideration for using client binding mode in your application, along with best practices for several common scenarios.

This topic contains the following sections:

Considerations

Although client binding offers numerous benefits, it doesn't always fit to all scenarios. If your application is running locally in corporate network or on fast broadband network, and that your application doesn't require connecting to a service-based datasource, you may consider to stay with server binding mode.

Likewise, if your target users run on thin-client with slightly limited resources, or slower terminal - client binding might not be suitable as client binding performs all operations - such as populating data, formatting, sorting, filtering, grouping, paging and more - entirely in client side.

Client binding can be generally viable with paged data loading mode, which balances the workload between server and client side. The following sections describe best practices for several scenarios.

 

Best practice #1 - Using ServerDataSource with Paging enabled

If you're already using WebGrid in your application (which means they were using server binding by default), you may consider using ServerDataSource mode to reuse your existing server assets and infrastructure when migrating to client binding.

ServerDataSource is the mode that requires the most minimal changes to your code. If you don't have post-binding processing in your codes (such as codes in InitializeRow, InitializeCell etc), the migration to client binding is almost seamless without any changes required.

In the above case, you simply need to set DataSourceType of ClientBindingSettings to ServerDataSource. Run your page to ensure everything is working fine.

 

Best practice #2 - Using WebService with PagedData loading mode

If you're considering developing application that retrieves data from data service, you can consider using WebService or WcfService depending on your server infrastructure.

To anticipate the growth of the data size returned by your data service, you can prepare your data service to return paged data instead of all data. This ensures your application to extend and scale up properly in the future.

 

Best practice #3 - Using AdoDataService

If you're considering developing data service platform that is accessible over the Web from various clients such as Silverlight or Web application - you may consider building ADO.NET data service.

 

Limitations

You can't use client-side binding when your WebGrid require specific features that are not supported in this version of WebGrid. For more information on the limitations, please see unsupported features in client binding.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.