Latest Tweet:
  • Loading...

Adobe Kuler is a great example of a Rich Internet Application that provide great value directly in the browser. Kuler is a tool that helps you create color themes by applying different rules to find matching colors. You start by selecting a base color, and Kuler will help you find four matching colors. You can even use Flickr photos as a basis for your color theme. Adobe Kuler has a social aspect to it as well. You can create an account and save your colors online and share them with the community. People can rate and commend on your themes, or create new color themes based on an excising one. Kuler is being a good Web 2.0 citizen and offers a REST-full API that lets you build your own applications using the colors of the community.

Screenshot of Adobe Kuler

Whenever I find a service I like with an open API I just can’t leave it alone. So today I’m announcing the Colorful Expression add-In.

Colorful Expression is an add-in for Expression Blend and Expression Design that brings you the Adobe Kuler community directly into your toolbox. It adds a new palette to your design environment, making it easy to leverage the community to find the perfect color theme for your application or design. The add-in also available as a standalone application, making it useful for web developers working in Visual Studio or Expression Web to select colors for your CSS style sheets.

Expression Design

Last week Jose Fajardo blogged and complained that Expression Design doesn’t get enough love. I totally agree, and am going to give it some love by making it more colorful.

Expression Design AddIn 

The key feature of the add-in is to select colors. The eyedropper tool in Design lets you click anywhere on the screen to select a color. Simply click the eyedropper in your color panel, and click on one of the colors in the Colorful Expression panel.

You can also copy colors to the clipboard by clicking the copy-button. When you paste the color theme onto the design surface you’ll get five rectangles and the name of the color. This lets you collect interesting themes directly in your design file by copying them onto the document.

Expression Blend supports exporting and importing color swatch libraries through a simple XML file format. Colorful Expression allows you to save a theme as a swatch library you can import into Design. The screenshot shows the “Buddah in Rain” theme imported to the swatch library.

Expression Design AddIn Screenshot

Expression Blend

The add-in works almost the same way in Blend as in Design but with some minor differences. In Blend you can use the Ctrl+C key combination to invoke the copy command, making it a lot easier to copy/paste themes onto the design surface. When you paste a theme onto the surface you will get a grid containing five rectangles and a text block. The rectangles are painted with a solid color brush resource, and each of the colors gets added to the resource collection of the page. If you go into XAML-view and paste the theme you will get five solid color brush resource elements you can add to any resource collection. The Blend add-in also supports drag and drop, letting you drag color themes onto the design surface.

Blend add-in screenshot

Standalone application

The standalone application gives you most of the same features as the Blend and Design add-in. You can copy or drag themes into Blend, and you can save Design swatch libraries. The stand alone application is useful if you don’t want to run the add-in all the time or if you don’t use Expression Studio. You can also hold down control and click a single color to copy it to the clipboard as a RGB HEX color. That way you can use the standalone application as a color picker for any application using HEX colors, such as CSS style sheets.

Standalone application screenshot

Ideas for next version

I want to keep the add-in simple and focused, but I do have some ideas for new features. The first thing I’m planning to implement is a color provider for the COLORLovers site. I also want deeper integration with Blend and Design, especially around managing resources in Blend.

It would also be nice to support Expression Web and Visual Studio 2008 so that web developers can use it to get CSS colors for their web projects.

Another feature missing is support for the light Expression Studio color theme. The current look and feel is based on Hadi Eskandari’s Expression Clone theme and only supports the dark theme. It should be fairly simple to create a new theme matching the light colors.

You can suggest new features in the discussion board or report bugs in the issue tracker.

Download and installation

The project is released on http://www.codeplex.com/colorful, and the initial release contains the compiled version of the add-in for Design 2.0, Blend 2.0, Blend 2.5 June CTP, Blend 2.0 SP1 Preview and as a standalone WPF application. To install the add-in simply copy the files into your Blend or Design director, and launch the EXE file with an extra parameter.

