Free Sample
+ Collection

Microsoft Silverlight 4 Data and Services Cookbook

Cookbook
Gill Cleeren, Kevin Dockx

Over 80 practical recipes for creating rich, data-driven business applications in Silverlight with this Microsoft book and eBook
$35.99
$59.99
RRP $35.99
RRP $59.99
eBook
Print + eBook

Want this title & more?

$21.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847199843
Paperback476 pages

About This Book

 

  • Design and develop rich data-driven business applications in Silverlight
  • Rapidly interact with and handle multiple sources of data and services within Silverlight business applications
  • Understand sophisticated data access techniques in your Silverlight business applications by binding data to Silverlight controls, validating data in Silverlight, getting data from services into Silverlight applications and much more!
  • Packed with practical, hands-on cookbook recipes, illustrating the techniques to solve particular data problems effectively within your Silverlight business applications

Who This Book Is For

If you are a .NET developer who wants to build professional data-driven applications with Sliverlight, then this book is for you. Basic experience of programming Silverlight and familiarity with accessing data using ADO.NET in normal .NET applications is required.

Table of Contents

Chapter 1: Learning the Nuts and Bolts of Silverlight 4
Introduction
Getting our environment ready to start developing Silverlight applications
Creating our first service-enabled and data-driven Silverlight 4 application using Visual Studio 2010
Using the workflow between Visual Studio 2010 and Blend 4
Using source control in Visual Studio 2010 and Blend 4
Deploying a Silverlight application on the server
Chapter 2: An Introduction to Data Binding
Introduction
Displaying data in Silverlight applications
Creating dynamic bindings
Binding data to another UI element
Binding collections to UI elements
Enabling a Silverlight application to automatically update its UI
Obtaining data from any UI element it is bound to
Using the different modes of data binding to allow persisting data
Data binding from Expression Blend 4
Using Expression Blend 4 for sample data generation
Chapter 3: Advanced Data Binding
Introduction
Hooking into the data binding process
Replacing converters with Silverlight 4 BindingBase properties
Validating databound input
Validating data input using attributes
Validating using IDataErrorInfo and INotifyDataErrorInfo
Using templates to customize the way data is shown by controls
Building a change-aware collection type
Combining converters, data binding, and DataContext into a custom DataTemplate
Chapter 4: The Data Grid
Introduction
Displaying data in a customized DataGrid
Inserting, updating, and deleting data in a DataGrid
Sorting and grouping data in a DataGrid
Filtering and paging data in a DataGrid
Using custom columns in the DataGrid
Implementing master-detail in the DataGrid
Validating the DataGrid
Chapter 5: The DataForm
Introduction
Displaying and editing an object using the DataForm
Displaying and editing a collection using the DataForm
Customizing the DataForm using Data Annotations
Customizing the DataForm using a custom DataTemplate
Customizing the DataForm template
Validating the DataForm
Chapter 6: Talking to Services
Introduction
Connecting and reading from a standardized service
Persisting data using a standardized service
Configuring cross-domain calls
Working cross-domain from a trusted Silverlight application
Reading XML using HttpWebRequest
Reading out an RSS feed
Aggregating RSS feeds
Talking with services in the Windows Azure cloud
Persisting data to and reading data from the Windows Azure cloud
Using socket communication in Silverlight
Chapter 7: Talking to WCF and ASMX Services
Introduction
Invoking a service that exposes data
Invoking a service such as Bing.com
Handling faults when calling a service
Optimizing performance using binary XML
Using duplex communication
Using duplex communication with the WCF net.tcp binding
Debugging a service in Silverlight
Ensuring data is encrypted
Securing service communication using message-based security
Uploading files to a WCF service
Displaying images as a stream from a WCF service
Hooking into proxy creation using slsvcutil.exe
Calling a WCF service from Silverlight using ChannelFactory
Chapter 8: Talking to REST and WCF Data Services
Introduction
Reading data from a REST service
Parsing REST results with LINQ-To-XML
Persisting data using a REST service
Working with the ClientHttpStack
Communicating with a REST service using JSON
Using WCF Data Services with Silverlight
Reading data using WCF Data Services
Persisting data using WCF Data Services
Talking to Flickr
Talking to Twitter over REST
Passing credentials and cross-domain access to Twitter from a trusted Silverlight application
Chapter 9: Talking to WCF RIA Services
Introduction
Setting up a data solution to work with RIA Services
Getting data on the client
Sorting and filtering data
Persisting data to the server
Persisting a Unit of Work/changeset
Working with concurrency and transactions
Tracking a user's identity
Controlling a user's access to a service and service methods
Validating data using data annotations
Validating data using shared code
Using the DomainDataSource
Using the DomainDataSource to page through data
Sorting, filtering, and grouping data using the DomainDataSource
Chapter 10: Converting Your Existing Applications to Use Silverlight
Introduction
Calling a stored procedure from Silverlight
Working with LINQ to SQL from Silverlight
Working with the Entity Framework from Silverlight
Converting a Silverlight application to use WCF RIA Services
Using ASP.NET Authentication in Silverlight
Using ASP.NET Roles in Silverlight
Using ASP.NET Profiles in Silverlight

