Home > Store

Designing Silverlight Business Applications: Best Practices for Using Silverlight Effectively in the Enterprise

Register your product to gain access to bonus material or receive a coupon.

Designing Silverlight Business Applications: Best Practices for Using Silverlight Effectively in the Enterprise

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2012
  • Edition: 1st
  • Book
  • ISBN-10: 0-321-81041-4
  • ISBN-13: 978-0-321-81041-0

Build Highly Usable, High-Performance Business Applications with Silverlight 5

Microsoft Silverlight MVP and Wintellect Consultant Jeremy Likness gives you all the hands-on guidance and proven  patterns and practices you need to build scalable, maintainable, and highly professional applications for multiple platforms  and browsers. In this first complete guide to designing Silverlight applications for commercial use, Likness focuses on  the advanced Silverlight features most directly related to solving real-world business problems and demonstrates how  these features fit together in production-quality applications.

Written from the ground up, this book covers every key area of enterprise Silverlight development. For each, Likness  introduces the opportunities and capabilities Silverlight provides, offers relevant case studies from actual projects,  presents complete C# code samples, and explains them in detail. Every chapter concludes with a summary highlighting  the specific information and techniques most important for developers to consider.

Coverage includes

•    Discovering why Silverlight is superior to HTML5/JavaScript for most line-of-business applications

•    Leveraging Silverlight 5’s powerful enhancements to performance, text, printing, usability, security, and programmability

•    Effectively applying Silverlight’s application cycle in enterprise applications

•    Using XAML to drive Silverlight’s visual interface

•    Quickly transforming raw data into visually appealing information

•    Using Silverlight’s innovative Visual State Manager and data binding to separate design, UI/UX experience,  and business logic

•    Simplifying development with the MVVM pattern

•    Using MEF to integrate modular code into highly extensible, maintainable, and testable Silverlight applications

•    Improving and automating testing with Silverlight Unit Testing Framework and third-party add-ons

•    Mastering each leading approach to navigation and implementing the best one for your application

•    Implementing the service layer, persistence, and state management

•    Building advanced “out-of-browser” applications

•    Integrating sophisticated line-of-business features into your solutions

•    Optimizing the performance of your Silverlight applications

This book will be invaluable for all experienced client developers who use Microsoft’s  technology stack and want to leverage Silverlight’s immense power; and for every Silverlight  developer seeking to improve existing line-of-business applications with the new Silverlight 5.

Downloads

Downloads

Download free code files here

Sample Content

Online Sample Chapter

Designing Silverlight Business Applications: the Model-View-ViewModel (MVVM)

Sample Pages

Download the sample pages (includes Chapter 7 and Index)

Table of Contents

Foreword     xviii

Preface     xx

Acknowledgments     xxx

About the Author     xxxii

Chapter 1 Silverlight     1

The Common Language Runtime (CLR)     1

The Base Class Library (BCL)     2

The Presentation Core     3

The Presentation Framework     3

Communications     4

Data     4

Key Differences from the Full CLR     5

Silverlight First     6

WPF and Silverlight     7

HTML5     8

HTML5 Is Not Ready for Line of Business     10

HTML5 Won’t Keep Pace     11

HTML5 Isn’t Just Markup     12

HTML5 Is Not Native     12

HTML5 Is the Perfect Technology     14

Which Client Technology Is Right for You?     14

Use What You Know     15

Listen to the Customer     15

Consider the Development Team     16

Analyze Third-party Dependencies     17

LOB Applications     18

Summary     19

Chapter 2 Getting Started     21

Setting Up Your Environment     21

Silverlight 5 SDK and Visual Studio Tools     22

Expression Blend SDK     22

Silverlight Toolkit     24

Open Source Projects     25

Hello, Silverlight     26

Creating the Silverlight Application     27

Class Libraries     29

Application Services     32

Creating the Extension XAP     41

Sharing between Silverlight and the Core Framework     48

What about Those Templates?     53

The Standard Solution     55

Web Host     55

The Silverlight Project     59

Anatomy of a XAP File     61

Summary     64

Chapter 3 Extensible Application Markup Language (Xaml)     67

Markup and Class Instantiation     68

Dependency Objects and Properties     70

Dependency Properties     71

Attached Properties     75

Value Precedence     76

Markup Extensions     76

Type Converters     81

Value Converters     84

Styles     86

Storyboards     91

Layout     95

Measure and Arrange     96

Canvas     96

Grid     97

StackPanel     101

VirtualizingPanel and VirtualizingStackPanel     103

Containers     104

ContentControl     104

ItemsControl     105

ScrollViewer     105

ViewBox     106

Basic Controls     108

Summary     111

Chapter 4 Advanced Xaml     113

Working with Text     114

Rich Text     114

Character Spacing     120

Line Height     121

Parts, States, and Templates     123

Parts     123

States     127

Data Templates     128

Design-time Extensions     132

Interactivity with Behaviors and Triggers     141

Behaviors     141

Triggers     147

Natural User Interface (NUI)     149

Resource Dictionaries and Isolating Themes     151

Embedding and Distributing Fonts     155

Tips for XAP Extensions     157

Summary     159