I.e: “Blend.exe –addin:Colorful.Blend.AddIn.dll” or “Design.exe –addin:Colorful.Design.AddIn.dll”.

You can also right click your application shortcut and select properties to change the target of the shortcut. Add the above parameters to the target to launch Blend or Design with the add-in every time you click the shortcut.

ShortcutProperties

Getting involved

If you would like to get involved in the project drop me an e-mail at jonas@follesoe.no. You can also suggest features or report bugs in the discussion forum and the issue tracker.

To build the project you need to have Expression Blend or/and Expression Design installed. The add-in has a dependency on Microsoft.Expression.Framework.dll, which in turn has a dependency on Microsoft.Expression.Diagnostics.dll, Microsoft.Expression.Interop.dll and Microsoft.Expression.Licensing.dll. For licensing reasons these assemblies are not checked into the source control three.

If you want to run the add-in from Visual Studio I recommend running Visual Studio 2008 as administrator and then change the output directory of your debug build to the installation folder of Blend/Design. Then change the startup application to the Blend.exe/Design.exe with the correct startup arguments. That way you can hit F5 inside Visual Studio to launch Blend/Design in debug mode. You can set breakpoints in your code and test/debug the add-in this way.

Happy coloring!

The most current developer build of the Google Chrome browser has fixes for some of the initial Silverlight problems reported when the beta was made available. The beta did load the Silverlight plug-in, but people experienced several bugs. On the sites I tried Chrome would render the application, but any interaction from keyboard or mouse wouldn’t get passed to the application. This is now fixed and Chrome now runs all the Silverlight 2 applications I’ve tried without any problem. I’ve tested it with the sample applications I’ve built (YouCard and DiveLog); as well as with some of the larger reference applications such as Hard Rock Memorabilia and the Microsoft Health CUI demo application. All of them work just fine. Even things like the browser navigation integration in the Dive Log application works as expected.

One of the cool things Google have done with Chrome is to make it really easy to run early developer builds. This 7-step tutorial explains how to enable what Google calls the Developer Channel. What this does is that Chrome will now check a different repository for updates and new releases than people using the Beta Channel (default). After running a tool that enables the Developer Channel you get fresh builds through the automatic update system (the about dialog).

This is great news for the Silverlight community as this clearly indicates that Chrome will have full Silverlight support when it comes out of beta. I've included some screenshots of Silverlight applications running in Chrome. If you want to stay on top of current builds of Google Chrome I also recommend following the Twitter user @GetGoogleChrome.

Update

YouCard running in Google Chrome YouCardSiteSpesificBrowser Dive Log running in Google Chrome Microsoft Health CUI running in Google Chrome Hard Rock Memorobilia running in Google Chrome

After some initial struggles with Authentication Services and cookies in WCF it turned out porting the Dive Log Silverlight application to WPF was fairly straight forward. Once I had figured out how to authenticate from WPF it didn’t take more than a few hours to bring the entire application over from Silverlight. I’ll list some of the gotchas I ran into while porting the code

Authentication
The Silverlight version is protected using Forms Authentication and an ASP.NET membership provider. The WPF version uses WCF authentication services, and needs to manage the authentication cookie manually. Details about this are covered in post I did this weekend. After figuring out how handle authentication implementing the login screen was straight forward. It uses the same Model-View-ViewModel design as the rest of the application.

DiveLogLogin

Presentation Models (ViewModel)
The Dive Log uses Presentation Model pattern (aka Model-View-ViewModel in WPF/Silverlight circles), so the majority of the application code is non-visual. I was able to port that code straight over to WPF with some minor adjustment. The WPF version has an extra dependency to a cookie manager (that’s how the Dive Log service gets the authentication cookie from the login service). I also had to change the event handlers for the commands.

Commands
In WPF commands are built into the framework so I could throw away some of the code from the Silverlight version. The command implementation used in the Silverlight application is very similar to the WPF commands, so porting the code wasn’t a big challenge.

