did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780321810410

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

by
  • ISBN13:

    9780321810410

  • ISBN10:

    0321810414

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2012-03-29
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
List Price: $49.99
We're Sorry.
No Options Available at This Time.

Summary

While nearly one million developers now use Silverlight, most existing guidance remains simple and introductory. Enterprise developers need repeatable best practices and patterns to help them build line-of-business Silverlight solutions more quickly and effectively. This book delivers those practices and patterns, together with state-of-the-art Silverlight 5 code that demonstrates exactly how to use them. Two-time Microsoft Silverlight MVP and long-time Wintellect consultant Jeremy Likness draws on his unsurpassed experience building large-scale commercial applications with Silverlight. Likness guides readers step-by-step through building highly-scalable and modular Silverlight solutions that take full advantage of Enterprise Silverlight, Modular Silverlight, MVVM, and the Managed Extensibility Framework (MEF). Throughout, Likness presents rich code examples in the context of real, production-quality Silverlight case study applications. His code and best practices solve a wide range of complex problems, including: *Transporting data more efficiently *Sharing behaviors between clients and servers more effectively and seamlessly *Creating modular extensions that load on demand *Debugging and profiling large-scale Silverlight systems more successfully. Code samples are written and tested with Silverlight 5 but many of the concepts are applicable to previous versions of Silverlight. Likness also provides a rich glossary and references for using Silverlight even more successfully

Author Biography

Jeremy Likness was named Silverlight MVP of the Year in 2010. Now Senior Consultant and Technical Project Manager for Wintellect, LLC, he has spent the past decade building highly scalable web-based commercial solutions using the Microsoft technology stack. He has 15 years of experience developing enterprise applications in vertical markets including insurance, health/wellness, supply chain management, and mobility. Likness created the popular MVVM framework Jounce, as well as an open source Silverlight Isolated Storage Database System (“Sterling”). He speaks and blogs frequently on Silverlight, MEF, Prism, Team Foundation Server, and related Microsoft technologies.

 

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

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program