How to succeed with WPF and Silverlight (Slides from NNUG)
View more presentations from Pål Eie.
RSSReader example code from my NNUG speech (WPF and Caliburn)
November 24 I presented Caliburn and Caliburn.Micro at the .Norwegian .Net User Group community meeting in Stavanger.
In my speech I tried to sum up some of the advantages of using a robust framwork when doing developing in Silverlight or WPF, framworks like: MVVM Light, Caliburn or Caliburn.Micro.
The source code from my speech can be found at filehub.iserialized.com. The example is a fairly simple WPF application, and the GUI it selves sucks, as my focus has been:
- Databinding
- Core Caliburn functionality
- The simplicity of using IoC in the combination WPF and Caliburn
Linq performance, Count() vs Any()
I just came across some very interesting information. Every used the following statement:
if (mysequenece.Count() > 0)
{
//Do something
}
The problem here is the Count() statement which can potentially be very inefficient, as it traverse the whole list to calculate a value. But we reallly don't need the exact count, in most cases we just need to know if there are any values, and hence, we can rather use Any() which is another extension method from Linq.
Getting started with Caliburn Part 2: Multiple Views on one ViewModel
The documentation and tutorials on Caliburn is still very limited, and is one of the biggest obstacles getting started with Caliburn right now. In this post I hope to fill some of the gaps I have seen in the lack of documentation by showing how you can easily hook up two Views to one ViewModel.
Getting started with Caliburn
The lack of documentation and examples of usage is one of the biggest obstacles getting started with Caliburn. I hope this article can help somewhat!
One of my biggest fears when starting a new project is heading in the wrong direction and not realizing that we are headed for disaster until it's too late. Due to architectural decisions, this is always a worry, but the new project is based on WPF, the risk and possibility of a failure is drastically increased. I'm afraid that my WPF projects become "Windows Formish", not taking advantage of MVP/ MVVM.
This is Part 1 of my series on Caliburn, Part 2 on multiple views on one ViewModel can be found here, and Part 3 on unit testing Caliburn can be found here.
Caliburn was designed to aid in the development of WPF and Silverlight applications, enabling easier use of among other MVP and MVVM. This article will be a walkthrough of a rather simple WPF application based on Caliburn. The example used here is a very simple application retrieving a value from a textbox, publishing it to an EventAggregator, and then let another component handle the published message. Hopefully I am able to show some of the advantages of Caliburn through this example.