Value Converters
Value Converters is the Swiss army knife of WPF and Silverlight programming. It lets you convert pieces of data during data binding. The Dive Log application has 8 value converters and I was able to port all of them straight to WPF with no code change.

IoC and Dependency Injection
The application uses Ninject for dependency injection. Ninject supports both Silverlight and WPF so I could reuse all that code. I had to make some changes in the configuration class. In Silverlight I use the HtmlPage.IsEnabled property to check if the code is consumed by Blend. In WPF you got a IsInDesignModeProperty dependency property you can use to check if the code is consumed by Blend or Cider.

The “basic” user interface version
The Dive Log application comes with two user interfaces, one done by a developer, one done with the help of a designer. The simple UI version ported nicely over to WPF, with a few minor changes. The first thing I had to change is that WPF supports Windows, while the top level element in Silverlight is a user control. Silverlight also got a couple of controls currently not available in WPF. One of these is the date time picker. In the WPF version I used a simple textbox instead. Other than that the UI pretty much just worked out of the box. It looked a little different since some of the default styles for some of the controls are a little different.

 Dive Log Silverlight vs WPF

The “full” user interface version
The richer version of the user interface contains several template controls and I didn’t expect to be able to reuse a lot of the XAML. But since the styles and templates are defined as resources I was still able to copy-paste the skeleton of the UI with only a couple minor changes. The screen shot below shows the WPF version after a rough copy-paste. The problem with porting the UI is that Silverlight uses the Visual State Manager for styling and templates, while WPF uses triggers. So for this part of the application I had to do a lot of hand coding of the XAML, moving each template over piece by piece. I was still able to reuse a lot of the individual pieces, such as the XAML graphics used for the weather check boxes, the customized slider control, and some of the other graphical elements.

Dive Log app after initial XAML port.

Conclusion
The Dive Log application is a fairly trivial application, yet complex enough to give a decent indication of what it would take to port an application from Silverlight to WPF. I was pleasantly surprised with how easy it was to port the application to WPF. However you will have to do some manual work, especially around styled controls. Patterns like the Model-View-ViewModel pattern make it easy to reuse your ViewModel classes between WPF and Silverlight, and code-only elements such as value converters ports straight over to WPF. But I think the biggest thing you gain from working with both Silverlight and WPF is reuse of skills. With little WPF knowledge I was able to build a fairly rich application using what I know from working with Blend 2.5 and Silverlight, which is huge! I've uploaded the current source code, as well as a compiled version of the WPF application if you want to try it. They're available as embedded downloads from Windows Live Sky Drive (might not be visible in your RSS reader).

Dive Log WPF version

Downloads

This blog post was supposed to be about porting the Dive Log Silverlight application to WPF and how easy that transition was. Well, turned out I got stuck with WCF problems long before I could even start touching the XAML. Before diving into the problem, lets step back and refresh how authentication and data access is handled in the Dive Log Silverlight application.

The database schema for the application is really straight forward; it consists of a user table and a dives table. On top of the user table I’ve implemented a simple ASP.NET Membership Provider and configured it in web.config. I’ve also added authorization rules to my configuration file limiting access to the web service and the web page hosting the Silverlight content. The web service used by the Silverlight application is created using the “Silverlight-enabled WCF service” template. That the template does is to create a WCF service that is configured to use the basicHttpBinding and with ASP.NET compatibility turned on. WCF is built to be agnostic to the hosting environment, but by turning on ASP.NET compatibility you get access to the HttpContext object, and other web related stuff like cookies and headers. Since the service is protected using the membership provider I can access the currently authenticated user by accessing the the HttpContext.Current.User.Identity.Name property.

So how does Silverlight deal with authentication? Well, the cool thing is that it normally doesn’t! The Silverlight control is hosted on a web page that is protected by the membership provider. That means that you have to logon before you can run the application. When you logon the ASP.NET Forms Authentication mechanism will write an authentication cookie in the browser. When Silverlight loads and starts making requests back to the server any request goes through the browsers networking stack. The browser will add any cookies or authentication headers set in the browser before sending the request. In our case the request back to the WCF service will contain our authentication cookie, and we can access the current authenticated user. All good!

