Monday, October 27, 2008
I'm sitting here in the PDC 08 Keynote. Ray Ozzie has just announced Windows Azure - a new Windows platform "in the cloud". In other words a set of services hosted in Microsoft's datacenters that you can deploy your apps into. As a platform it has a whole systems management side to it.

The service model uses services, endpoints - contracts ... seems familiar. You deploy the code and a model describing the app so the systems management can support your app.

Storage system is highly available with storage for blobs, tables and queues. Supports dynamic load balancing and caching

Azure development is done in Visual Studio and supports both managed and unmanaged code. New "cloud" project templates give you a pair of projects - one is a standard familiar .NET project and the other is the one is configuation that describes the app.

The Azure portal lets you change the configuration dynamically to scale up as required. Currently you have to edit the XML but they will be providing a UI for the configuration.

This all looks pretty exciting - looking forward to getting hold of the bits tomorrow

Monday, October 27, 2008 3:24:25 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]Trackback
 Tuesday, September 16, 2008

I'm going to be doing a couple of sessions at the Oredev conference in Sweden in November

Writing REST based Systems with .NET

For many, building large scale service based systems equate to using SOAP. There is, however, another way to architect service based systems by embracing the model the web uses - REpresentational State Transfer, or REST. .NET 3.5 introduced a way of building the service side with WCF - however you can also use ASP.NET's infrastructure as well. In this session we talk about what REST is, two approaches to creating REST based services and how you can consume these services very simply with LINQ to XML.

Writing Service Oriented Systems with WCF and Workflow

Since its launch WCF has been Microsoft's premier infrastructure to writing SOA based systems. However one of the main benefits of Service Orientation is combining the functionality of services to create higher order functionality which itself is exposed as a service - namely service composition. Workflow is a very descriptive way of showing how services are combined and in .NET 3.5 Microsoft introduced an integration layer between WCF and Workflow to simplify the job of service composition. In this session we examine this infrastructure and bring out both its string and weak points with an eye to what is coming down the line in Project Oslo - Microsoft's next generation of its SOA platform.

Hope to see you there

 |  |  |  |  |  |  | 
Tuesday, September 16, 2008 11:45:26 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]Trackback
 Monday, July 07, 2008

Shawn Wildermuth called me out to put my two-penneth together in this ongoing Meme. So ...

How old were you when you first started programming?

16. At school I’d just finished the compulsory part of my education and was moving on to do A levels. Me and a couple of friends found out there was this machine: a Research Machines 380Z in the building - so intrigued, we went to find it. Eventually we found the “computer room” housing the legendary RM 380Z and this other thing that looked like a lathe and apparently was used to consume punched cards. But the punch card lathe was not remotely interesting to us – the 380Z had a screen and keyboard.

How did you get started in programming?

There were other people in the room so we took it in turns to use this strange environment on there called BASIC:

10 PRINT Richard

20 GOTO 10

...

WOW!

That was so awesomely cool I started learning about all these other things – apparently GOTO wasn’t the only way I could make the program “move around”: GOSUB worked too – and I could get it to come back to where I’d called it when it was finished too! At one point one of the guys (yes we were all male) started talking about this thing called erase which apparently you could use to hold data but that was just some weird voodoo magic in my opinion.

So I managed to persuade my parents to push the boat out and buy me my very own computer – a Sinclair ZX81. At Christmas I eagerly unwrapped it and plugged it into the TV. I wrote my first program on it:

10 PRINT Richard

20 GOTO 10

Look everyone – how cool is that! No one in the family apart from me seemed to think this was very interesting. Unfortunately I soon realized that 1Kb was not a lot of room to write anything very interesting and we couldn’t afford the 16 Kb RAM Pack – or the duct tape to stop it falling off the back of the machine. So I returned to my first love – the 380Z. By this time I’d managed to work out that BASIC was just something you loaded on like my programs and more importantly you could alter it. Ahh the fun I had swapping the RUN and NEW commands. Unfortunately my teacher failed to see the funny side when he spent an entire day typing in an economics simulation from a listing in a magazine and then tried to run it.