What You Will Learn

  • Display and validate data efficiently in Silverlight business applications
  • Build data-driven business applications in Silverlight much more easily and much faster using Data binding
  • Know when and how to customize your data using important data controls within Silverlight
  • Discover how your Silverlight business applications can quickly access data residing in a database by calling web services such as RSS, JSON, Windows Azure, and more
  • Exchange information between Silverlight clients and WCF or ASMX services in your Silverlight business applications
  • Add functionality to your Silverlight business applications by harnessing REST and WCF Data Services as an underlying platform for communication via Flickr and Twitter
  • Simplify your data-driven business application development with WCF RIA Services
  • Leverage your existing knowledge, applications, and business requirements of Silverlight by Integrating Silverlight into existing business applications

In Detail

Microsoft Silverlight is a programmable web browser plugin that enables features including animation, vector graphics, and audio-video playback – features that characterize Rich Internet Applications. However, Silverlight is a great (and growing) Line-Of-Business platform and is increasingly being used to build data-driven business applications. Silverlight Data Services enable efficient access to your data, allowing you to draw on multiple sources of data and solve particular data problems. There is very little existing material that demonstrates how to build data-driven solutions with the platform. Silverlight 3 made a big step into Line-Of-Business data services and Silverlight 4 builds further upon this. This book will enable .NET developers to get their finger on the pulse of data-driven business applications in Silverlight.

This book is not a general Silverlight 3/4 overview book; it is uniquely aimed at developers who want to build data-driven applications. It focuses on showing .NET developers how to interact with, and handle multiple sources of data in Silverlight business applications, and how to solve particular data problems following a practical hands-on approach, using real-world recipes. It is a practical cookbook that teaches you how to build data-rich business applications with Silverlight that draw on multiple sources of data. Most of the covered features work both in Silverlight 3 and 4. However, we cover some that are specific for Silverlight 4, which will therefore not work with Silverlight 3. Where this is the case, it is clearly indicated.

Packed with reusable, real-world recipes, the book begins by introducing you to general principles when programming Silverlight. It then dives deep into the world of data services, covering all the options available to access data and communicate with services to get the most out of data in your Silverlight business applications, whilst at the same time providing a rich user experience. Chapters cover data binding, data controls, the concepts of talking to services, communicating with WCF, ASMX and REST services, and much more.

By following the practical recipes in this book, which are of varying difficulty levels, you will learn the concepts needed to create data-rich business applications—from the creation of a Silverlight application, to displaying data in the Silverlight application and upgrading your existing applications to use Silverlight. Each recipe covers a data services topic, going from the description of the problem, through a conceptual solution to a solution containing sample code.

Authors

Read More

Recommended for You

Microsoft Silverlight 5: Building Rich Enterprise Dashboards
$ 29.99
Silverlight 4 User Interface Cookbook
$ 29.99
Microsoft Silverlight 4 Business Application Development: Beginner’s Guide
$ 32.99