Print this page Share

Silverlight® 4: Problem - Design - Solution

ISBN: 978-0-470-53404-5
528 pages
April 2010
Silverlight® 4: Problem - Design - Solution (0470534044) cover image


A hands-on guide to Microsoft's latest rich application development technology: Silverlight 4

Silverlight 4 is the newest version of the rich Internet application toolkit that provides support for .NET capabilities over the Internet. With this latest release of Silverlight, Microsoft has revolutionized the way that Web applications can be created. This book uses the popular Problem – Design – Solution strategy to demonstrate how to harness the power and abilities of Silverlight 4 to add value to the overall user experience of a Web site.

Using a Web site created by the author as a reference point, you'll go through the steps of creating a live, fully functional application for the Web using Silverlight 4 and the Silverlight Control Toolkit. Along the way, the book addresses important design considerations, such as the use of Web Services and the SQL Server database.

  • Uses the popular Problem – Design – Solution format show you how to harness the power of the latest version of Silverlight, Microsoft's rich Internet application toolkit
  • Puts the author's own Web site to task as you learn to create rich user interfaces that integrate video, HTML, and social networking components
  • Explains system linking and data flow, end user interface, system architecture based on Silverlight 4 and .NET 4, and more
  • Includes coverage on integrating social networking and Facebook

With this book, you'll quickly get started using the new features of Silverlight 4 to enhance the user experience of a Web site.

Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.

See More

Table of Contents

Introduction xv

Chapter 1: FitnessTrackerPlus 1

Problem 2

Design 3

Determining Requirements for the Site 3

Silverlight 4 Features 6

Solution 10

Chapter 2 10

Chapter 3 11

Chapter 4 11

Chapter 5 11

Chapter 6 11

Chapter 7 12

Chapter 8 12

Chapter 9 12

Chapter 10 12

Chapter 11 13

Chapter 12 13

Getting Started 13

Summary 17

Chapter 2: Prepare to Be Popular 19

Problem 19

Design 20

Physical N-Tier Design 21

Load Balancing 22

Cloud Computing 22

Logical N-Tier Design 22

FitnessTrackerPlus Application Design 78

Solution 83

Physical Tier 84

Logical Tier 84

Summary 86

Chapter 3: Sign Me Up 87

Problem 87

Design 89

Home Page 90

User Registration 92

Login Control 97

Solution 98

Main Landing Page 98

Home View 107

User Registration 109

Login Control 134

Dashboard 138

Supplemental Pages 139

URI Mapping 140

Summary 140

Chapter 4: Welcome Home 141

Problem 141

Adding Navigation 142

Providing Site Announcements 142

User-Selectable Themes 142

Account Settings 143

Adding a Dashboard 143

Design 143

User Home Page 144

Navigation Menu 154

Site Announcements 155

Account Settings 156

Theme Selection 157

Fitness Summaries 158

Solution 158

Global Variables 159

Navigation Menu 159

User Home Page 165

Dashboard 169

Account Settings 172

Theme Selection 180

Site Announcements 186

Fitness Summaries 191

Summary 191

Chapter 5: One More Slice Can’t Hurt 193

Problem 193

Design 194

User Stories 195

Requirements 196

Food Log 196

Solution 200

User Interface 201

Database 214

Data Access 214

Business Logic 214

User Interface Code Behind 217

Summary 232

Chapter 6: Time to Hit the Gym 233

Problem 234

Design 234

User Stories 235

Requirements 235

Exercise Log 236

Solution 241

User Interface 242

Database 255

Data Access 256

Business Logic 257

User Interface Code Behind 262

Summary 278

Chapter 7: Am I Working Hard Enough? 279

Problem 279

Design 280

User Stories 280

Requirements 281

Measurement Log 282

Calculator Controls 287

Solution 289

Measurement Log Page 289

Calculator Controls 307

Summary 311

Chapter 8: Unfinished Business 313

Problem 314

Design 314

Food Summary 315

Exercise Summary 317

Measurement Summary 318

Printing Support 319

Solution 319

Food Summary 320

Exercise Summary 333

Measurement Summary 338

Summary 347

