The day kicked off with a short introduction from Phil Winstanley about the day and what was being covered and there was a short “pitch” by Paul Stack on Give Camp UK which is a charity event coming up later in the year where developers can pledge time to help create applications for various charities.
With the intro over it was straight into the sessions….
ASP.Net MVC
Scot started the day with a presentation about MVC3 and as per his usual presentation style asked the audience for ideas of the type of app to create as part of the demo to which, in todays case the app was about movies in cinemas.Scott then took us through the creation of an MVC app and along the way showed us new project templates, HTML5 support, Razor view engine and tips for using e.g. helpers, IIS Express and EF code first but to name a few areas he touched on.
For people new to MVC this was a good run through demonstrating the functionality that was available and how it could be used but as I’m currently using this technology for me the real value in the session came through in the questions asked by the attendees, which often went far more in-depth than the presentation content such as “can you do anything in the asp.net view engine that you can’t in Razor?” (the answer by the way is yes a few things such as server controls and some localisation).
Dynamic Web UIs with Knockout.js
After a coffee break Steve Sanderson took to the stage to give us a presentation on Knockout which is concerned with creating rich user interfaces providing.Steve started with a simple example using Knockout and an overview of the MVVM pattern which is what Knockout uses to introduce everybody to what Knockout could do and a high level overview of how it did it including the core of the “product” which is data binding elements on the page to a model you have server side, Steve used MVC in this example but it isn’t limited to .Net and can be used with anything that will provide/consume a JSON feed.
Steve then moved on to progressively enhance the example showing more & more complex functionality, creating a UI that ran client side and interacted with the server only to request data for display or write data to be persisted. The example in this case was a web mail client showing loading the contents of various folders (inbox, spam, sent, etc.) and ability to view mails.
I must admit to liking Knockout and believe that it can help in the creation of rich UI’s but some developers I talked to were less certain about it citing reservations around accessibility and testability. As I said to them give it a try before dismissing it, you may find you like it.
C# 5 and Async Web Applications
This session was the first after the lunch break so Steve decided to “wake us up” with a truly terrible joke, which was so memorable I can’t even remember it!The session itself focused on the next version of ASP.Net and asynchronous processing that will be supported.
Steve started out explaining in what I think is a really good metaphor the way normal code runs with the “post office model” – queue for a resource vs. “restaurant model” – service provide when asked for.
He then started by showing how asynchronous code works in MVC3 and the amount of code you have to write and some of the possible issues you could run into, race conditions, etc. Steve then moved on to showing a new base controller type called TaskAsyncController which then provides additional functionality to allow the code in the controller to be run async just be calling a couple of different methods e.g. instead of DownloadString you use DownloadStringTaskAsync.
Steve then moved on to showing us how to use the new functionality with the Async and Await keywords and how you can easily create your own async code by leveraging the TaskCompletionSource functionality.
All through the session Steve made use of Apache Bench, which is a command line tool for measuring the performance of web servers, showing the performance for 1 user in 1 session, 10 users in 10 sessions & 50 users in 50 sessions and it was very noticeable of the effect of the async code enhancements. He also used the nuget package SignalR which appears to hold the majority of functionality that is required in MVC to work async.
Steve then talked about how you can create real time, or near real time, applications (also know as COMET) and the different approaches you can take with the general agreement that sockets is the best approach but that as the spec was still changing probably not the best try and implement it yet.
Steve ended the session by demonstrating the ease of creating a chat application that would handle multiple clients with the processing being dealt with asynchronously.
For me the only downside is that this functionality is unlikely to actually be available until the next version of MVC and C# 5 is released and there isn’t any dates on that yet, although you could use SignalR and the CTP now if you really wanted to.
Cloud Computing with Windows Azure
We had one last coffee break before the last session of the day and Scott took the reins again to take us through cloud computing, he confirmed that he is now taking responsibility for Azure but was still looking after Asp.Net as well so not just simply disappearing from Asp.Net. He did say that this was the first event he was specifically talking about Azure since he had been given responsibility for Azure.Scott then went on to discuss how code has evolved and cloud just being the next step in this evolution, then he talked about the Azure platform itself showing where the existing data centres are in the world, the hardware that's used in the data center, what data centre’s look like. I think a lot of people were interested to see the C-Block (basically a cargo container full of servers) that are the cornerstone of the modern data centre's.
Scott then moved on to showing how to create “hello world” in Azure showing how easy it was to create an application that will run on azure. Due to network connectivity he was unable to show deployment of the app but did show one “that he created earlier”.
Scott then talked about how the Azure platform provided hardware redundancy which basically meant if you are running multiple instances you get hardware fault tolerance for free (if you only run one instance they are unable to do this). Coupled with this is the Service Bus concept that allows for the delivery of messages between various parts of a loosely coupled application, to demonstrate this Scott got everybody in the room with internet access to send him a message on Azure via a web site he had hosted on azure which placed the messages on the service bus and he then displayed a command line app connecting to the service bus and reading the messages that were being sent.
After showing the service bus Scott moved on to explaining the various different storage options that are available to you starting with blob storage and how you can store files that can be be available either public or privately; Sql Azure was next explaining how you can use all the power of normal Sql Server in azure. The final storage option is Table Service which is a NoSql implementation running in Azure.
Federated security, utilising WIF, demonstrated how you could use Azure Access Control with Facebook, Google, LiveId, your own domain, etc. to verify a users identity as an alternative to you having to create your own user management, which ultimately provides users with a better experience. Scott really did make it seem very easy to set this up utilising Facebook as the identity provider.
Scott also touched on AppFabric, Caching, CDN and provided a small case study of how EasyJet are currently using Azure to implement the functionality that they require to run the airline on a daily basis.
After some questions Scott thanked us all for coming and the day was over.
Summary
I found it a very long but enjoyable day and must offer many thanks to Phil Winstanley, Dave Sussman and the rest of the DDD team for organising the event as well as to Scott Gu and Steve Sanderson for taking the time to present their sessions to us.I hope that all the attendees got as much out of it as I did.
I can't believe nobody cornered the Gu with a few unconfortable questions about Win8.
ReplyDeleteSteve's bad joke was about snail racing and seeing if removing the shell made them go faster - no it just made them slugish (boom boom!)
ReplyDeleteWouldn't have said the knockout example was progressive enhancement in the true sense as it wouldn't have worked at all without js.
My biggest criticism of the KnockOut demo is that it's not progressive enhancement/graceful degradation. I think too many demos are done with the quick client side only code and it encourages other people to do the same for live websites open to the general public.
ReplyDelete