MEF, Prism (Silverlight)
Instead of this explicit registration of available components, MEF
provides a way to discover them implicitly, via composition. A MEF
component, called a part, declaratively specifies both its
dependencies (known as imports) and what capabilities (known as
exports) it makes available.
Prism was the code name for the guidance formally known as the
Composite Application Guidance for WPF and
Silverlight. For brevity and conciseness, and due to customer demand,
this guidance is now referred to simply as
Prism.
Prism assumes you have hands-on experience with WPF or Silverlight.
There are a few important concepts that Prism
uses heavily, and you should become familiar with them. They include
the following:
- XAML (Extensible Application Markup Language). The language to
declaratively define and initialize the user
interface in WPF and Silverlight applications.
- Data binding. This is how UI elements are connected to components
and data in WPF and Silverlight.
- Resources. These are how styles, data templates, and control
templates are created and managed in WPF and
Silverlight.
- Commands. These are how user gestures and input are connected to controls.
- User controls. These are components that provide custom behavior or
custom appearance.
- Dependency properties. These are extensions to the common language
runtime (CLR) property system to
enable property setting and monitoring in support of data binding,
routed commands, and events.
- Behaviors. Behaviors are objects that encapsulate interactive
functionality that can be easily applied to
controls in the user interface.
It should be noted that while Prism is not difficult to learn,
developers must be ready and willing to embrace patterns
and practices that may be new to them. Management understanding and
commitment is crucial, and the project
deadline must accommodate an investment of time up front for learning
these patterns and practices.
learning new techniques
by examining source code.
IoC - Inversion of Control
Another way to do this is to have the framework define events and have
the client code subscribe to these events. .NET is a good example of a
platform that has language features to allow people to declare events
on widgets. You can then bind a method to the event by using a
delegate.
provides a way to discover them implicitly, via composition. A MEF
component, called a part, declaratively specifies both its
dependencies (known as imports) and what capabilities (known as
exports) it makes available.
Prism was the code name for the guidance formally known as the
Composite Application Guidance for WPF and
Silverlight. For brevity and conciseness, and due to customer demand,
this guidance is now referred to simply as
Prism.
Prism assumes you have hands-on experience with WPF or Silverlight.
There are a few important concepts that Prism
uses heavily, and you should become familiar with them. They include
the following:
- XAML (Extensible Application Markup Language). The language to
declaratively define and initialize the user
interface in WPF and Silverlight applications.
- Data binding. This is how UI elements are connected to components
and data in WPF and Silverlight.
- Resources. These are how styles, data templates, and control
templates are created and managed in WPF and
Silverlight.
- Commands. These are how user gestures and input are connected to controls.
- User controls. These are components that provide custom behavior or
custom appearance.
- Dependency properties. These are extensions to the common language
runtime (CLR) property system to
enable property setting and monitoring in support of data binding,
routed commands, and events.
- Behaviors. Behaviors are objects that encapsulate interactive
functionality that can be easily applied to
controls in the user interface.
It should be noted that while Prism is not difficult to learn,
developers must be ready and willing to embrace patterns
and practices that may be new to them. Management understanding and
commitment is crucial, and the project
deadline must accommodate an investment of time up front for learning
these patterns and practices.
learning new techniques
by examining source code.
IoC - Inversion of Control
Another way to do this is to have the framework define events and have
the client code subscribe to these events. .NET is a good example of a
platform that has language features to allow people to declare events
on widgets. You can then bind a method to the event by using a
delegate.

Comments