Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

This sample shows how to integrate a SmartClient front-end with an ASP.Net backend web application. 

SmartClient applications are single page applications most of the time. All the javascript and HTML is loaded or generated dynamically, and most of the time users don't need to leave the initially loaded page. This means the usual ASP.Net application architecture is not really usefull for developing rich applications, as most components and  helpers offered by the platform are mostly not needed or relevant.

The content discussed here will explore a way to integrate ASP.Net with SmartClient, by leveraging SmartClient javascript API's on the front-end and MVC architecture in ASP.Net MVC web application on the back-end to generate the result sets. In this sample, a DataSource wil be created which inherits RestDataSource, which will then be connected to an ASP.net MVC controller on the backend. This will get the data from the database using NHibernate and will serialize it back to te DataSource using JSON.Net. The results will be displayed in a ListGrid.

JSON.Net is being used as it is faster and offers more flexibility than the default service provided in ASP.net.Below are couple of pages displaying integration with PHP:

  1. Handling a fetch request from RestDataSource using ReadBean
  2. Adding simple Criteria, sort, and data paging
  3. Adding other CRUD operations
  4. Add queuing and transaction support
  5. Adding support for AdvancedCriteria
  6. Make it data-driven