Chapter 5 The Visual State Manager     161

Introduction to the VSM     162

Groups     162

States     165

Transitions     170

The Visual State Manager Workflow     171

Advanced Troubleshooting and Events     172

Custom Visual State Managers     176

The Visual State Manager in Blend     177

The Visual State Aggregator     185

Summary     194

Chapter 6 Data-Binding     195

Data-Binding Basics     196

Data-Binding Debugging     200

Data-Binding within Styles     203

Synchronizing Lists     208

Commands     218

Validation     220

Validation with Exceptions     224

Validation Using Data Error Info     226

Asynchronous Validation     230

Fluent Validation     232

Summary     244

Chapter 7 Model-View-ViewModel (MVVM)     245

UI Design Patterns     246

The Model-View-ViewModel Pattern     251

The Model     255

The View     262

The View Model     264

Binding the View Model to the View     265

View Model Locators     265

Controllers     269

Design-Time View Models     271

Custom Markup Extensions     272

View-Model-First Approach Versus View-First Approach     274

Lists and Data Elements     275

Summary     276

Chapter 8 The Managed Extensibility Framework (MEF)     279

Discovery     281

Imports     281

Exports     284

Parts     286

Catalogs     287

Containers     288

Composition Initializer and Host     289

Lifetime Management     291

Extensibility     295

Recomposition     297

Deployment Catalog     301

Discovering XAP Files     303

Offline Catalog     305

Metadata     306

Weakly Typed Metadata     306

Strongly Typed Metadata     309

Lazy<T,TMetadata>     312

Troubleshooting     313

Understanding Stable Composition     314

Import Parameters     315

The MEF Debugger     316

Jounce, an MVVM with MEF Framework     318

Summary     319

Chapter 9 Testing     321

Why Test?     322

Testing Eliminates Assumptions     323

Testing Kills Bugs at the Source     324

Testing Helps Document Code     324

Testing Makes Extending and Maintaining Applications Easier     325

Testing Improves Architecture and Design     326

Testing Makes Better Developers     326

Conclusion: You Should Test     327

Unit Tests     327

Silverlight Unit Testing Framework     332

Linked Classes and Shared Testing     338

Automated Testing     343

Mocking and MEF     345

View Model Tests     352

Testing Xaml     359

Coded UI Tests     364

Challenges     366

Automation Peers     367

Summary     371

Chapter 10 Navigation     373

The Silverlight Navigation Framework     374

Basics of Navigation Using the Framework     375

Choosing Page-Based Navigation     377

Custom Navigation     378

Manual Navigation     379

Containers     379

Navigation Events     384

Region Management     391

Summary     398

Chapter 11 The Service Layer     399

Domain Data and Behaviors     400

Strategies for Sharing Domain Objects between the Client and Server     401

DOM Interop and ASP.NET Callbacks     402

The Updated To-Do List     402

DOM Interoperability     404

Another Example: Callbacks     407

Communication     412

Representational State Transfer (REST)     412

Plain Old XML (POX) and JavaScript Object Notation (JSON)     423

Windows Communication Foundation (WCF)     424

WCF RIA Services     431

Local Messages     435

Sockets     436

Mapping and Transformation     443

Mapping Versus Exposing the Model     443

Dynamic Types     448

The Custom Type Provider     450

Asynchronous Techniques     452

Events Versus the Asynchronous Programming Model (APM)     452

Lambda Expressions and Method Chaining     455

Action and Callbacks     456

Reactive Extensions (Rx)     459

IWorkflow     460

Tasks and await     463

Summary     465

Chapter 12 Persistence and State Management     467

The To-Do List Application     468

WCF RIA Services     468

Filters and Sorts     471

Navigation Parameters     472

Persisting Preferences with Settings     473

Folders and Files in Isolated Storage     476

Managing Isolated Storage Access and Quotas     478

Accessing Folders and Files     482

Finding Isolated Storage     484

Iterating the File System     485

Signing Files     491

Encrypting Files in Silverlight     494

Sterling in Silverlight     498

Summary     514

Chapter 13 Out of Browser Applications     515

Getting Started     516

Checking for Updates     523

Elevated Trust     526

Application Signing     528

File System Access     530

Toast Notifications     531

Child Windows     535

COM Interop and Script Host     540

Native Silverlight Extensions     546

p/Invoke     547

Elevated Trust in the Browser     552

Distribution and Installation     553

Installation     553

Execution     554

Uninstalling Your OOB Application    555

Summary     556

Chapter 14 Line of Business Features     557

Designer/Developer Workflow     559

Printing     561

Localization     571

Modularity and Extensibility     576

Scalability     578

Extremely Large Data Sets     578

Concurrency     590

Synchronization     593

Proof of Concept     594

Summary     596

Chapter 15 Debugging and Performance Optimization     597

Debugging Silverlight Applications     598

Debug Symbols     600

Debugging Tips     602

Debugging Applications Already Launched     608

WinDbg     611

Logging and Tracing     616

Client Logging and Tracing     617

WCF Tracing     619

Profiling Applications with Visual Studio     622

Fiddler     625

Silverlight Spy      626

Summary      627

Glossary      629

Index      653

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020