Preface

Ideally, every application should have a robust user interface, be available over the Web in any browser, and be rich in functionality. Attempts at achieving that ideal, however, have been fraught with challenges. Throughout the years, developers have had to battle cross-browser issues regarding DOMs as well as HTML, JavaScript, and DHTML implementations. It has always taken longer than it should to implement a cross-browser web application. And even after all of the effort was expended, sometimes the result was a poor excuse for a user interface due to the lowest-common-denominator principle of building web applications that work in various web browsers. There always seemed to be a sacrifice to the user experience when building an application for the Web. That’s why when whispers of what we now know as Silverlight were coming out of the dark recesses of Redmond, I watched intently for its arrival.

The first version of Silverlight was certainly impressive: a plug-in to the browser that made richer UIs than were possible with standard web technologies using HTML. Like any first-generation product, aspects were missing in Silverlight 1. In version 2 of Silverlight, significant advances were made by adding the new Silverlight control library and support for .NET code in the browser. In one fell swoop, developers can leverage their .NET skills to develop Silverlight 2 applications that run in Firefox, Safari, Google Chrome, and Internet Explorer.

The creativity and passion of many developers bore new examples of graphical wonders popping up like flowers in the spring. A new era of rich interfaces with XAML and Silverlight was dawning. Amid this UI splendor is another facet of Silverlight that is just as important: the ability to link these robust Silverlight user interfaces to fully functional line-of-business solutions. Silverlight 2 enables developers to create rich cross-browser web UIs that can communicate over HTTP with REST services and with web services.

Instantly, the development playing field was altered. Silverlight 2 applications can leverage existing business object and data access layers that companies may already have in place. Developers can also take advantage of new technology frameworks such as the ADO.NET Entity Framework, LLBLGen Pro, LINQ to SQL, NHibernate, and other middle-tier frameworks to build a domain entity model, query the model with LINQ, serialize the entities, and pass them through Windows Communication Foundation (WCF) services to a Silverlight 2 application. Developers can use entities in the client application in the browser and apply them to the new Silverlight 2 controls using rich data-binding techniques. Silverlight 2 applications can easily access existing or new models through a variety of web services, including RESTful-style web services, syndicated feeds with RSS and Atom, services that return XML or JSON, and SOAP-based services.

Silverlight Backdrop

Since Microsoft announced Silverlight, there has been tremendous interest in building applications with it. Silverlight provides the means to design robust user interfaces that work in a variety of browsers and communicate with highly scalable web server applications. Historically, desktop applications have cornered the market on rich user interfaces, whereas web applications have been more limited. This was largely due to the vast resources available to desktop applications, while Internet applications have had to contend with working on many browsers and operating systems. Silverlight changes this balance and opens the doors for web applications to provide rich and interactive user experiences.

Silverlight 2 helps developers to build rich Internet applications (RIAs) that work in several browsers and operating systems. It provides an extremely rich user experience and leverages developer experience with .NET technologies. Microsoft is vested heavily in this product, which is gaining a lot of momentum. Thanks to Silverlight 2, developers can use their .NET and XAML skills to develop RIAs. Silverlight 2 introduced an extensive set of controls and has promised to increase the control suite through a Silverlight Toolkit.

Get Data-Driven Services with Silverlight 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.