What was your first language?

Well as you can see BASIC was my first language. I tried to learn C using a Lattice C compiler on my Atari ST but I found Kernigan and Ritchie apparently less accessible than all my cool computer friends. Eventually at college I learned Fortran and then Pascal. And that was my programming life until I started my first real job in 1989.

What was the first real program you wrote?

I started working for a bank in Sheffield. I sat there with a senior programmer (wow what a job that was to aspire to) while he showed me the line number and wrote down the code that I had to enter in an Algol (yes Algol) program. I had to change a limit from £4000 to £5000. I nervously started up a text editor and made the change. Before I committed the change the senior programmer looked over at the code and gave it his approval. I worked on the interactive branch office system as a programmer and systems tester, learning COBOL along the way, for about a year. I finally realised that with many years ahead of me in this industry I should probably try to get myself into the bleeding edge and so found myself programming C on OS/2 (yes OS/2).

What languages have you used since you started programming?

So I started with BASIC, then Fortran and Pascal. From there I learned 3 flavours of Algol and COBOL along with some Paradox along the way. I then started using C on OS/2 and then switched to C++ on Windows. I spent a long time in C++ and Windows – also using VB3, 4, 5 and 6. I learned TSQL so I guess that counts too. At one point I learned a strange little language called JADE and also VBScript and Javascript. I dabbled a little with Java but finally found my spiritual home with C#. I can write VB.NET if I really have to and have played with Ruby (emphasis on played) – oh and I mustn’t forget LOLCode.NET.

What was your first professional programming gig?

I think I answered this one above

If you knew then what you know now, would you have started programming?

Absolutely – but I’d have skipped a couple of the jobs along the way

If there is one thing you learned along the way that you would tell new developers, what would it be?

When you tell a project manager how long something is going to take they really do not believe the figures you give them. Their job is not to plan the actual project, it’s to plan the project they think their manager will approve.

Oh actually here’s a second one: UML is a tool not a way of life

Oh and a 3rd: a team of 8 very good programmers will outperform any team of 20 programmers no matter how good some of them are.

What’s the most fun you’ve ever had … programming?

Ahh this one is really difficult. I worked with some great people on the National Police systems buried in hardcore ATL. Moving from a project of 100 people to a team of 3 for my next contract was mindblowing in terms of how simple life could be if you wanted to get something done. But the most fun has been some of the hacking together demos in the middle of a Guerrilla.NET course with the other instructors to show some stuff we’d just discovered or decided would be compelling. Last week it was building a Silverlight app that consumed a WCF REST based service that reproduced the “type the alphabet” game that seems to be going around with a high-score table that all the students could play.

So who's next?

I nominate:

·         Dominick Baier

·         Andy Clymer

·         Christian Weyer

·         Marvin Smit

·         Mark Fussell

Monday, July 07, 2008 9:34:06 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]Trackback
 Wednesday, June 18, 2008

I've been looking at the routing infrastructure Microsoft are releasing in .NET 3.5 SP1. This is the infrastructure that allows me to bind an HTTP Hander to a URI rather than simply using webforms. It is used in the ASP.NET MVC framework that is in development. The infrastructure is pretty clean in design, First you add a reference to System.Web.Routing. Then you simply create Route objects binding a URI to an implementation of IRouteHandler. Finally you add it to a RouteTable static class. Global.asax is the ideal spot for this code.

void Application_Start(object sender, EventArgs e) 
{
        Route r = new Route("books", new BooksRouteHandler());
        RouteTable.Routes.Add(r);
        r = new Route("books/isbn/{isbn}", new BooksRouteHandler());
        RouteTable.Routes.Add(r);
        r = new Route("search/price", new SearchRouteHandler());
        RouteTable.Routes.Add(r);
}

Here BooksRouteHandler and SearchRouteHandler implement IRouteHandler

public interface IRouteHandler
{
    IHttpHandler GetHttpHandler(RequestContext requestContext);
}

So for example the BooksRouteHandler looks like this

