O'Reilly logo

Pro Silverlight 5 in VB by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Command Model

In a well-designed Silverlight application, the application logic doesn't sit in the event handlers but is coded in higher-level methods. Each one of these methods represents a single application “task.” In turn, each task may rely on other libraries (such as separately compiled components that encapsulate data access, web service calls, or other types of business logic). Figure 4-9 shows this relationship.

images

Figure 4-9. Mapping event handlers to a task

The most obvious way to use this design is to add event handlers wherever they're needed and use each event handler to call the appropriate application method. In essence, your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required