Deli putem


Preface

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

patterns & practices Developer Center

On this page:
What Is This Guide About? | What Is Enterprise Library? | Who Should Read This Guide? - If You Are New to Enterprise Library, If You Are Already Experienced with Enterprise Library | How Is This Guide Structured? | Stock Trader V2 Reference Implementation | Who's Who - Ed (The Enterprise Library Expert), Sharon (The Silverlight Developer), Mark (The IT Pro Responsible for Maintenance)

What Is This Guide About?

This guide is about the Enterprise Library 5.0 Silverlight Integration Pack. It describes how you can take advantage of the features of Enterprise Library in Microsoft® Silverlight® line-of-business (LOB) application development.

Cross cutting concerns, such as exception handling, diagnostic logging, and validation are just as important to a Silverlight application as they are to any other type of application. However, implementing these cross cutting concerns in Silverlight can be quite a different matter. This guide will explain how you can use Microsoft Enterprise Library's Silverlight Integration Pack to implement these cross cutting concerns with the same level of flexibility and configurability that you have come to know in the desktop version.

Enterprise Library 5.0 ships with a huge set of documentation, ranging from conceptual documentation and hands-on labs, to reference materials. Since many of the concepts and techniques in Enterprise Library 5.0 are also used in the Silverlight Integration Pack, those same topics will not be covered in any depth here. Rather, this guide will complement the Enterprise Library 5.0 documentation and provide you with a general understanding of the basic concepts and techniques, then focus on solving Silverlight-specific scenarios using Enterprise Library.

This guide presents a sample application called Stock Trader V2 reference implementation to illustrate the typical challenges you might encounter when building a Silverlight LOB application. In addition, comments from fictional personas, including an experienced Enterprise Library developer named Ed and an IT Professional named Mark, help you understand the rationale behind certain design decisions.

What Is Enterprise Library?

Enterprise Library is a set of reusable application blocks that help developers solve common enterprise software development challenges such as validation, logging, and exception handling. These reusable components are based on practices and techniques that have proven to be very effective in enterprise development.

The Silverlight Integration Pack is an extension that can be used in Silverlight 4.0 and has been tested against Silverlight 5.0 beta. It has been built to take full advantage of Silverlight-specific capabilities, but has been designed so that it can work seamlessly with Enterprise Library 5.0 on the server.

Who Should Read This Guide?

This guide primarily targets software developers and software architects who are building LOB applications in Silverlight. It assumes you have a basic understanding of Silverlight. In certain instances, it will also describe how you can use Enterprise Library to extend technologies such as Windows® Communication Foundation (WCF), WCF RIA Services and WCF Data Services.

If You Are New to Enterprise Library

This guide does not assume that you have experience with Enterprise Library. Each chapter will begin with a basic introduction of the most important concepts from Enterprise Library. In many places, there are links to the Enterprise Library 5.0 reference documentation on MSDN® or the Developer’s Guide, which can help you to gain a deeper understanding of the concepts and techniques discussed.

If You Are Already Experienced with Enterprise Library

Developers and architects who have used Enterprise Library in the past will find that the Enterprise Library Silverlight Integration Pack uses many of the techniques and concepts used in the desktop version.

While this guide provides an introduction to Enterprise Library, the main focus is how you can apply Enterprise Library to Silverlight applications.

How Is This Guide Structured?

You can think of the structure of this guide as a subway that has a main line and then splits into several branches. The main line contains general information that applies to all application blocks, whereas each branch discusses a particular application block dedicated to a cross-cutting concern.

While we encourage you to read this guide from beginning to end, you can also follow only the routes that are pertinent to your work. Within a particular track however, you'll get the best results if you read from beginning to end, because each topic within a track builds on the previous one.

Here is the map:

Follow link to expand image

Enterprise Library Silverlight Integration Pack explains the relationship between Enterprise Library 5.0 and the Silverlight Integration Pack. We'll also describe what is in the package, when to use it, and how to install it.

Stock Trader V2 Reference Implementation describes the sample application that ships with the Enterprise Library 5.0 Silverlight Integration Pack.

Configuring Enterprise Library discusses how you can configure the Enterprise Library 5.0 Silverlight Integration Pack. Since Silverlight doesn't support native configuration files, we describe how you can create and use XAML configuration files. Finally, this section discusses how you can share certain configuration information, such as validation rules, between client and server.

Following those sections, the guide splits into four tracks, each covering a particular application block. Each track contains a conceptual introduction, various techniques for applying the block, and a description of how that block was applied in the Stock Trader V2 reference implementation.

TheValidationtrack covers different ways of adding validation logic and business rules to your application. It also discusses several techniques for sharing validation rules between client and server. There is a topic that discusses how you can perform validation if you are using the Model View ViewModel (MVVM) pattern to build your application. This topic also discusses how you can use Enterprise Library Validation with technologies such as WCF RIA Services or WCF Data Services.

The Caching****track discusses various techniques for improving the performance of your application, such as caching data to isolated storage. It also describes how you can implement proactive caching in your application.

The Logging****track shows how you can add diagnostic logging and tracing to your application. It describes how you can correlate log messages when using asynchronous web services.