public class BooksRouteHandler : IRouteHandler
{
    public IHttpHandler GetHttpHandler(RequestContext requestContext)
    {
        if (requestContext.RouteData.Values.ContainsKey("isbn"))
        {
            string isbn = (string)requestContext.RouteData.Values["isbn"];
            return new ISBNHandler(isbn);
        }
        else
        {
            return new BooksHandler();
        }
    }
}

Where ISBNHandler and BooksHandler both implement IHttpHandler

This is all pretty straightforward. The one thing that had me puzzling for a while is who looks at the RouteTable. Reflector to the rescue! There is a module in the System.Web.Routing assembly called UrlRoutingModule. If you add this in to your web.config the routing starts working. The config piece looks like this

<httpModules>
      <add name="Routing" 
           type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>


I'm currently using it to build a REST based service for the second part of a two part article for the DevelopMentor DevelopMents newsletter so if you're not on the distribution list for that subscribe!
 |  |  | 
Wednesday, June 18, 2008 8:36:52 AM (GMT Daylight Time, UTC+01:00)  #    Comments [1]Trackback
 Friday, June 06, 2008

As promised, here are the demos from the precon myself and Dave Wheeler (get a blog Dave) did at Software Architect 2008. It was a fun day talking about security, WCF, WF, Windows Forms, WPF, Silverlight, Ajax, ASP.NET MVC, LINQ and Oslo

DotNetForArchitects.zip (791.24 KB)

There is a text file in the demos directory in the zip that explains the role of each of the projects in the solution

Edit: Updated the download link so hopefully the problems people have been experiencing will be resolved

 |  |  |  |  |  | 
Friday, June 06, 2008 8:02:07 PM (GMT Daylight Time, UTC+01:00)  #    Comments [2]Trackback

I've just got back from Software Architect 2008. Its a great conference to speak at and an interesting change from speaking at hard core developer conferences like DevWeek. Thanks to everyone who attended my sessions - the slides and demos are below

SOA with WCF and WF - SOA.zip (368.43 KB)

Volta - Volta.zip (506.21 KB)

The slides and demos from the pre conference workshop on .NET 3.5 for architects that Dave Wheeler and me presented will be posted early next week. We have realised we really need a guide to what all the projects are and how they relate - so we'll add this documentation and post them

 |  |  | 
Friday, June 06, 2008 6:39:14 AM (GMT Daylight Time, UTC+01:00)  #    Comments [2]Trackback
 Friday, May 09, 2008

The Workflow Mapper Activity for copying data from one object to another was an interesting project for myself, Jörg and Christian. However, none of us has the cycles to turn it into the hugely valuable activity I think it could be. therefore, we have decided to publish the code on codeplex so hopefully we can get community involvement to polish the functionality.

You can find the project at

http://www.codeplex.com/WFMapperActivity

Take a look and let us know if you want to get involved in the project

 |  | 
Friday, May 09, 2008 3:47:56 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]Trackback
 Thursday, March 20, 2008

I use my machine for development and research as well as teaching. Originally I only installed VS2005 and SQL Express. I later installed VS 2008. Finally I installed BizTalk (which required a full-blown SQL Server install) and thought nothing more of it.

More recently I was checking into how LINQ to SQL was doing some things and realised I couldn't find SQL Server Profiler on my machine - in fact I couldn't find any of the SQL Server tools! I googled this a bit and found this was a well known issue with installing SQL Express before SQL Server. So I resigned myself to sorting this out on the next repave.

I was talking to Kev Jones about this issue at DevWeek last week and yesterday he pops up and tells me he's solved it. Kev had the cunning idea of actually reading the SQL Server installation warning messages - which apparently tell you exactly what to do.

You can read Kev's post about it here

 |  | 
Thursday, March 20, 2008 8:25:51 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]Trackback
 Saturday, March 15, 2008

The demos from my DevWeek 2008 Postcon A Day of Connected Systems with VS 2008 are now here:

DayOfCS.zip (1.48 MB)

Thanks for attending the session

 |  |  | 
Saturday, March 15, 2008 8:47:05 AM (GMT Standard Time, UTC+00:00)  #    Comments [2]Trackback