Part 3. Working with data and services

 

Most Silverlight applications, especially business-oriented ones, need to interact with data. Oftentimes, that data comes from a remote service on an internal network or the public internet.

Part 3 looks first at how to use binding, an essential XAML feature, to communicate data from your data layer or model to the UI. You’ll also explore the features and controls that build on binding, such as the DataGrid and DataForm and data annotations. Wrapping up the discussion on binding, I’ll cover input validation and show you how to extend the validation system to perform your own data validation at the UI layer in a robust and reusable way.

Binding isn’t just about business data, so I cover the binding system in depth. You’ll see how it may be used to bind various UI elements together to avoid the “glue code” you might otherwise need.

With the consumption of data covered, I then turn to how to get that information to the client. First, I’ll discuss the Silverlight networking stack in depth, paying particular attention to the asynchronous operations and how to simplify them using Reactive Extensions, tasks, and more.

Once you know the basics of networking, I’ll expand on that topic to include SOAP web services (both ASMX and WCF); REST services using the WCF Web API; and parsing XML, JSON, and RSS data.