Composing Applications with Silverlight and Prism – Shawn Wildermuth MSDN


Updated

As requirements change and a project matures, it is helpful if you can change parts of the application without having these changes cascade throughout the system. Modularizing an application allows you to build application components separately (and loosely coupled) and to change whole parts of your application without affecting the rest of the code.

The Prism package is a mix of framework and guidance for building applications. The framework, called the Component Application Library (CAL), enables the following:

  • Application modularity: Build applications from partitioned components.
  • UI composition: Allows loosely coupled components to form user interfaces without discrete knowledge of the rest of the application.
  • Service location: Separate horizontal services (for example, logging and authentication) from vertical services (business logic) to promote clean layering of an application.
The CAL is written with these same design principles in mind, and for application developers it is a buffet-style framework—take what you need and leave the rest. Figure 1 shows the basic layout of the CAL in relation to your own application.
Figure 1 Composite Application Library
The CAL supports these services to aid you in composing your application from smaller parts. This means the CAL handles which pieces are loaded (and when) as well as providing base functionality. You can decide which of these capabilities help you do your job and which might get in the way.

My example in this article uses as much of the CAL as possible. It is a shell application that uses the CAL to load several modules at run time, place views in regions (as shown in Figure 2), and support services.

Via Composing Applications with Silverlight and Prism

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s