You are previewing Mastering LOB Development for Silverlight 5: A Case Study in Action.
O'Reilly logo
Mastering LOB Development for Silverlight 5: A Case Study in Action

Book Description

Develop a full Silverlight 5 Line of Business application with the help of a case study built from start to finish using this book.

  • Dive straight into Silverlight 5 with the advanced techniques in this expert guide

  • Fully up-to-date content for Silverlight 5 and RIA Services SP2

  • Complete your knowledge with a gradually built upon case study with this book and e-book

In Detail

Microsoft Silverlight is fully established as a powerful tool for creating and delivering Rich Internet Applications and media experiences on the Web. This book will help you dive straight into utilizing Silverlight 5, which now more than ever is a top choice in the Enterprise for building Business Applications.

“Mastering LOB Development for Silverlight 5: A Case Study in Action” focuses on the development of a complete Silverlight 5 LOB application, helping you to take advantage of the powerful features available along with expert advice.

Fully focused on LOB development, this expert guide takes you from the beginning of designing and implementing a Silverlight 5 LOB application, all the way through to completion. Accompanied by a gradually built upon case study, you will learn about data access via RIA and Web services, architecture with MEF and MVVM applied to LOB development, testing and error control, and much more.

With “Mastering LOB Development for Silverlight 5: A Case Study in Action” in hand, you will be fully equipped to expertly develop your own Silverlight Line of Business application, without dwelling on the basics of Enterprise Silverlight development.