SilverlightAuthentication

When I started porting the application to WPF I wanted to reuse the same WCF service used by Silverlight. But since I’m not going to logon using my browser I know that I had to provide some authentication mechanism for my WPF application. I assumed this should be fairly trivial, since one of the new features of .NET 3.5 and Visual Studio 2008 is the Client Application Services. This is a set of services enabling you to reuse your ASP.NET membership- role- and profile providers from client applications such as AJAX or Windows Forms/WPF applications. You get a full client side API to authenticate users, check their roles, or store settings online. This is handy, but I don’t quite get the point of the Membership functionality. There is no obvious way to authenticate the user using the Client Application Services and then use the same identity on other services on the same domain. All the tutorials online are limited to show how the user can change some setting and persist this using the profile services. I tried messing around with the System.Web.Security.Membership class, but couldn’t find a way to grab the authentication cookie and add it to my other service clients.

While researching what I can do with the Client Application Services I came across the WCF Authentication Service. This is part of the Client App Services, and is basically a service sitting on top of your membership provider. The service is implemented by the class System.Web.ApplicationServices.AuthenticationService, and to enable an authentication service all you have to do is configure a WCF end-point. I’m not going into all the details, but enabling the service isn’t too hard. It contains methods like login and logout, and will use whatever membership provider you have configured for your web application. It works similar to the Client App Services, and when you login it will write an authentication cookie, taking us back to the original problem of getting that cookie added to our other service clients. Thankfully it is possible to access the request and response cookies from WCF, even if it’s not really obvious how to do it. Or it could just be me not having done much WCF work… The following code calls the authentication service and logs in and grabs the authentication cookie. Next step is to add the authentication header to the other service client before calling the Dive Log service. The code smells like a little like dog-poo, but that’s what it takes to make it work.

SmellyWCFCode

I don’t know if this is the only way to use the authentication service and grab the authentication cookie. Some more experienced WCF developers recommended that I should add a new service endpoint with a wsHttpBinding (the ws-deathstar binding). You can configure your wsHttpBinding to use a membership provider for authentication, but it kind of sucks that you can’t just port a Silverlight app to the desktop without having to change your server code. While messing around with the cookie handling I remembered that this stuff used to be a lot easier before we got WCF. You can use the old web service stack from .NET 2.0 and you can even add a new web reference (not service reference) in Visual Studio 2008. However you need to dig a little before you find the dialog. You find under the advanced button in the service reference dialog, and then by clicking the add web reference button.

AddWebReference

After adding a web reference you get two folders, one for service references and one for web references. So using the old .NET 2.0 Web Services the code to authenticate and use the same cookie for the Dive Log service is a lot more compact.

WebReferenceCookieCode

I’m sure some WCF experts have a better solution for this, and I would love to hear suggestions in the comments. However I do think this is a quite common scenario if you have a set of services built using the Silverlight WCF template that you want to use in a WPF version of your application. In other cases you might not be the one controlling the server side, and I think WCF should support those scenarios. WCF have made a lot of advances, adding support for REST style services and support for username/password authentication etc. However, in cases like this where you depend on cookies for authentication it really isn’t obvious how to do that using WCF.

One of the common problems in Rich Internet Applications is browser navigation. Users are used to clicking links, moving between pages and being able to get back to where they came from by clicking the browsers back button. In Rich Internet Applications this is often not the case. You spend all your time on one page, and user interaction normally don’t navigate away from the page but invoke small web service calls back to the server. If the user clicks the back button they might end up on the login page or the page they visited before, which is not what the user expected.

