New Visualizations at Work
Is it time to move from classic Web apps to Silverlight clients?
Microsoft's tools for building rich Internet applications (RIAs)-ASP.NET AJAX and Silverlight 2-promise to help take the "developer ugly" out of line-of-business software.
The catch? Training your developers to know when and how to use this mix of tooling to render high-performance business apps that advance the user experience.
Several sessions at last month's technology conference VSLive! New York addressed how to take advantage of AJAX and Silverlight in the same app. In his "LOB 2.0 with Silverlight and AJAX" presentation, Infragistics Inc.'s Technical Evangelist Tony Lombardo acknowledged that line-of-business (LOB) apps traditionally have stressed function over form. Microsoft's advances in its Web technologies are enabling developers to move from HTML and ASP.NET's linked Web pages with Postbacks to HTML and ASP.NET AJAX-enabled "applications," and now AJAX and Silverlight animations that increase usability and appeal, he said.
Which dev tooling should your developers use to build effective Web applications? The traditional requirements for LOB apps haven't changed. In his presentation, Lombardo highlighted standard business concerns such as the application architecture, authentication, roles and profiles, support for user-defined options and data access.
He pointed out that while ASP.NET AJAX is a server-side and a client-side technology, Silverlight is a client-side technology that uses AJAX as the glue to the server. Silverlight doesn't offer a built-in authentication model. As an easy fix, developers can use the browser or the encapsulating ASP.NET page to provide authentication. Another option is to build a Web service to take advantage of the authentication services in ASP.NET 3.5, avoiding the look of the "old Web" ASP.NET log-ins in a Web 2.0-style application.
Microsoft Regional Director Vishwas Lele offered up his own experiences in his VSLive! session, "ASP.NET/ AJAX/ Silverlight: Which One to Use, and When?" Lele, the chief technology officer at Applied Information Sciences Inc., showed how developers could implement the same behaviors in an LOB Web client using ASP.NET AJAX, and then by dropping a Silverlight object control into the existing ASP.NET AJAX app.
Silverlight 2 offers developers the ability to add RIA elements to the client such as video, data visualizations and text boxes. "The capability of Silverlight that excites me is you now have the ability to run a significant amount of code on the client without giving up performance," says Lele.
A common mistake that people make, according to Lele, is to start using the Silverlight control when it's not fully initialized.
Presentation and Logic
An application architecture that takes this idea a step further is the Model-View-ViewModel (MVVM) pattern, which was highlighted in Lombardo's VSLive! presentation. The ViewModel handles data surfacing and operations, essentially communicating between the data model and the view. This approach can help separate the developer's code from the designer's XAML files. It also facilitates testing, among other benefits.
Kathleen Richards is the editor of RedDevNews.com and executive editor of Visual Studio Magazine.