Archive for category Silverlight

Dynamic Entity Binding–Validation

Last post, I described a method to create a loosely typed business object that supports binding with change notification.  This post I’m going to add validation support. I have chosen to use the INotifyDataErrorInfo interface to implement validation notification since it provides the richest functionality for this purpose.  IDataErrorInfo uses an indexer to report errors, […]

Leave a Comment

Dynamic Entity Binding

Silverlight provides a powerful binding mechanism to allow a comprehensive solution for data transport and validation.  Unfortunately, this binding relies on a hard coded model for implementation.  In the scenario where the schema of the data entity is not known at compile time, there is nothing provided out of the box. I have come up […]

Leave a Comment

Leak proof event bus using MEF

I’ve been trying to implement my own “Event Bus” (Pub/Sub pattern) using MEF since it seems natural to export an event, or a delegate.  The problem is that a reference on one object to a delegate on another object could cause memory leaks.  (See Weak Events in C# by Daniel Grunwald http://bit.ly/chKG7W). Following Daniel Grunwald’s […]

Leave a Comment

ViewModel and Design-Time Data

I have been mulling over different approaches for implementing the ViewModel (MVVM) pattern and feel that I’m close to a solution that I’m happy with.  I have the following criteria: View First.  I don’t like the idea of the ViewModel having even the slightest dependency on the view.  That way I can easily isolate it […]

1 Comment

Dictionarys in XAML

Short and simple post about how to declare and bind to a custom dictionary in Silverlight 4.  I had trouble finding a solid example of this since it has been properly introduced in the full release of Silverlight this past week. Essentially I derived from Dictionary<String,String> and called it CustomDictionary within the application project.  Add […]

Leave a Comment

Unit testing in Silverlight with Rhino

I try to follow the test driven design approach but I find it very difficult to do when ramping up on new technology.  Having wrapped up the initial release of Reflect (my MVVM core library),  I decided to try my hand at writing unit tests for Silverlight. The first step was to get the Unit […]

Leave a Comment

MVVM library source code released.

I have released the source code with unit tests (half done) and a demo application on CodePlex. You can find it here: http://refract.codeplex.com/

Leave a Comment

Composite Silverlight

I’ve been on hiatus for a while working on a windows forms application using Composite Application Block (CAB) and the Model-View-Presenter pattern. This has inspired me in my Silverlight efforts as the modularity of the CAB architecture is enticing. My first attempt involved trying to use Silverlight 3’s navigation application to navigate to pages defined […]

Leave a Comment

User Group Presentation

So I just presented at the Toronto Silverlight User Group (http://www.torontosilverlight.com/) and Toronto .NET User Group (http://www.torontoug.net/) and thought it would be a good idea to share the material with everyone.  I’d like to thank the user group hosts and all that attended for allowing me to rush through what is clearly much more content […]

Leave a Comment

Silverlight LOB Architecture Design

<- User Experience for Line of Business     A Silverlight application by its nature is a distributed app with a front-end on the client and a web service to provide connectivity to the data store. Application Diagram In order to decouple dependencies between components, I use dependency injection.  All components consumed by other components […]

Leave a Comment

Follow

Get every new post delivered to your Inbox.