Readify Silverlight Training Course – March 10-12 2010, Sydney

February 28, 2010

Next week I am running the Readify Silverlight training course in Sydney from March 10 to 12.

The three day course takes you right through Silverlight from the basics right up to advanced topics.

Head over to http://readify.net/training-and-events/professional-series/professional-silverlight-workshop/ for more information!

Cheers,

Jordan.


Next SDDN Meeting – Thursday March 4th, Melbourne

February 26, 2010

The next SDDN meeting has been planned for Thursday March 4th in Melbourne. Head over to http://www.sddn.org.au to check out the details!

Cheers,

Jordan.


Melbourne Nerd Dinner Friday 15th Jan 2010

January 13, 2010

Come along to the Nerd Dinner in Melbourne this Friday and catch up with fellow nerds from around the city!

For venue, time and registration head across to http://www.nerddinner.com/1404.

See you there!

Jordan.


I’m a Silverlight MVP!

January 4, 2010

The other day I recieved an amazing New Year’s surprise in my email! I dicovered that I have been awarded Microsoft MVP in Silverlight for the 2010 year!

I am extremely honored to be recognised and included in this amazing group of people and send a massive thanks for all my supporters over the last couple of years – you know who you are!

Once again thanks to everyone and a wonderful 2010 to everyone!

Cheers,

Jordan.

P.S. for more information on MVP and what it is, have a look here.


New AnimationChainer – fluent Storyboard helper for Silverlight

December 24, 2009

A while ago I posted an article on a little animation helper class which makes it quick and easy to build animations dynamically in code. You can see my articles here and here and here.

I use this animation chainer a fair bit in my apps so I thought I’d share the improvements here.

Firstly, the system has been greatly simplified – I’ve cut a lot of superfluous junk out.

It now supports Stop, Pause and Resume :)

It takes a framework element in the constructor of the AnimationChainManager. This is to get around the problem where animations would appear jumpy (and sometimes not at all!).

It supports animation easing.

It supports callbacks using lambdas to make it very easy to calculate your next dynamic animation.

<Sample Code>

New AnimationChainer – fluent Storyboard helper for Silverlight Demo

</Sample Code>

Hope you enjoy!

Merry Christmas,

Jordan.


Upgrading from .NET RIA Services to WCF RIA Services

November 30, 2009

I just had to go through the process of upgrading an app built with the RIA Services CTP code from a few months ago to the new WCF Ria Services beta that was released at PDC.

After the upgrade I was presented with a billion errors – I had one of those “OMG I wish I didn’t just do that” moments… but after some hunting around I found that the changes were not too bad.

Here is my report on what I did to get my project working.

In web project

I had a custom object being exposed via RIA Services, which meant I had to have a [Key] attribute on one of the properties. System.ComponentModel.DataAnnotations has been upgraded, but the reference in your project will have required specific version set. So remove the missing DLL and re-add it. Use the 3.6.0.0 version.

System.Web.DomainServices.Providers has been split in to two files – System.Web.DomainServices.LinqToSql and System.Web.DomainServices.EntityFramework. I’m using LinqToSqlClasses in my project, so I added the Linq version (and removed the old reference).

You’ll also have to update the name spaces in your DomainServices – Change “using System.Web.DomainServices.Linq;” to “using System.Web.DomainServices.Providers;”.

ServiceOperation has changed to Invoke.
Please note that it seems that in the VS2010 version of WCF Ria Services you can return entities from Invoke operations but not in the VS2008 version. Keep this in mind when you are designing your domain services – although you probably should use normal non Invoke style methods to return entities.

Also in your domain services on the server, “this.Context” has been changed to “this.DataContext”.

I had an enum that was exposed by a ServiceOperation (now Invoke) and it wasn’t being properly pushed out the client code. This appears to have been fixed, so I removed the .shared part of the file name to fix (it was doubling up on the client and getting a compiler error).

Silverlight Client

SubmitOperation is now in System.Windows.Ria namespace, not System.Windows.Ria.Data

If you are using RiaContext to get login information etc, then you’ll have to change RiaContextBase to WebContextBase.

IEditableCollection is gone… I use PagedCollectionViews mostly anyway (which use IEditableCollectionView) – IEditableCollection was in the SL3 Beta (but removed for RTW), and seemed to be included *again* in the older RIA Services stuff – but it’s gone again :)

ServiceContract() (which is in the auto generated files on the client) is now in System.ServiceModel.dll (so add it as a reference).

MergeOption has been changed to LoadBehavior with new options – KeepCurrent, MergeIntoCurrent and RefreshCurrent (much nicer!)

That’s all I had to do to get the app compiling, but at runtime I had a few problems with the RIA services requests getting 404. I fixed this by adding a temp domain service to the app – which updated the Web.Config for me…

It Added the following httpModule:

<add name="DomainServiceModule" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

It Added the following module:

<add name="DomainServiceModule" preCondition="managedHandler"
    type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

It also added some WCF stuff right down the bottom of the file:

<system.serviceModel>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
 </system.serviceModel>

Hope this helps you upgrade your projects!


New SDDN Site Live

November 26, 2009

