Thursday, August 21, 2008

I follow blogs about SL with quite some interest and found this site: http://riastats.com/ . It basically tracks browsers to see if Flash and Silverlight is installed. You can clearly see that SL has a long way to go, but I was still amazed to see that SL had almost 25% share already.

Looking at the line graph, you can see that in the last week, SL 2 market share has grown extremely rapidly. That makes this post by John Dowdell (from Adobe) outdated, since he was only seeing a 2% share at the moment of writing. The mere fact that he uses these numbers, lend some kind of credibility.

I’m very interested in seeing the statistics from some other sites. Keep in mind that riastats base these numbers on only 18,600 unique browsers and do not disclose which sites are used (for all we know, they are Silverlight blogs :) ).
When numbers seem too good to be true, they usually are.

In any case though, I will keep my eye on the statistics the next few weeks!

 

ps. if you know of other statistics sites that show SL reach, leave a comment.

Thursday, August 21, 2008 10:14:21 PM (Romance Standard Time, UTC+01:00)  #    Comments [4]  |  Trackback
 Tuesday, August 05, 2008

The EFDesign team is giving you a platform to discuss the way they are planning to implement POCO into EF. This is the time to be heard, so click here.
I have been spending my energy on my upcoming international move and silverlight, but it’s an interesting post that I will be following with great interest!

Tuesday, August 05, 2008 3:23:46 PM (Romance Standard Time, UTC+01:00)  #    Comments [0]  |  Trackback
 Friday, July 25, 2008

I started my career when I was still in university. I started a company named Sitechno that did webapplications and custom solutions. The last few years, I’ve been hired as a consultant on some big projects.
The role I was given on my last project, allowed me to do some crazy cool stuff, using nHibernate and winforms. I was able to push WCF, WF and WPF into a big client/server application, and had great success with it. We reformed a monolithic data-oriented application into a domain-oriented loosely coupled application.

It’s easy enough to find new projects, but the market for the cutting edge technologies is not very big ;-)

When I was asked to join Microsoft, my main attraction to the offer was the opportunity to work on cutting edge technology with a group of passionate people. When I talked Microsofties on the Redmond campus, it became clear that they could certainly offer just that.

I was torn between working on EF (which, I’ve been very involved with lately) and on Silverlight.
In the end, Silverlight won, because I strongly believe it to be the strongest contender in the client space, there is an interesting ‘war’ going on right now, and I have really enjoyed working with the WPF-framework in the past. I was torn by the decision because whatever choice I made, I knew that a great opportunity would be lost.

We will be heading to Vancouver, Canada in September and I will work for Microsoft Canada for a year. After that, I will be allowed to work in the U.S.A. and we will move to Redmond.

You can not believe how excited I am about this opportunity. I will be working for Shawn Burke on Silverlight Controls. I’m not sure yet who else is working on the team, but I believe/hope I’ll be working with David, Ted, Kirti and Jeff.

As for EFContrib: although I’m dedicated to it, I’m having a hard time finding the time to work on it. Also, since version 2.0 of EF will feature some nice Poco capabilities. So, I’m not sure if people are waiting for the solution. It would be nice to make it work with SL though! So, if I find the time, or get lots of mail of people wanting me to finish it properly, I’ll work on it some more.

Friday, July 25, 2008 9:46:13 AM (Romance Standard Time, UTC+01:00)  #    Comments [9]  |  Trackback

Josh Smith just published a great article about his solution to using RoutedCommands in WPF.

The problem he solves, has been solved by others before, however, I think this is a very lightweight succinct way of doing it.
Basically, when you set a command to a button, you will have to handle that logic (canExecute and Execute) in the codebehind of the view. Since you are (hopefully) using a MVC, MVP or MVVM approach, you would rather not go through the codebehind of the view, but directly route the commands to the appropriate viewmodel/controller.

He creates a relaying object that does just that. This results in a completely empty codebehind for the view, which is exactly what I like!

Good job Josh!

Friday, July 25, 2008 9:17:02 AM (Romance Standard Time, UTC+01:00)  #    Comments [1]  |  Trackback
 Friday, June 20, 2008

Well, I wrote about one way to do deeplinking and knew that there had to be something out there that already did this.

Look no further. It’s here!

Friday, June 20, 2008 11:11:52 PM (Romance Standard Time, UTC+01:00)  #    Comments [2]  |  Trackback
 Wednesday, June 18, 2008

Ninject is a lightweight dependency injection framework and it has been getting quite a bit of attention lately.
What makes is superspecial, is that it runs under Silverlight 2.0 beta 2!

The Ninject website is here and Nate Kohari talks about this release here. From his post:

So, what are some of the features of Ninject 1.0?

  • Constructor, property, method, and field injection
  • Instantiation behaviors (singleton, one-per-thread, one-per-request)
  • Fluent interface for declaring type bindings
  • Contextual bindings, where the selection of which type to instantiate can be delayed until activation
  • Support for instance scope and deterministic disposal
  • Fully pluggable, modular design: each kernel component can be easily replaced to alter the framework’s behavior
  • Lightweight interceptor support (aspect-oriented programming)
  • Integrations with other popular frameworks

It’s great to see people working on MVC approaches and now even DI frameworks for SL. Keep it coming!

Wednesday, June 18, 2008 11:42:42 AM (Romance Standard Time, UTC+01:00)  #    Comments [0]  |  Trackback

Nihkil wrote sometime ago about ‘actions’, which was a concept he created that attach some behavior to elements. Think of the action of pressing the ‘enter’ key in a textbutton and executing some logic (sparing the user a click on the button next to the textbutton).

He has clearly been thinking more about his framework and now posts about the MVC concept of the ViewModel, extending it with his actions here. Good write-up. Go read it.

Basically, he explains what a ViewModel is and shows how to execute ‘command’-like behavior on them. As you might know, Silverlight does not support the concepts of commands, like WPF does. His syntax is like this:

 

  1 <vm:View xmlns="..." xmlns:x="..."
  2   xmlns:vm="clr-namespace:Silverlight.FX.ViewModel;assembly=Silverlight.FX"
  3   xmlns:app="clr-namespace:AmazonSearch.Views">
  4   <vm:View.Model>
  5     <app:SearchViewModel />
  6   </vm:View.Model>
  7 
  8   <Grid>
  9     <TextBox x:Name="searchTextBox" />
 10     <Button Content="Search" IsEnabled="{Binding CanSearch}">
 11       <vm:ButtonEvents.Click>
 12         <vm:InvokeMethod MethodName="Search">
 13           <vm:ElementParameter ElementName="searchTextBox" ElementProperty="Text" />
 14         </vm:InvokeMethod>
 15       </vm:ButtonEvents.Click>
 16     </Button>
 17 
 18     <ItemsControl ItemsSource="{Binding Products}">
 19       <ItemsControl.ItemTemplate> 
 20         <DataTemplate><app:ProductView /></DataTemplate>
 21       </ItemsControl.ItemTemplate>
 22     </ItemsControl>
 23   </Grid>
 24 </vm:View>
25

The thing to note is in lines 10 to 15. There he invokes a method straight on the ViewModel.

The concept is quite the same as the Caliburn project from Rob and the idea is very powerful!
It enables you to have no code-behind and go straight to the viewmodel. Very nice!

Thinking about this a bit though, does make me wonder if the added Xaml is worth the ability to go straight to the viewmodel. Wouldn't it be just as simple to define a Search method on the codebehind and invoke the correct method in the viewmodel?

My point being: is it worth to incorporate such a framework (albeit very small and succinct). What do you think?

Wednesday, June 18, 2008 10:04:08 AM (Romance Standard Time, UTC+01:00)  #    Comments [0]  |  Trackback
 Friday, June 13, 2008

I’ve been busy sharpening my Silverlight skills and created my very own button, complete with VSM.

The button (‘rjButton’) inherits from contentControl and in the project there is a generic.xaml which defines a default look for the button, including VSM definitions and state transitions.
When loading up my solution in Blend, I can happily get the rjButton in my page. It looks correct. However, when I ‘Edit a copy’ of the template, nothing shows up!! Funnily enough, when I use ‘Create empty’, the correct states do show up.

I was unable to google-fix the problem. I would guess that when you use ‘create empty’, Blend just looks at the attributes on your class and shows the correct states. When you ‘Edit a copy’, Blend looks for the template and can not find any. Somehow it is unaware of the link to the style in generic.xaml, and it creates an empty style.

I’ve double checked the behavior with the TabControl, which is also a control that is defined in an external control, and it works the same.
I'm not sure why controls included in the framework do work correctly. I've taken a look with reflector and I've seen nothing out of the ordinary.

You can work around this by naming the style and explicitly tell the control to use the style. But then again, it might be easier to just copy the style (use David's excellent style browser here).

If you know what is going on, leave a comment!

[update: jasonxz knows: I was informed, today, that Blend does not, yet, support the "edit a copy" functionality of a Template that is not defined in System.Windows.dll. Thnx! ]

Friday, June 13, 2008 5:45:21 PM (Romance Standard Time, UTC+01:00)  #    Comments [0]  |  Trackback

I just spent way too much time figuring out why my VisualStateManager suddenly started giving errors. Without ‘break on all exceptions’ I got a ‘Catastrophic error’. With breaking on all exceptions I could finally see that the layout system was trying to layout the visualstatemanager.

I basically had specified my vsm directly under the controltemplate, instead of defining it inside the grid. Whoops!

Friday, June 13, 2008 3:01:00 PM (Romance Standard Time, UTC+01:00)  #    Comments [0]  |  Trackback