Microsoft Silverlight 4 Data and Services Cookbook


Microsoft Silverlight 4 Data and Services Cookbook
eBook: $35.99
Formats: PDF, PacktLib, ePub and Mobi formats
$30.59
save 15%!
Print + free eBook + free PacktLib access to the book: $95.98    Print cover: $59.99
$59.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters

 

  • 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

Book Details

Language : English
Paperback : 476 pages [ 235mm x 191mm ]
Release Date : April 2010
ISBN : 1847199844
ISBN 13 : 9781847199843
Author(s) : Gill Cleeren, Kevin Dockx
Topics and Technologies : All Books, Microsoft Development , Web Development, Enterprise, Microsoft, Microsoft Silverlight, Web Graphics & Video


Table of Contents

Preface
Chapter 1: Learning the Nuts and Bolts of Silverlight 4
Chapter 2: An Introduction to Data Binding
Chapter 3: Advanced Data Binding
Chapter 4: The Data Grid
Chapter 5: The DataForm
Chapter 6: Talking to Services
Chapter 7: Talking to WCF and ASMX Services
Chapter 8: Talking to REST and WCF Data Services
Chapter 9: Talking to WCF RIA Services
Chapter 10: Converting Your Existing Applications to Use Silverlight
Appendix
Index
  • 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
  • Appendix
    • Creating a REST service from WCF
    • Installing a SQL Server database
    • Working with Fiddler
    • Working with the Silverlight control toolkit

Gill Cleeren

Gill Cleeren is Microsoft Regional Director (http://www.theregion.com), Silverlight MVP (former ASP.NET MVP) and Telerik MVP. He lives in Belgium where he works as .NET architect at Ordina (http://www.ordina.be/). Passionate about .NET, he’s always playing with the newest bits. In his role as Regional Director, Gill has given many sessions, webcasts and training on new as well as existing technologies, such as Silverlight, ASP.NET and WPF at conferences including TechEd Berlin 2010, TechDays Belgium – Switzerland - Sweden, DevDays NL, NDC Oslo Norway, DevReach Bulgaria, NRW Conference Germany, Spring Conference UK, Telerik Silverlight Roadshow in Sweden, Telerik RoadShow UK. He is the author of Packt’s Microsoft Silverlight 4 Data and Services Cookbook and is also the author of many articles in various developer magazines and for SilverlightShow.net and he organizes the yearly Community Day event in Belgium. He also leads Visug (http://www.visug.be), the largest .NET user group in Belgium. You can find his blog at http://www.snowball.be and on Twitter by following @gillcleeren.

Kevin Dockx

Kevin Dockx lives in Belgium and works at RealDolmen, one of Belgium's biggest ICT companies, where he is a 30-year old technical specialist/project leader on .NET web applications, mainly Silverlight, and a solution manager for Rich Applications (Silverlight, Windows Phone 7, WPF, Surface, HTML5). His main focus is on all things Silverlight, but he still keeps an eye on the new developments concerning other products from the Microsoft .NET (Web) Stack. As a Silverlight enthusiast, he's a regular speaker on various national and international events, like Microsoft DevDays in the Netherlands, Microsoft Techdays in Portugal, NDC Oslo Norway, and Community Day Belgium. He is the author of Packt’s Microsoft Silverlight 4 Data and Services Cookbook and also writes articles for various Silverlight-related sites & magazines. His blog, which contains various tidbits on Silverlight, .NET, and the occasional rambling, can be found at http://blog.kevindockx.com/, and you can find him on Twitter as well: @KevinDockx.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 1 submitted: last submission 24 Jun 2012

Errata type: Technical | Page number: 11,24 | Errata date: 06 May 10

The instructions omit to tell the user they need to add references to System.Collections.Generic and System.ServiceModel so that when the "Discover" button is clicked as documented on pages 12 and 24 a rather misleading "Unexpected error" will occur. Solution to issue on page 11: add a reference to System.Collections.Generic, and "using System.Collections.Generic" in the code; Solution to issue on page 24: add a reference to System.ServiceModel, and "using System.ServiceModel" in the code;

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Microsoft Silverlight 4 Data and Services Cookbook +    SAP HCM - A Complete Tutorial =
50% Off
the second eBook
Price for both: £31.05

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • 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.

Build smart data-driaven business applications with Silverlight

Approach

Written in a cookbook style, this book offers learning and techniques through recipes. It contains step-by-step instructions for developers who want to build rich data-driven business applications using Silverlight. The book is designed in such a way that you can refer to things chapter by chapter, or read them in no particular order.

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.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software