Chapter 9: Sharing Your Success 349

Problem 350

Design 351

Public Journal Settings 352

Public Journal 353

Solution 357

Public Journal Settings 358

Public Journal 365

Summary 386

Chapter 10: Social Networking 387

Problem 387

Design 388

MySpace 388

MySpace Silverlight SDK 389

FitnessTrackerPlus — MySpace Application 391

Requirements 394

Solution 397

Getting Started 397

FitnessTrackerPlus MySpace Application 400

Summary 421

Chapter 11: This Site Doesn’t Run Itself 423

Generating Revenue for FitnessTrackerPlus 423

Problem 423

Design 424

Advertising-Based Solutions 424

Google AdSense 424

Recurring Monthly Fees 426

Which Revenue Solution is the Right One? 428

Solution 429

Google AdSense 429

PayPal 436

Summary 461

Chapter 12: Let’s Go Live 463

Problem 463

Design 464

Supplemental Pages 464

Shared Hosting Providers 468

Solution 468

Summary 487

Index 489

See More

Author Information

Nick Lecrenski is the founder and lead developer of MyFitnessJournal.com, a popular fitness tracking web site developed entirely in Silverlight.
See More


Download TitleSizeDownload
ReadMe File 829 bytes Click to Download
Database Files
This zip file includes files for Chapters 2-12.
4.63 MB Click to Download
All Code_New 52.22 MB Click to Download
Chapter 1 Code 182.15 KB Click to Download
Chapter 2 Code 11.21 MB Click to Download
Chapter 3 Code 1.10 MB Click to Download
Chapter 4 Code 3.45 MB Click to Download
Chapter 5 Code 3.94 MB Click to Download
Chapter 6 Code 3.28 MB Click to Download
Chapter 7 Code 3.24 MB Click to Download
Chapter 8 Code 3.32 MB Click to Download
Chapter 9 Code 4.17 MB Click to Download
Chapter 10 Code 4.66 MB Click to Download
Chapter 11 Code 9.11 MB Click to Download
Chapter 12 Code 4.56 MB Click to Download
See More


Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
Please note that Silverlight 4 PDS was written against the most recent release of the various Silverlight 4 development tools that were available at the time of writing. Since the book has been published there have been several new releases of the various tools that have caused code from the book to either not compile or run correctly. Every effort has been made to keep the code available on the Wiley website compiling and running against the most up to date versions of the tools available to the public and I will continue to go through the various chapter text to add to this errata document where there are differences between the printed text and the final public releases of the tools. Now that all of the final releases of the Silverlight 4 development story have been made available the latest release of the Silverlight 4 PDS code will compile and build correctly against the following software:

Silverlight 4 Runtime (RTM)
Silverlight 4 Development Tools (RTM)
Silverlight Toolkit (April 2010)
WCF RIA Services v1.0 (RTM)
WCF RIA Services Toolkit (May 2010)
SQL Server Express with Advanced Services (2008 or 2008 R2)

Please keep checking back here on the Wiley website for future updates to this errata page that will cover all of the changes that were required to compile the code successfully against the latest RTM builds of the Silverlight 4 development tools.

Error in Code
The original .mdf files located in the various projects were built against SQL Server Express Edition with Advanced Services Version 2008 R2. These are not compatible with SQL Express 2008. If you are currently running 2008 you can now build the database files using the supplied database scripts or alternatively you can download the .zip files that contain .mdf files that are compatible with version 2008. SQL Server Express 2008 R2 users are not affected by this update.

If using the script files to recreate the database in SQL Express 2008 you should note that by default the .mdf file will be created under the C:\ folder. You can change this by modifying the path in following lines at the beginning of each script file:

CREATE DATABASE [FitnessTrackerPlus] ON PRIMARY ( NAME = N'FitnessTrackerPlus', FILENAME = N'C:\FitnessTrackerPlus.mdf' , SIZE = 2048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
( NAME = N'FitnessTrackerPlus_log', FILENAME = N'C:\FitnessTrackerPlus_log.ldf' , SIZE = 768KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
96 Error in Text
Hashed description:

Should say "SHA-1" not "SAH-1"
See More
Back to Top