Actions extend the databinding capabilities of WPF/SL by enabling a UI to bind not only to data but to methods as well. Caliburn provides a consistent API for wiring events, gestures, and attached events to methods on a presentation-related class. This type
of method binding removes much of the glue code involved in building an
or Presentation Model
(MVVM) architecture. In addition to basic execution of methods, Caliburn's action mechanism can pass data from the UI into the methods as parameters and bind
return values back to the UI. A filter mechanism (similar to ASP.NET MVC) exists for decorating methods. Filters can affect the availability of a given action through the UI, which can be represented by automatically disabling, hiding or collapsing controls.
Caliburn can also automatically execute methods asynchronously, and execute callbacks. It does all the thread marshalling for you. If that's not enough power, you can take advantage of Caliburn's Coroutine implementation through actions as well.
Caliburn's command implementation is an alternative to WPF's and supplies very useful functionality that is altogether missing from Silverlight. As you might expect, it is an implementation of the
. Commands are built on top of Actions and thus share many of the same features, including multiple input parameters, filters and automatic asynchronous execution. Additionally, commands
can be created in hierarchies, such that a parent command can execute multiple child commands. The parent command's availability can also be affected by its children in various ways.
Caliburn supports UI architectures based on MVP and MVVM through its various implementations of the IPresenter interface. Often times, these types of architectures involve tricky UI lifecycle issues such as handling activation, deactivation and shutdown semantics
for various UI components. The basic logic for handling these scenarios is found in Caliburn’s Presenter, PresenterManager, MultiPresenter, MultiPresenterManager and Navigator classes. By composing these classes you can create a hierarchical model representing
the entire runtime state of your application. In Silverlight, you can even use the browser as an Application Controller with Caliburn’s support for deep linking. By using these classes as a starting point, you can very quickly get up in running with an MVP
or MVVM architecture.
Convention over configuration is a way to leverage a great deal of a framework's power without having to go through tons of tedious configuration or setup code. Caliburn has basic conventions around view discovery, binding of actions and building-up of
hierarchical View Models. These are all implemented through well-known services which are easily replaceable or extendable with your own conventions.
One of the goals of Caliburn is to make it easier to build applications right. To this effect, Caliburn has features geared around
. There is currently rich support for testing databindings in WPF and a simple fluent interface for verifying change notification on model objects. Unit tests for view bindings give the developer
the confidence they need to refactor their models, knowing that they will be aware of broken bindings before they run the application. Not only will they be aware that the bindings are broken, but Caliburn’s binding validator will tell you exactly where the
problem is in the UI hierarchy and what the specific error was.
Various utility classes and extension methods are provided as part of Caliburn. The most popular of which is the Execute static class, which enables a developer to easily execute code on a background thread or on the UI thread.