The new Silverlight Designer and Developer Network site is live!

The site has information on upcoming meetings, any follow up code links from the presenters as well as general Silverlight community information.

It will also contain video of the events where possible – once we figure out some hosting (damn you Silverlight Live Streaming biting the bullet!).

The best part about the new site is that it now has RSS!! A long time coming I know – but go add it to your readers :)

Check it out at http://www.sddn.org.au.

Cheers,

Jordan.


.NET RIA Services Validation and Authentication Talk (Code)

November 26, 2009

Last month I did a presentation at SDDN in Melbourne on RIA Services and it’s in built authentication and validation features.

The code is posted here:

<Sample Code>

.NET Ria Services Authentication and Validation Demo Code

</Sample Code>

The talk started off by running through the UserDTO object – under Services/DomainObjects. This object is exposed through the UserRegistrationService under /Services.

Next you’ll want to familiarise with the LoginManager in the Silverlight project (under Model/LoginManager.cs).

I then added some custom validation to the UserDTO object.

Next I created a UserValitator.shared.cs file under Services/DomainObjects and applied a metadata attribute to UserDTO to connect the two. .shared.cs files will be automatically made available to Silverlight by RIA Services.

The login stuff is built using the standard ASP.NET membership SQL provider, and the built in RIA Services abilities around this.

Read through LoginManager.cs see how the forms authentication object is created, and how the system uses the AuthenciationDomainContext, which is created on the sever in Services/DomainObjects. AuthenticationDomainService on the server contains the goods to validate a user and also provides a User class, which you can extend.

There is also a UserRegistration context in LoginManager which allows you to create a new user. See UserRegistrationService.cs on the server (under Services/DomainObjects) to see how this works (by using the MembershipHelper class).

See the Web.config to note how the system is configured to use the SQL connection, and in the membership section note that it is configured to use this same SQL connection.
You’ll need to configure your SQL database as well – to create the ASP.NET membership tables… run aspnet_regsql.exe (in C:\Windows\Microsoft.NET\Framework\v2.0.50727) from an elevated prompt to start the wizard.

This should be enough to get you started.

BTW, there is some great doco on this in the .NET RIA Services PDF file…

Enjoy!


Silverlight Code Camp 30/31 Jan 2010 – Melbourne

November 24, 2009

The first Silverlight Code Camp is being held in Melbourne on the weekend of Jan 30 and 31 2010 in Melbourne!

Split in to two distinct tracks, Beginner and Advanced there will be something for everyone. Each track will contain 10 sessions split over the two days, for a massive total of 20 unique sessions all based on Silverlight!

For more information see http://sddn.org.au/news/silverlight-code-camp-30-31-jan-2010-melbourne/

See you there!


Next Melbourne SDDN Meeting – 29th Oct

October 22, 2009

Hey all!

After a short hiatus we’re back with more meetings. We’ve had a break due to a mixture of Tech.Ed, holidays and – would you belive – jury duty.

We’ve got two great talks lined up – from Phil Beadle on Unit Testing in Silverlight and from myself on .NET RIA Services validation.

How I unit test a Silverlight application – Phil Beadle

This session will cover how to architect a Silverlight application so that it can be thoroughly tested.

Time: ~1 hour.

Phil will cover:

  • The MVVM pattern
  • How to unit test the View Model
  • Using unity as an IoC
  • Using Moq to mock out the Model
  • Using the Silverlight Unit test framework to test the UI
  • Using a Mock domain client to mock out the calls to the database from a RIA service

Philip has extensive experience using these techniques in production projects, so this will be a talk not to be missed.

Philip is a DotNetNuke Trustee and works for Readily as a Principal Consultant specialising in Silverlight, DotNetNuke and ASP.Net. Philip has a large amount of experience building all sorts of online properties ranging from small personal sites to massive traffic sites such as the AFL website. Philip is also known for his passion for testing and is the lead for the new QA Team on DotNetNuke which will implement unit testing and integration testing in the coming months

.NET RIA Services Validation – Jordan Knight

Time: ~30 minutes.

This session will cover some basic .NET RIA Services concepts before delving in to to world of validations.

See how easy it is to create shared custom validation code in your applications (run on client and server).

Jordan is a Senior Consultant at Readify and is a regular on the Silverlight scene in Australia, having presented at a number of conferences including ReMix and Tech.Ed Australia and New Zealand.

Late Addition!

David Burela asked if he could give a quick 10 minute demo on some Bing Maps stuff he has been working on… why of course David!

The new Bing Maps virtual earth control lacks basic databinding, you have to manualy add pushpins and map shapes. This quick demo will demonstrate how you can import a single library to enable databinding to the bing maps control, and then create the datatemplates you need to databind your shapes directly to the map.

David is a Senior Developer at Readify who last year won the Microsoft imagine cup for his work on SOAK.

When: Thursday October 29, 5:30 for 6:00 start

Where: Microsoft Theatre, Level 5, 4 Freshwater Place, Southbank

Pizza will be provided to keep those tummies from rumbling.

Attendance is FREE but please register using the tool on the SDDN Site so we can figure how much PIZZA to get!