There are different techniques to control the back and forward navigation in AJAX applications, but because of differences between browsers getting consistent behavior can get quite hard. Thankfully support for navigation history was added to ASP.NET AJAX in .NET 3.5 SP1, giving us a browser agnostic way of dealing with navigation history. At Tech Ed Sydney Jordan Knight gave a chalk talk showing how to use the ASP.NET AJAX client scripts from Silverlight to add browser navigation support to a Silverlight application. Jordan has now made his presentation available on his blog both as a blog post and as a screen cast.

In Jordan’s approach he uses a separate JavaScript class that encapsulates the ASP.NET AJAX functionality, and acts as a proxy object between Silverlight and the ASP.NET AJAX client library. This works really nicely, and let you reuse the same JavaScript class for non-Silverlight purposes as well. The drawback is that the code is not self-contained inside the Silverlight application, and you have to include an external JavaScript file on the page. Another problem is that his example currently only supports a single key-value pair for the history state. The AJAX framework supports any JavaScript object literal to store navigation state, something that can be useful if you need to keep track of more than one value. For example you might want to keep track of both customer id, and which view you have opened for that specific customer. In that case you would have to keep track of multiple history state values. The ASP.NET AJAX library will encode the state object into the URL of the page whenever the user adds a new history point. This means that you have some limitations to the size of the state object, as well as the complexity of the state object. You can’t have deep object structures or complex types to represent history.

I decided to see if I could find a way to add browser navigation to my Dive Log sample application without introducing more JavaScript than absolutely necessary. I also want a generic implementation that can be reused in any Silverlight application with little effort. The behavior I want to achieve is to add a history point every time the user selects a dive. When the user clicks back and forward in the browser, the application should select the previous selected dive. I also want the browser navigation code to fit nicely with the Model-View-ViewModel architecture of the application.

The first thing I did was to define the interface I want to use for the history manager. Programming against interfaces is good practice, and helps you decouple your components. The interface is straight forward, and mimics the history management functionality of the ASP.NET AJAX client library.

IHistoryManager (code available as download)

The interface has a method to add a new history point, and an event that executes when the user navigates back or forward. The interface uses a generic type for the state object.

To manage history I’ve implemented the interface on a history manager class. This class is also generic, giving the consumer of the class freedom to choose any object to represent navigation state.

HistoryManager class definition (code available as download)

The constructor adds an event handler to the ASP.NET AJAX navigate event. We want the HistoryManager class to handle the event, so the HandleNavigate method marked as a scriptable member. This means that JavaScript can access that member when the HistoryObject is passed to the browser. The code to add the event listener is based on a blog post from Rai Kaimal who uses a similar technique.

HistoryManager Constructor (code available as download)

The first thing the constructor does is to registering the HistoryManager class as a scriptable object. That means that you can start coding against the CLR object from JavaScript. The next piece of code is a string holding a chunk of JavaScript. The JavaScript does two things. First it creates a Function object, which is a concept of ASP.NET AJAX that gives you delegate-like functionality. The function points to the HandleNavigate method on the HistoryManager object we exposed to the browser. The second thing it does is to add this function as the handler for navigate event exposed by the Sys.Application object. The event was added in .NET 3.5 SP1. The final step in the constructor is to tell the browser to evaluate the JavaScript. Once the script is evaluated the HandleNavigation method will fire on the CLR HistoryManager class whenever navigation occurs.

The HandleNavigate method accepts one ScriptObject parameter which will contain the navigation state. ScriptObject is the type used for any object passed between Silverlight and JavaScript. The cool thing about the ScriptObject is that you can convert it back to a real CLR type if you know the shape of the object. In our case we convert it back to the generic type. Next step is to create the generic event argument and trigger the Navigate event.

HistoryManager HandleNavigate method (code available as download)

The next piece of code in the HistoryManager class is the AddHistoryPoint method. This method gets called whenever the Silverlight application wants to record a new point in the browser navigation history.

 HistoryManager AddHistoryPoint (code available as download)

