Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

.NET & Funky Fresh

Check out the WPF book CB and I authored!


Introducing 'Caliburn': An MVC/MVP WPF Framework

Caliburn is a WPF framework geared towards the creation of testable, maintainable and extensible client applications.  It has strong support for MVC/MVP as well as many other features useful in the creation of a modern Windows application.  I started building an early version of this framework in the first quarter of last year for use on a WPF LOB my company was developing for a major state institution.  The framework turned out to be a boon for painlessly creating testable WPF applications.  A month or so ago I decided that the framework needed to be rebuilt in order to improve its design and to add a number of additional features; and to get it into a form that was acceptable for sharing with the larger .NET community.

In the process of building the new version, I spent some time studying other similar frameworks, which I had not done prior to building the original version.  I was pleasantly surprised to find out that several of my ideas were similar to the way the Cocoa framework functions.  I also spent some time looking at CAB and Acropolis and reading a variety of articles/blogs on related subjects.  It was my desire to build something that enables all of the above mentioned functionality but with a simpler usage story; one that feels like WPF and didn't force the use of special base classes, interfaces or custom property implementations.

On that note, you can find the full source code available for download under the MIT License at http://bluespire.com/svn/Caliburn/trunk/.  I hope you will download it and send me some feedback.  The current version still needs work, but I think you'll get the idea by playing around with the sample a bit.  I'm going to be spending several blog posts introducing and explaining the main features of the framework and I hope you'll stick with me and provide me with constructive criticism along the way.

Next week I have an exciting opportunity to sit down with Glenn Block, the p&p team and other WPF gurus to discuss the future of a similar framework that Microsoft is building.  Releasing this code gives me a great way to tangibly express to the p&p guys some of the things I have been thinking about and the techniques I have found useful in building WPF applications.  It is my desire that the p&p team 'steal' as many of the ideas in this framework as they need and that the readers of this blog give me as much feedback as possible as to whether the techniques contained therein are beneficial to anyone else besides me.

Below is a loose listing of the framework's features.  I will be going into detail as to how to use each of these features in future posts:

  • Loose messaging between WPF UI and POCO classes:
    • Use any class as a Presenter/Controller
    • Use any control/event/gesture to send messages to a Presenter.
    • Messages can carry data bound from WPF controls to be used as method parameters on a Presenter.
    • The return value of a Presenter's action can be bound back to the UI.
    • Presenter Actions can be automatically run asynchronously.
    • Presenter Actions can leverage automatic exception handling.
    • Presenter Actions can bubble up to parent presenters if actions are not handled.
  • Loose event pub/sub:
    • Use attributes or a traditional API to register publishers and subscribers.
    • Events can bubble, tunnel or move directly in the even hierarchy.
    • Subscribers can run handlers asynchronously or a publisher can specify all subscribers to run asynchronously.
    • Use any control/event/gesture to raise application events.  Use databinding to pass 'args' along.
  • Platform Abstractions
    • Interface based versions of MessageBox, OpenFileDialog and SaveFileDialog
    • more abstractions to come...
  • Markup Extensions
    • Extensions to make all the above easier to declare in Xaml
    • ResolveExtension for using the IoC container in Xaml
  • Static Gateway
    • All services are accessible through a configurable static gateway.
  • Testable
    • All framework services are interface based.
    • Stubs/Fakes and TestConfiguration provided for all services.
  • PresenterHost
    • Used to host a presenter in markup with runtime view selection.
    • Supports animated transitions between views over a presenter.
  • Module Based Architecture
    • Build your application as pluggable modules.
  • Shell Extension Mechanism
    • The shell can easily declare extension points.
    • Modules can extend the shell through a simple API.
  • Shell State Mechanism
    • The shell can track the state of various UI elements so they can be persisted across application loads.
    • Not limited to Window Size/Position.
    • Track module state across loads.
  • IoC/DI
    • Use Windsor
    • Use Spring.net
    • Use StructureMap (adapter is not quite complete)

NEXT POST - Caliburn: Action Messages



Comments

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# January 7, 2008 6:15 PM

Dan Crevier's Blog said:

Rob Eisenberg posted a new WPF Framework here . I haven't looked at it in detail, but it looks pretty

# January 7, 2008 11:31 PM

Noticias externas said:

Rob Eisenberg posted a new WPF Framework here . I haven't looked at it in detail, but it looks pretty

# January 8, 2008 12:15 AM

MSDN Blog Postings » A WPF Framework said:

Pingback from  MSDN Blog Postings  » A WPF Framework

# January 8, 2008 12:50 AM

Bob said:

Hey Rob, and instructions on how to download the source anonymously?  Svn is asking me for a username/password.

# January 8, 2008 4:12 PM

Rob Eisenberg said:

That's strange.  I'm pretty sure it's set up for anonymous read access.  Give it another try and let me know if you are still having problems.

# January 8, 2008 4:25 PM

Rui said:

I have the same issue accessing the source code

# January 9, 2008 5:50 AM

» Daily Bits - January 9, 2008 Alvin Ashcraft’s Daily Geek Bits: Daily links plus random ramblings about development, gadgets and raising rugrats. said:

Pingback from  » Daily Bits - January 9, 2008 Alvin Ashcraft’s Daily Geek Bits: Daily links plus random ramblings about development, gadgets and raising rugrats.

# January 9, 2008 9:35 AM

WPFCAB has a competitor? « Tales from a Trading Desk said:

Pingback from  WPFCAB has a competitor? « Tales from a Trading Desk

# January 9, 2008 6:52 PM

guidmaster´s .NET blog said:

Introducing 'Caliburn': An MVC/MVP WPF Framework - .NET & Funky Fresh Caliburn is a WPF framework

# January 10, 2008 6:19 AM

Obonnate said:

Hi Rob,

Your work seems really promising but I can't manage to download the source from CVS Tortoise. Looks like SVN doesn't want me to connect as anonymous. :-( Could you give me some more precise instructions ?

Thanks in advance,

# January 11, 2008 4:43 PM

la ciudadela » Blog Archive » Primeras impresiones sobre Caliburn said:

Pingback from  la ciudadela  » Blog Archive   » Primeras impresiones sobre Caliburn

# January 13, 2008 11:55 AM

Wöchentliche Rundablage: ASP.NET MVC, ASP.NET 3.5, Data Services, C# 3.0, WPF, System.AddIn, AJAX… | Code-Inside Blog said:

Pingback from  Wöchentliche Rundablage: ASP.NET MVC, ASP.NET 3.5, Data Services, C# 3.0, WPF, System.AddIn, AJAX… | Code-Inside Blog

# January 14, 2008 2:58 PM

Console.Write(this.Opinion) said:

Resumo da semana - 14/01/2008

# January 14, 2008 5:55 PM

Rob Eisenberg said:

Just a wanted to note that I will be moving the source to a more permanent location soon, in order to fix some of the svn issues.

# January 15, 2008 9:39 AM

singh said:

can you please guide me how i can download the source code...Thanks

# January 31, 2008 12:44 AM

Singh said:

hi

can you please guide me to download the source code..

Thank you

# January 31, 2008 3:24 AM

singh said:

hi

can you please guide to download source code..

Thank you

# January 31, 2008 3:27 AM

singh said:

Hi

can you please guide me to download source code..

Thankyou

# January 31, 2008 3:29 AM

NARI said:

I just found with caliburn what I'm searching for a while to build my projet. It seems that's you make with caliburn the rigth technology and patterns agregation to enable easy building of great WPF applications.

# February 2, 2008 5:08 PM

gOODiDEA said:

.NET: LargefileuploadsinASP.NET

Howto...movefromAjaxProtoASP.NETAJAXPageMethods

H...

# March 3, 2008 8:49 PM

This Week’s Geek Links (Mar. 7th, 2008) « Brian Di Croce said:

Pingback from  This Week’s Geek Links (Mar. 7th, 2008) « Brian Di Croce

# March 9, 2008 12:03 AM

Bj??rn Rochel’s weblog » Blog Archive » Yet another way to do publish & subscribe . . . said:

Pingback from  Bj??rn Rochel’s weblog  » Blog Archive   » Yet another way to do publish & subscribe . . .

# June 30, 2008 4:01 PM

Archive » Bj??rn Rochel???s weblog ?? Blog Archive ?? Yet another way to do … said:

Pingback from  Archive » Bj??rn Rochel???s weblog ?? Blog Archive ?? Yet another way to do …

# July 2, 2008 12:13 PM

Archive » Archive ?? Bj??rn Rochel???s weblog ?? Blog Archive ?? Yet another … said:

Pingback from  Archive » Archive ?? Bj??rn Rochel???s weblog ?? Blog Archive ?? Yet another …

# July 3, 2008 2:46 PM

Archive » Archive ?? Archive ?? Bj??rn Rochel???s weblog ?? Blog Archive … said:

Pingback from  Archive » Archive ?? Archive ?? Bj??rn Rochel???s weblog ?? Blog Archive …

# July 3, 2008 5:56 PM

Archive » Archive ?? Archive ?? Archive ?? Bj??rn Rochel???s weblog ?? Blog … said:

Pingback from  Archive » Archive ?? Archive ?? Archive ?? Bj??rn Rochel???s weblog ?? Blog …

# July 4, 2008 1:48 PM

Elise's blog said:

Après avoir participé à quelques projets WPF depuis maintenant un peu plus d'un an, je suis dans une

# August 12, 2008 7:06 AM

About Rob Eisenberg

Rob Eisenberg is a .NET architect and developer working out of Tallahassee, FL. He publishes technical articles regularly at devlicio.us and has spoken at regional events and to companies concerning .NET technologies and Agile software practices. He is a partner with Christopher Bennage at Blue Spire Consulting, Inc., a software development firm specializing in .NET Development, Rich Internet Applications and Domain-Driven Design. Rob is coauthor of Sam's Teach Yourself WPF in 24 Hours and is the architect/developer of the Caliburn Application Framework for WPF and Silverlight. He is happily married to Anna Eisenberg and in his spare time enjoys swing dancing, making artisan cheese and playing/teaching drum set. Check out Devlicio.us!

Our Sponsors

Red-Gate!

Proudly Partnered With