Table of Contents

  1. Mastering LOB Development for Silverlight 5: A Case Study in Action
    1. Mastering LOB Development for Silverlight 5: A Case Study in Action
    2. Credits
    3. Foreword
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    7. Preface
      1. LOB application case study: applying what we have learned
      2. What this book covers
      3. What you need for this book
      4. Who this book is for
      5. Conventions
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Express Introduction to Silverlight
      1. Introduction to Silverlight
      2. Installation
      3. Silverlight architecture
        1. Creating the Hello World project
        2. Creating a new project
        3. Coding directly into the markup language
      4. Dragging-and-dropping controls
      5. Interacting with Code-Behind
      6. XAML basic concepts
        1. What is XAML?
      7. Basic elements for layout definition
        1. Canvas
        2. StackPanel
        3. Grid
        4. Controls
      8. LOB application case study: applying what we have learned
      9. Summary
        1. Additional resources
    9. 2. Forms and Browsing
      1. Controls definitions
      2. Creating windows and controls
        1. UserControl
          1. Example of UserControl
          2. Instantiating the control from code (Code-Behind)
        2. Page control
      3. Creating modal dialogs
        1. Example of modal dialogs
      4. Navigation
        1. Navigating the Web
        2. Silverlight Navigation Framework
          1. Integrating Navigation Framework in the browser
          2. UriMapper
        3. Frame
      5. Creating a sample Navigation Application
        1. Adding a new page
      6. Navigation control services
        1. URI parameters
        2. Deep Linking
      7. LOB application case study: applying what we have learnt
        1. MapView.XAML page
        2. AdminView.XAML Page
        3. Modal AdminEditionView.xaml dialog
      8. Summary
        1. Additional resources
    10. 3. Data Binding
      1. Understanding DataSource
        1. Path
        2. Binding sources
          1. DataContext
          2. Change notifications
          3. Data binding modes
      2. Introducing the ViewModel
        1. ViewModel example
      3. Dependency properties
        1. Data binding from Code-Behind
      4. Adding validations
        1. BindingValidationError
        2. DataAnnotations
      5. Converters
        1. IValueConverter
      6. LOB application case study: applying what we have learned
        1. Entity classes
        2. ObservableCollection
          1. AdminViewModel object
          2. Data binding
      7. Summary
        1. Additional resources
    11. 4. Architecture
      1. Patterns
      2. MVVM pattern
        1. Creating an MVVM-based sample application
          1. Creating the project structure
          2. Coding the project
            1. MyTweet.Model
              1. MyTweet.ViewModel
                1. MyTweet.View
      3. MVVM Light Toolkit
        1. ViewModelBase
          1. RelayCommand
            1. Messenger
      4. Managed Extensibilty Framework (MEF)
        1. MEF definitions
          1. Parts and contracts
          2. Composition
        2. Creating a mock model using MEF
      5. Solution and folder structure
      6. LOB application case study: applying what we have learned
        1. Project structure
          1. Folder structure
          2. Main solution structure
        2. Libraries
          1. Packt.Libs.Navigation
            1. Packt.Libs.Threading
            2. Packt.Libs.Utils
            3. Packt.Libs.Windows
      7. Summary
        1. Additional resources
    12. 5. RIA Services Data Access
      1. Accessing data
      2. RIA Services pieces
      3. Creating a Domain Service and consuming it from a Silverlight application
      4. CRUD
        1. Read
          1. Create
          2. Update
          3. Delete
          4. Error control
          5. Simple data binding
      5. Validation
        1. DataAnnotations
          1. Simple validations
          2. Custom and shared validations
          3. Entity-level validations
        2. Domain Services validations
          1. Server validations
          2. Asynchronous validations
      6. Advanced topics
        1. Cancelling changes
        2. Transactions
        3. Domain Service and partial classes
        4. Include
          1. Composition
          2. Solving the many-to-many relationship issue
      7. RIA Services and MVVM
        1. Encapsulating RIA Services in a model
        2. Context lifetime discussion and model factory
      8. LOB application case study: applying what we have learned
        1. Server
          1. Test
          2. Model
          3. Modules
      9. Summary
        1. Additional resources
    13. 6. Out of Browser (OOB) Applications
      1. Out of Browser (OOB)
      2. Executing an application in OOB mode
      3. Enhancing the experience—tooling up and updating
        1. In-browser/OOB detection
        2. Detecting the application installed
        3. Installing the custom interface
        4. Uninstalling an OOB application
        5. Offline installation
        6. Updates
      4. Offline work
        1. How it works
      5. Breaking the sandbox—trusted applications
        1. Enabling trusted mode
          1. Advantages of trusted applications
          2. Accessing files
          3. Making calls to COM+
            1. Writing an entry on the registry
            2. Executing notepad from our application
          4. P/Invoke
          5. Cross-domain calls
          6. WebBrowser control
            1. How it works
          7. Real windows
      6. In-browser trusted applications
      7. LOB application case study: applying what we have learned
      8. Summary
        1. Additional resources
    14. 7. Testing your LOB Application
      1. Types of testing
      2. Methodologies
      3. Unit testing with Silverlight
        1. Testing server code
        2. Testing client code with MSTest
      4. Libraries to test Silverlight code
        1. Testing synchronous client code with Silverlight Unit Testing
        2. Testing asynchronous client code with Silverlight Unit Testing
        3. Isolating unit tests via substitutes
      5. LOB application case study: applying what we have learned
      6. Summary
        1. Additional resources
    15. 8. Error Control
      1. Following best practices
      2. Exception handling
        1. Getting started
          1. Try and catch
          2. The "finally" expression
          3. Strategies
        2. Asynchronous patterns
          1. AsyncCompletedEventArgs
          2. ExceptionRoutedEventArgs/UnhandledExceptionEventHandler
        3. Global exception handling
      3. Understanding the exception types
        1. Fatal exception
        2. Boneheaded exceptions
        3. Vexing exceptions
        4. Exogenous exceptions
      4. Logging
        1. Enterprise application framework
          1. Architecture
          2. Practice
          3. Exception handling
        2. PostSharp
      5. Reporting bugs
        1. Architecture
        2. Service implementation
        3. Client implementation
      6. LOB application case study: applying what we have learned
        1. Server side
        2. Client side
      7. Summary
        1. Additional resources
    16. 9. Integration with other Web Applications
      1. Page architecture
      2. Communication between an ASPX page and Silverlight
      3. Accessing Silverlight from JavaScript
        1. Exposing methods and functions
        2. Returning complex data
        3. Registering a Silverlight object
      4. Accessing JavaScript from Silverlight
        1. HtmlPage object
      5. DOM handling from Silverlight
        1. HtmlDocument
        2. HtmlElement
      6. Interaction between Silverlight and JavaScript
        1. Address book
          1. Visual Studio solution
          2. Login page
          3. Contact list
          4. Contact edition
        2. Calling JavaScript code
      7. LOB application case study: applying what we have learned
      8. Summary
        1. Additional resources
    17. 10. Consuming Web Services
      1. Definitions
      2. Implementing and consuming a WCF service
        1. Proposal for sample projects
        2. Building the server
        3. Enabling WCF service for Silverlight 4
        4. Designing the client UI
        5. Referencing a WCF service from client
        6. Consuming a WCF service from Silverlight
        7. Using complex types via WCF
      3. Consuming a public API web service
        1. Twitter API
        2. Starting the Twitter project
          1. Calling the Twitter API
          2. Processing JSON format
      4. LOB application case study: applying what we have learned
        1. Implementation of the service client
      5. Summary
    18. 11. Security
      1. Client-side security
        1. Critical information
        2. Signing assemblies
        3. XAP and certificates
        4. XAP and obfuscation
      2. Server-side and communication security
        1. Validations
        2. Cross-domain calls
        3. Security in our communications
        4. Authentication and authorization with RIA Services
          1. Authentication
          2. Authorization
        5. Authentication and authorization in WCF Services
        6. Protecting communications with SSL
      3. LOB application case study: applying what we have learned
        1. Server side
        2. Client side
      4. Summary
        1. Additional resources