Microsoft Silverlight 5 Data and Services Cookbook


Microsoft Silverlight 5 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
Support
Sample Chapters
  • Design and develop rich data-driven business applications in Silverlight and Windows Phone 7 following best practices using this book and eBook
  • Rapidly interact with services and handle multiple sources of data within Silverlight and Windows Phone 7 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, using data and services using MVVM techniques and much more!
  • Packed with practical, hands-on cookbook recipes, illustrating the techniques to solve particular data problems effectively within your Silverlight and Windows Phone 7 business applications
  • This book is an update to Microsoft Silverlight 4 Data and Services Cookbook

Book Details

Language : English
Paperback : 662 pages [ 235mm x 191mm ]
Release Date : April 2012
ISBN : 1849683506
ISBN 13 : 9781849683500
Author(s) : Gill Cleeren, Kevin Dockx
Topics and Technologies : All Books, Microsoft Development , Web Development, Cookbooks, Enterprise, Microsoft, Microsoft Silverlight

Table of Contents

Preface
Chapter 1: Learning the Nuts and Bolts of Silverlight 5
Chapter 2: An Introduction to Data Binding
Chapter 3: Advanced Data Binding
Chapter 4: The Data Grid
Chapter 5: Working with Local Data
Chapter 6: MVVM
Chapter 7: Working with Services
Chapter 8: Talking to WCF and ASMX Services
Chapter 9: Talking to WCF and ASMX Services—One Step Beyond
Chapter 10: Talking to REST and WCF Data Services
Chapter 11: Using WCF RIA Services
Chapter 12: Advanced WCF RIA Services
Chapter 13: Windows Phone 7
Appendix
Index
  • Chapter 1: Learning the Nuts and Bolts of Silverlight 5
    • Introduction
    • Getting our environment ready to start building Silverlight applications
    • Creating our first service-enabled and data-driven Silverlight 5 application using Visual Studio 2010
    • Using the workflow between Visual Studio 2010 and Blend 5
    • Using source control in Visual Studio 2010 and Blend 5
    • 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
      • Debugging data binding expressions in Visual Studio
      • Data binding from Expression Blend 5
      • Using Expression Blend 5 for sample data generation
      • Chapter 3: Advanced Data Binding
        • Introduction
        • Hooking into the data binding process
        • Replacing converters with Silverlight 5 BindingBase properties
        • Validating data-bound input
        • Validating data input using attributes
        • Validating using IDataErrorInfo and INotifyDataErrorInfo
        • Using templates to customize the way data is shown by controls
        • Using implicit data templates
        • Using the Ancestor RelativeSource binding
        • Creating custom markup extensions
        • 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: Working with Local Data
            • Introduction
            • Reading data from and storing data in the isolated storage
            • Working with IsolatedStorageSettings
            • Caching data between different Silverlight applications using isolated storage
            • Using the Sterling database
            • Chapter 6: MVVM
              • Introduction
              • Creating a basic MVVM application
              • Using MVVM Light to enable MVVM applications
              • Connecting a View to a ViewModel using a ViewModelLocator
              • Connecting a View to a ViewModel using MEF
              • Using commands to pass your events to the ViewModel
              • Communicating between different ViewModels
              • Leveraging a messenger to wrap application-wide messages
              • Chapter 7: Working with 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
                • Accessing a database in the cloud
                • Accessing a service in the cloud
                • Running a Silverlight application from the cloud
                • Using socket communication in Silverlight
                • Chapter 8: Talking to WCF and ASMX Services
                  • Introduction
                  • Invoking a service that exposes data
                  • Invoking a service such as Bing.com
                  • Optimizing performance using binary XML
                  • Debugging a service in Silverlight
                  • Using ASP.NET Authentication in Silverlight
                  • Uploading files to a WCF service
                  • Displaying images as a stream from a WCF service
                  • Chapter 9: Talking to WCF and ASMX Services—One Step Beyond
                    • Introduction
                    • Using duplex communication over HTTP
                    • Using duplex communication with the WCF net.tcp binding
                    • Ensuring data is encrypted
                    • Securing service communication using message-based security
                    • Integrating Windows Identity Foundation in Silverlight
                    • Calling a WCF service from Silverlight using ChannelFactory
                    • Chapter 10: 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 ClientHttp stack
                      • 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 11: Using WCF RIA Services
                        • Introduction
                        • Setting up a data solution to work with WCF RIA Services
                        • Using a WCF RIA Services class library
                        • Getting data on the client
                        • Using LoadBehavior to control what happens to your data once it's sent to the client
                        • Controlling the server-side query from the client
                        • Sorting and filtering data on the server
                        • Paging through your data
                        • Persisting a change set/unit of work
                        • Working with concurrency and transactions
                        • Chapter 12: Advanced WCF RIA Services
                          • Introduction
                          • Tracking a user's identity – default Windows authentication
                          • Tracking a user's identity – a custom authentication service
                          • Integrating Windows Identity Foundation with WCF RIA Services
                          • Controlling a user's access to services and service methods
                          • Validating data: using data annotations
                          • Validating data: writing a custom validator
                          • Validating data: server-side validation with client-side feedback
                          • Validating data: triggering validation when needed
                          • Validating data: using the ValidationContext
                          • Handling errors on the server
                          • Using SQL Azure with WCF RIA Services
                          • Exposing WCF RIA Domain Services as OData endpoints
                          • Exposing WCF RIA Domain Services for other technologies
                          • Chapter 13: Windows Phone 7
                            • Introduction
                            • Getting our environment ready to start building Windows Phone 7 applications
                            • Building your first data-driven Windows Phone 7 application
                            • Getting data on your Windows Phone 7 using WCF
                            • Accessing REST services from Windows Phone 7 using XML
                            • Accessing REST services from Windows Phone 7 using JSON
                            • Working with push notifications using the cloud
                            • Storing data in a local SQL CE database
                            • Using the background transfer service
                            • Appendix
                              • Creating a REST service from WCF
                              • Installing an SQL Server database
                              • Working with Fiddler
                              • Working with the Silverlight control toolkit
                              • Working with WIF
                              • Installing the WCF RIA Services Toolkit
                              • Installing and using NuGet

                              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.
                              Sorry, we don't have any reviews for this title yet.

                              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.

                              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 5 Data and Services Cookbook +    (MCTS) Microsoft BizTalk Server (70-595) Certification and Assessment Guide: Second Edition =
                              50% Off
                              the second eBook
                              Price for both: $51.15

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

                              What you will learn from this book

                              • Build and maintain data-driven applications easily using the data binding engine, which does most of the work for you
                              • See how validation can be applied effectively to ensure correct input within your applications
                              • Use Isolated Storage classes to store data locally, possibly even between sessions, instead of accessing your services for each data need, bringing down the load on your servers
                              • Learn all about the Model-View-View-Model (MVVM) pattern and how you can access data and services from an MVVM architecture
                              • Access all kinds of services, including WCF, ASMX, REST, RSS, sockets and more from your Silverlight applications, even if hosted in Windows Azure
                              • Get a deep knowledge about WCF RIA Services and how you can build your architecture around them
                              • Build data-driven Windows Phone 7 applications and leverage your knowledge in the mobile platform
                              • Throughout the book, you’ll learn to use XAML & C# to build your LOB applications – skills that can be reused for Windows 8 development

                              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, both in an out of the browser. It is also the heart of Windows Phone 7 development so developers can leverage their knowledge on Microsoft’s new mobile platform as well. 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, enterprise-ready solutions with the platform. Silverlight 3 and 4 made a big step into Line-Of-Business data services and Silverlight 5 builds further upon this.

                              In this book, Gill Cleeren, Microsoft Regional Director, Silverlight MVP (former ASP.NET MVP), Telerik MVP at Ordina Belgium and Kevin Dockx, a technical specialist/project leader on .NET web applications and a solution manager for Rich Applications at RealDolmen, focus on showing .NET developers how to get their finger on the pulse of data-driven business applications in Silverlight and Windows Phone 7. What’s more, the upcoming Windows 8 will allow developers to build native, immersive Metro-style applications using XAML & C# - exactly what this book is based upon. In other words, the techniques described in this book also apply to Windows 8.

                              This book is not a general Silverlight 4/5 overview book; it is uniquely aimed at developers who want to build data-driven applications, based on best practices. 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 features covered work both in Silverlight 4 and 5. However, we cover some that are specific to Silverlight 5, which will therefore not work with Silverlight 4. 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 and 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. This book also covers topics related to storing data locally as well as explaining how to work with data and services in a Model-View-View-Model (MVVM) architecture. Most of the content is applicable to Windows Phone 7 developers as well; a specific chapter on WP7 development is included in this release. 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 applying best practices such as MVVM. Each recipe covers a data services topic, going from the description of the problem, through a conceptual solution to a solution containing sample code.

                              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 or Windows Phone 7. 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 Silverlight or Windows Phone 7, 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