Book description
Silverlight 4 has the potential to revolutionize the way we build business applications. With its flexibility, web deployment, cross-platform capabilities, rich .NET language support on the client, rich user interface control set, small runtime, and more, it comes close to the perfect platform in which to build business applications. It's a very powerful technology, and despite its relative youth, it's moving forward at a rapid pace and is gaining widespread adoption.
This book will guide you through the process of designing and developing enterprise-strength business applications in Silverlight 4 and C#. You will learn how to take advantage of the power of Silverlight to develop rich and robust business applications, from getting started to deployment, and everything in between.
In particular, this book will serve developers who want to learn how to design business applications, and tackle the issues that you'll face, and how to resolve them. Chris Anderson demonstrates his experience through a candid presentation of how to approach real-life implementation decisions.
With this book in hand, you will
Create a fully functional business application in Silverlight
Discover how to satisfy all of the common requirements that most business applications share
Table of contents
- Copyright
- About the Author
- Acknowledgments
-
1. Introduction
- 1.1. Who This Book Is For
- 1.2. About This Book
- 1.3. About the Author
- 1.4. Silverlight Overview
- 1.5. Business Applications Overview
- 1.6. Summary
- 2. Getting Started with Silverlight
-
3. An Introduction to XAML
- 3.1. Overcoming XAML's Steep Learning Curve
- 3.2. Why Learn XAML?
- 3.3. XAML Syntax, Document Structure, and Features
- 3.4. Controls
- 3.5. Resources and Resource Dictionaries
- 3.6. Styles
- 3.7. Templates
- 3.8. Data Binding
- 3.9. Designing User Experiences
- 3.10. The Designer/Developer Workflow
- 3.11. XAML User Interfaces: A Different Perspective
- 3.12. Summary
-
4. The Navigation Framework
- 4.1. Getting Started with the Navigation Framework
- 4.2. Components of the Navigation Framework
- 4.3. Navigating Between Views
- 4.4. Passing Data Between Views
- 4.5. Deep Links
- 4.6. URI Mapping to Enable Friendly URIs
- 4.7. Integrating with the Browser History
- 4.8. Handling Navigation Events
- 4.9. Caching Views
- 4.10. Visual Transition Effects
- 4.11. Alternative User Interface Frameworks
- 4.12. Summary
-
5. Exposing Data from the Server: Using WCF RIA Services
- 5.1. What Is WCF RIA Services?
- 5.2. How the WCF RIA Services Code Generator Works
- 5.3. How Do You Use WCF RIA Services?
- 5.4. Getting Started
- 5.5. Creating a Data Access Layer Using the Entity Framework
- 5.6. Domain Services
- 5.7. Domain Operations
- 5.8. Decorating Entities
- 5.9. Presentation Model Types
- 5.10. Sharing Code/Logic Across Tiers
- 5.11. Inspecting the Generated Code in the Silverlight Project
- 5.12. Encapsulating Logic in a Separate WCF RIA Services Class Library
- 5.13. Handling Server Errors
- 5.14. Handling Data Concurrency Violations
- 5.15. Transactions
- 5.16. WCF RIA Services Toolkit
- 5.17. Alternative Communication Technologies
- 5.18. Summary
-
6. Implementing Summary Lists
- 6.1. Exposing a Summary Collection from the Server
- 6.2. Collections and Collection Views
- 6.3. Consuming Data from the Server
- 6.4. Displaying the Summary List
- 6.5. Manipulating Summary Lists
- 6.6. Drilling Down on a Record
- 6.7. Handling Errors
- 6.8. Summary
-
7. Building Data Entry Forms
-
7.1. Creating the Data Entry User Interface
- 7.1.1. Laying Out the Data Entry Form
-
7.1.2. Refining the Data Entry Form's Functionality
-
7.1.2.1. Data Input Controls
- 7.1.2.1.1. The TextBox Control
- 7.1.2.1.2. The CheckBox Control
- 7.1.2.1.3. The RadioButton Control
- 7.1.2.1.4. The ComboBox Control
- 7.1.2.1.5. The List Control
- 7.1.2.1.6. The Date Input Controls
- 7.1.2.1.7. The Time Input Controls
- 7.1.2.1.8. The Up/Down Controls
- 7.1.2.1.9. The AutoCompleteBox Control
- 7.1.2.1.10. The Label Control
- 7.1.2.2. Setting the Tab Order
- 7.1.2.3. Setting Focus
- 7.1.2.4. Getting Focused Control
- 7.1.2.5. Checking Whether Items Have Changed
-
7.1.2.1. Data Input Controls
- 7.1.3. Using the DataGrid for Data Entry
- 7.2. Structuring Objects for Use by Data Entry Forms
-
7.3. Data Validation
- 7.3.1. Displaying Validation Errors
- 7.3.2. Types of Data Validation
- 7.3.3. Defining Validation Rules
- 7.3.4. Exposing Validation Errors to the User Interface
- 7.3.5. Notifying the User Interface of Object-Level Validation Errors
- 7.3.6. The Validator Class
- 7.3.7. Customizing Validation Attribute Error Messages
- 7.4. Submitting Changes to the Server
- 7.5. Summary
-
7.1. Creating the Data Entry User Interface
-
8. Securing Your Application
-
8.1. Implementing Server-Side Security Using RIA Services
- 8.1.1. The ASP.NET Membership API
- 8.1.2. Configuring Your Database for Forms Authentication
- 8.1.3. Authentication
- 8.1.4. Requiring Authentication
- 8.1.5. Role-Based Operation Access Restrictions
- 8.1.6. Returning a Subset of Data Based on the User's ID or Role
- 8.1.7. Permitting Update/Delete Operations According to Data
- 8.1.8. Exposing Custom User Profile Data
- 8.1.9. User Registration
- 8.1.10. Avoiding SQL Injection Attacks
- 8.1.11. Sanitizing Errors Sent to the Client
- 8.2. Implementing Client-Side Security
- 8.3. Encrypting Data Passed Between the Server and the Client
- 8.4. Cross-Domain Access Policies
- 8.5. Restricting Access to Your Application
- 8.6. Summary
-
8.1. Implementing Server-Side Security Using RIA Services
-
9. Styling Your Application
- 9.1. The Designer/Developer Workflow
- 9.2. Defining Style Resources
- 9.3. Control Templates
- 9.4. Theming
- 9.5. Icons and Images
- 9.6. Animation
- 9.7. Pixel Shaders / Effects
- 9.8. Miscellaneous Styling Tips
- 9.9. Summary
-
10. Advanced XAML and Data Binding
-
10.1. Advanced XAML
- 10.1.1. Comments in XAML
- 10.1.2. Defining Constants
- 10.1.3. Using OR to Combine Enumerated Values in XAML
- 10.1.4. Triggers, Actions, and Behaviors
- 10.1.5. Blendability
- 10.1.6. Creating Consolidated Namespaces
- 10.1.7. MoXAML Power Toys
-
10.2. Advanced Data Binding
- 10.2.1. Assigning the Source of a Binding
- 10.2.2. Binding to a Resource
- 10.2.3. Defining Resources in the Code-Behind (For Binding To)
- 10.2.4. Binding to Nested Properties
- 10.2.5. Binding to Indexed Properties
- 10.2.6. Binding to Collection Views
- 10.2.7. Enhancing Data Binding
- 10.2.8. Data Binding in Code
- 10.2.9. Getting and Setting Attached Property Values in Code
- 10.2.10. Additional Tips
- 10.3. Summary
-
10.1. Advanced XAML
-
11. Creating Custom Controls
- 11.1. Adding Functionality to an Existing Control
-
11.2. Creating User Controls
- 11.2.1. Creating a Simple User Control
-
11.2.2. Exposing Properties
- 11.2.2.1. Standard Properties
-
11.2.2.2. Dependency Properties
- 11.2.2.2.1. Why Do We Need Dependency Properties?
- 11.2.2.2.2. Registering a Dependency Property
- 11.2.2.2.3. Getting and Setting a Dependency Property Value
- 11.2.2.2.4. Creating a Standard CLR Property Wrapper
- 11.2.2.2.5. Dependency Property Metadata
- 11.2.2.2.6. Value Precedence
- 11.2.2.2.7. Simplifying Creating Dependency Properties
- 11.2.2.2.8. Obtaining the Local Value
- 11.2.2.2.9. Resetting a Dependency Property's Value
- 11.2.2.2.10. Dependency Properties in Summary
- 11.2.2.3. Consuming the Property Values in Your Control
- 11.2.2.4. Type Converters
- 11.2.2.5. Implementing the ISupportInitialize Interface
- 11.2.3. Exposing Methods
- 11.2.4. Exposing Events
- 11.2.5. Determining If in Design-Time or Runtime Mode
- 11.2.6. Constraining the User Control's Size
-
11.3. Creating Custom Controls
- 11.3.1. Creating the Custom Control
- 11.3.2. The Control Structure
-
11.3.3. Defining the Control's Default Template
- 11.3.3.1. Creating/Editing the Control Template in Expression Blend
- 11.3.3.2. Creating the Base State
- 11.3.3.3. Identifying States and Organizing Them Into State Groups
- 11.3.3.4. Implementing the States
- 11.3.3.5. Adding State Transition Animations
- 11.3.3.6. Defining Template Parts
- 11.3.3.7. Binding to Properties in the Code
- 11.3.3.8. Splitting Your Generic.xaml File Into Smaller Pieces
-
11.3.4. Defining the Control's Behavior
- 11.3.4.1. Defining the Contract
- 11.3.4.2. Connecting the Code and the Default Control Template
- 11.3.4.3. Handling Events for Elements Defined in the Control Template (in the Code)
- 11.3.4.4. Transitioning Between States
- 11.3.4.5. Implementing the WaitIndicator's Behavior
- 11.3.4.6. Testing the Control
- 11.4. Content Controls
- 11.5. Summary
-
12. The Model-View-ViewModel (MVVM) Design Pattern
- 12.1. The Purpose of Implementing MVVM
- 12.2. Why You Should Implement MVVM
- 12.3. MVVM Theory
-
12.4. MVVM in Practice
- 12.4.1. Creating the Layers
- 12.4.2. Connecting the Layers
- 12.4.3. View and ViewModel Interactions
- 12.4.4. Layer Interaction Summary
-
12.4.5. Hotly Debated Implementation Details
- 12.4.5.1. Should Model Objects be Exposed Directly to the View?
- 12.4.5.2. Should View Models Copy Data to and from the Models?
- 12.4.5.3. What Should Come First, the View or the View Model?
- 12.4.5.4. Should I Use a MVVM Framework?
- 12.4.5.5. Should I Implement Dependency Properties or Standard Properties?
- 12.5. MVVM and RIA Services
- 12.6. Frameworks
- 12.7. Summary
-
13. Printing and Reporting
- 13.1. The Importance of Implementing Reporting
- 13.2. Potential Solutions for Implementing Reporting
- 13.3. Choosing a Reporting Strategy
- 13.4. Printing Functionality in Silverlight
- 13.5. Generating and Displaying a PDF Report
- 13.6. Summary
-
14. Out of Browser Mode, and Interacting with the Operating System
-
14.1. Out of Browser
- 14.1.1. Configuring OOB Mode
- 14.1.2. Installing the Application to Run Out of Browser
- 14.1.3. Determining Installation Status
- 14.1.4. Determining Whether Running Inside or Outside the Browser
- 14.1.5. Where/How is the Application's .xap File Stored and Run?
- 14.1.6. Interacting with the OOB Window
- 14.1.7. Checking for Updates
- 14.1.8. Debugging Out of Browser
- 14.1.9. Uninstalling the Application
- 14.1.10. Toast Notifications
-
14.2. Caching Data Locally
-
14.2.1. Caching to Isolated Storage
- 14.2.1.1. Storing Settings in Isolated Storage
-
14.2.1.2. Storing Files in Isolated Storage
- 14.2.1.2.1. Opening an Isolated Storage Store
- 14.2.1.2.2. Working with Directories
- 14.2.1.2.3. Enumerating Through Files and Directories
- 14.2.1.2.4. Working with Files
- 14.2.1.2.5. Writing a Text File
- 14.2.1.2.6. Writing a Binary File
- 14.2.1.2.7. Reading a Text File
- 14.2.1.2.8. Reading a Binary File
- 14.2.1.2.9. Serializing an Object to a File
- 14.2.1.2.10. Deserializing and Rehydrating an Object from File
- 14.2.1.3. Disk Space Quota
- 14.2.1.4. Encrypting Data
- 14.2.1.5. Compressing Data
- 14.2.1.6. The Sync Framework
- 14.2.2. Caching to a Client-Side Database
- 14.2.3. Detecting Network Connection Availability
-
14.2.1. Caching to Isolated Storage
- 14.3. File System Open/Save Dialogs
- 14.4. Drag Drop Target
- 14.5. Clipboard
- 14.6. Full Screen
-
14.7. Elevated Trust
- 14.7.1. Enabling Elevated Trust
-
14.7.2. File System Access
- 14.7.2.1. Getting the Path of a Special Folder
- 14.7.2.2. Enumerating Files and Directories within a Folder
- 14.7.2.3. Determining Whether a File or Folder Exists
- 14.7.2.4. Reading Data from a File
- 14.7.2.5. Saving Data to a File
- 14.7.2.6. Appending Text to a File
- 14.7.2.7. Creating a New Folder
- 14.7.2.8. Deleting a File
- 14.7.2.9. Copying or Moving a File
- 14.7.2.10. Accessing File/Folder Attributes
-
14.7.3. COM Automation
- 14.7.3.1. Determining Whether COM Automation is Available
- 14.7.3.2. Accessing COM Components
- 14.7.3.3. Determining Whether a COM Component is Available
- 14.7.3.4. Using the Windows Script Host Object
- 14.7.3.5. Reading and Writing Files
- 14.7.3.6. Automating Office Applications
- 14.7.3.7. Handling COM Events
- 14.7.3.8. Communicating with Local Databases
- 14.7.3.9. Accessing Local Hardware Devices
- 14.7.3.10. Creating and Installing your own COM Component
- 14.7.4. Custom Chrome
- 14.7.5. Other Restrictions Lifted By Elevated Trust
- 14.7.6. Restrictions Imposed by Elevated Trust
- 14.7.7. Disabling Elevated Trust Applications with a Windows Group Policy
- 14.8. Summary
-
14.1. Out of Browser
-
15. Application Deployment
- 15.1. Deploying the Application to the Server
- 15.2. Deploying the Application to the Client
- 15.3. Improving on the Default Application Loading Screen
- 15.4. Partitioning Your Application
- 15.5. Digitally Signing Your Application
- 15.6. Summary
Product information
- Title: Pro Business Applications with Silverlight 4
- Author(s):
- Release date: August 2010
- Publisher(s): Apress
- ISBN: 9781430272076
You might also like
book
Pro Business Applications with Silverlight 5
Silverlight 5 has the potential to revolutionize the way we build business applications. With its flexibility, …
book
Silverlight 4 in Action
Silverlight 4 in Action is a comprehensive guide to application building using C#. It goes into …
book
Pro Silverlight 5 in VB
Silverlight 5 is the latest iteration of Microsoft's cross-browser technology for creating rich user experiences on …
book
WebSphere Application Server - Express V6 Developers Guide and Development Examples
This IBM Redbooks publication is a practical guide for developing Web applications using the Rational Software …