We use the same technique to build a string of JavaScript and tell the browser to evaluate it. The JavaScript string contains a JSON representation of the state object. The ToJson method is an extension method that gives easy access to JSON serialization of any object. Preferably I would like to pass the state object directly to the JavaScript function, but because of problems with the type-system introduced in ASP.NET AJAX the parameter validation fails when I pass in a CLR type directly.

Now that the HistoryManager class is ready we can start using it in the Dive Log application. At first thought it might be a good idea to add the HistoryManager as a property on the Application object, but this would cause problems with testing. The Application object will be different when executing in a unit testing context than when executing as a standalone application. Instead I decided to make the IManageHistory interface a new dependency on the PageViewModel. This was done by simply adding a new parameter to the constructor. I also specify which type I want to use to represent the navigation state.

PageViewModel constructor (code available as download)

The Dive Log application uses Ninject for dependency injection, so next step is to register the HistoryManager in the Ninject container. This is done by adding a new line to the Ninject module configuration class.

Ninject binding (code available as download)

One interesting point about the configuration is the binding behavior. We specify that we want to use a singleton behavior for our HistoryManager. Ninject will make sure that there will be only one instance of the HistoryManager object that will be shared between any classes that has the IManageHistory interface as a dependency. For more information about binding behaviors in Ninject check out the Ninject Dojo.

Now that we have set up the binding and the Viewmodel has a reference to the HistoryManager we can start tracking navigation. In the Dive Log application we want to add a history point whenever the selected dive changes. When the navigate event fires we want to get the ID of the dive from the state object and select that dive. To make navigation work for new dives that hasn’t been assigned an ID yet we use the hash-code to identify the object. The history tracking code is added to the setter of the SelectedDive property in the ViewModel.

PageViewModel Add History Point (code available in download)

In the navigate event handler we use a simple LINQ query to check if we can find the dive and if so select it.

PageViewMode lHandleNavigate event (code available in download)

When we run the application and select dives we can see how the back and forward buttons light up. If click the pulldown menu we can see each point, and when we click the buttons we navigate between dives.

Showing history points in IE and FireFox

Summary
Deep integration with the browser is important to give an optimal user experience. There are multiple approaches to do this, but the APS.NET AJAX client library in .NET 3.5 SP1 makes it really easy. By using generic classes and interfaces we get a history manager class that is strongly typed, making it really easy to pass your own state objects between your C# Silverlight code and the ASP.NET AJAX client library.

I have deployed a new version of the Dive Log application you can play with online. You can also download the updated source code that now contains the history management classes. The code should be easy to refactor and use in your own project. Everything is self contained, making it easier to maintain and deploy your Silverlight application. The only requirement is that you have .NET 3.5 SP1 installed and a ScriptManager with history tracking turned on.

I’m back in Melbourne after 9 days on the road for Tech Ed New Zealand and Tech Ed Sydney. I had a great time, meet lots of interesting people and had many great conversations. I’ve already blogged about my Silverlight session, and all the content is now available online. Thanks to everyone who came to the session, and for the good evaluations.

Microsoft New Zealand have also published a lot of content on their Tech Ed Live site, and you can now watch my full Silverlight session online. So if you missed the session, or want the full story behind the Dive Log sample I recommend checking out the video.

In addition to my Silverlight session I also sat on a “the next 18 months - the future of the web” panel. Suzanne Tindal from ZDNet picked up some of the discussion around JavaScript and has written an article questioning if Chrome’s JavaScript poses a challenge to Silverlight. On the panel we started talking about how JavaScript is getting faster and faster, and how Chrome is upping the performance bar with its JIT compilation and JavaScript Virtual Machine. I got quoted several places in the article, which is really cool. As most of you guys who read my blog know I’m deeply into Silverlight and I have no doubt that it’s going to be an important technology in the years to come. That being said I do think that JavaScript will turn out to be a bigger competitor to Silverlight than Flash for developers deciding which technology to use for their rich Internet applications.