Interception is an advanced, but very powerful programming technique that allows you to add new behaviors to an object at run time in a transparent way (for example, applying validation, caching, logging, or exception handling).

Stock Trader V2 Reference Implementation

The Enterprise Library 5.0 Silverlight Integration Pack ships with Stock Trader V2, the sample application mentioned earlier. The application has been developed in Silverlight by the fictitious company, Woodgrove Bank, and will replace the aging Old Stock Trader application.

The chapter called the Stock Trader V2 explains the scenario and the overall design of the Stock Trader V2. Each chapter that discusses a particular application block also contains a section on how that application block is used by the reference implementation (RI).

Who's Who

When you ask an experienced architect or developer how to solve a particular problem, the most frequent answer you'll get is: "It depends." For each design decision, there are usually several solutions, each with its own advantages and disadvantages. Of course, this also applies to all the design decisions that have been made while developing the Stock Trader V2. While it is valuable to see how you can apply Enterprise Library in a particular situation, it is often just as valuable to know why certain approaches were taken.

In this guide, we'll use the experience of the main contributors to Stock Trader V2 to illustrate why certain solutions were used.

Here are the main contributors to the Stock Trader V2 application:

Ed (The Enterprise Library Expert)

Hh852710.1F55F9B26564C3D112E6900C24109C7D(en-us,PandP.51).png

Ed is an experienced software developer and Enterprise Library expert. As a true professional, he is well aware of the common cross cutting concerns that developers face when building LOB applications for the enterprise. In the past, he has built his own libraries to satisfy these concerns, but in the last several years he has used Enterprise Library for most of these applications.

Hh852710.note(en-us,PandP.51).gifEd Says:
Ed
                 Our applications use Enterprise Library for cross cutting concerns. This provides a level of uniformity across all our systems that make them easier to support and maintain. We have invested heavily in our desktop applications and we must be able to reuse this investment. </td>

While Ed is highly experienced in UI technologies such as Windows Forms and ASP.NET, he does not have much experience building Silverlight applications.

His main role in the development of Stock Trader V2 was to implement the AccountHolder module. This module was already present in the old Stock Trader application, so Ed has done his best to reuse as much of the original business logic as possible.

Hh852710.note(en-us,PandP.51).gifEd Says:
Ed
                Two years ago, we<strong />rewrote the Account Holder functionality for the Old Stock Trader to use Entity Framework and Enterprise Library 5.0 for validation. When we started to work on the new Stock Trader V2, it was great that we were able to reuse our business entities with our validation logic with only very minor modifications.</td>

Sharon (The Silverlight Developer)

Hh852710.C2E952D65B2AE3D16AB9F1024C151E7E(en-us,PandP.51).png

Sharon is an experienced developer of web and Silverlight applications. She's very pragmatic and will always try to choose the best solution for a given problem. When building applications, her primary concerns are to get it to work quickly and get it to work well.

Hh852710.note(en-us,PandP.51).gifSharon Says:
Sharon
                 When I build an application, I want it to work without too many bells and whistles. Software development is complex enough.</td>

For Stock Trader V2, Sharon has focused mainly on the Orders module. This module had to be rebuilt from scratch. To be as productive as possible, Sharon decided to use the latest technologies, such as WCF RIA Services.

Hh852710.note(en-us,PandP.51).gifSharon Says:
Sharon
                 Before this project, I had never used Enterprise Library. At first, I was a bit worried that using it with WCF RIA Services would cause issues. But I was very happy to learn that both technologies work very well together and really complement each other's capabilities. I also found that Enterprise Library is not the big monolith I once thought it was; you are able to work with only the pieces you need for your particular project. And since Enterprise Library is now also available as NuGet packages, installation is a breeze. </td>

Mark (The IT Pro Responsible for Maintenance)

Hh852710.A8AD967FC16EC2C7EC1041CA33C36B5F(en-us,PandP.51).png

Mark is an IT professional who is responsible for installing and maintaining software applications. When a problem occurs within a software application, he is usually the first person contacted.

His job is to ensure that Woodgrove's information systems work well and stay up and running. Some of these information systems have been developed in-house, while other systems were developed by third parties but are now being maintained in-house as well.

 

There is a big difference in quality between some of Woodgrove's internally developed applications. Some of the older applications are very difficult to maintain because they lack good diagnostic features. Fortunately, some of the more recently built applications have built-in diagnostic functionality.

Hh852710.note(en-us,PandP.51).gifMark Says:
Mark
                 I'm responsible for so many different applications. I'm often asked to change configuration settings or to install updates. And of course when something goes wrong with our applications, I have to be able to quickly analyze and solve the problems. <br />When an application uses Enterprise Library for its cross cutting concerns, I can easily make configuration changes or tweak the diagnostic settings. The configuration console gives me a simple way to examine the current application configuration and make changes without tedious XML editing.  <br />Since our organization is relying more and more on Silverlight, it's great to see Enterprise Library supporting Silverlight as well. </td>

Even though Mark is not a developer, he has been actively involved during the development of Stock Trader V2. He helped to define the stories around design for testability, diagnostic logging and tracing, exception handling, and configuration, and ensured that these were given appropriate priority during the development process.

Next Topic | Previous Topic | Home

Last built: July 8, 2011