The ZDNet article is well written and should be an interesting read if you want to learn more about mine, Scott Hanselman and Harry Piersons perspectives on the future of JavaScript, web applications and Silverlight. The ZDNet  article also got cross posted on CNet. Paul Glazowski followed up with a new article about Silverlight battling Flash AND JavaScript over at at BuzzYa and Mashable.

With Tech Ed ANZ now being history the next big event is the Microsoft PDC conference in LA in October. I’m going and hope to see many of you guys there!

Me and Adam Cogan Jordan Knight giving a chalk talk
Playing with Surface Sydney Aquarium
Future of the web panel Auckland View 
Bondi Beach
Speaker pass Speaking

Earlier today I gave my “Silverlight 2 for Developers” talk at TechEd New Zealand. I know the title is a little bit vague, but the session was generally trying to give developers who want to build “real applications” a good starting point. It’s a level 300 talk (advanced), so it skips the basic introduction. That being said you don’t need to be a Silverlight expert to find the session useful. The talk covered things like CRUD applications using WCF, how to implement a Presentation Model/ViewModel, how to use IoC and DI in Silverlight, and how to do unit testing in Silverlight.

 Presenting at TechEd

The theme of the talk was diving, and for the demos I worked on a dive log application. The application is fairly complete, and I’ve made it available online for anyone to play with. The code should also be a good sample application for anyone who wants to get into building data centric Silverlight applications. I’m planning on building on the dive log sample in future blog posts, and already have several ideas in the pipeline.

You can run the application by clicking the screenshot. You will be asked to login, and any username and password will be valid. If the user doesn’t exist it will be created when you login. You can even run the unit tests directly from your browser if you want.

Dive Log Screenshot

Slides

I've uploaded the slides to Slide Share, or you can download the full presentation from my Sky Drive.

Links and resources

Unit Testing in Silverlight

Presentation Model / View Model

Dependency Injection

CodeCamp2008AKL Yesterday I gave a Silverlight presentation and CodeCamp Auckland. The presentation was focusing on how to apply dependency injection in Silverlight using Ninject, unit testing and the presentation model pattern. Towards the end I threw in a little HTML-bridge fun, and demonstrated the webcam in Silverlight implementation I did some time back. Rob Fonesca-Ensor had done a great job of introducing TDD, IoC and DI on an earlier presentation, so I could focus on how to apply the techniques in a Silverlight context. Ivan Towlson did a presentation on “thinking in WPF” and did a good job of explaining why you need to take a different approach to building WPF application than what you’re used to from traditional Windows Forms. I tried to tie my YouCard demo back to some of the ideas introduced by Ivan, and hope these three sessions together gave people who want to start building Silverlight and WPF applications a good starting point.

Owen Evans and Scott Hanselman had the ASP.NET part of the CodeCamp covered. Owen talked about ASP.NET MVC while Scott did a session on ASP.NET Dynamic Data. There more I see of Dynamic Data, the more intrigued I am by it. I think people easily dismiss Dynamic Data as just scaffolding and code generation. Scott made a point of this, and really went through the details of how a Dynamic Data application is built up. No magic or code generation, all meta-programming.

All in all this was an excellent CodeCamp, the second one I’ve attended. I presented at the Australian CodeCamp back in April. Kirk Jackson and gang did a great job of organizing the CodeCamp. I think we need to get a CodeCamp started back in Norway as well.

I’ve put together some references and links if you want to dive deeper in some of the topics I covered in my talk, as well as download links to the demo applications.

Unit Testing in Silverlight

Presentation Model / View Model

Dependency Injection and Ninject

HTML Bridge

Demos
You can download both the Web Cam and YouCard demo applications from my Windows Live Sky Drive. I've also uploaded the demos so that you can play the Sliding Puzzle Game or check out your friends using YouCard. You can even run the unit tests directly from your browser! Hope you found my presentation useful. Feel free to post any questions, comments or feedback.


<September 2010>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789