Thursday, 30 July 2009

Azure in Action book page up on Manning Site

I’m pleased to say that Manning have put up the page for our “Azure in Action” book on the Manning site.

Check it out at:

I will be posting up some details of the progress soon and some more details of how you can get early access to the chapters.

You can also check out our funky book cover

Wednesday, 29 July 2009


SQLBits which really is one of the top SQL Server conferences in the world is now accepting session submissions.

I had the pleasure of doing a session at SQL Bits 3 last year and I absolutely loved it.  Unfortunately since the timing is so close to the PDC, I don’t think I will be able to attend or present :(

However, if you are interested in submitting a session then you should go to the site

Even if you don’t want to submit a session you should make a note of the date in your diary and take a jaunt down to Wales (each conference is held in a different location in the UK).

Anyways check it out 19th-21st November 2009

Monday, 20 July 2009

Silverlight: iPhone Apps

So this was a tweet I picked up from @scottGu who picked it up from @techarch (by the way my twitter address is @chrishayuk)

So the Mono folks are working on a version of Mono that can compile to the iPhone which will eventually mean you will be able to run Silverlight Applications.

For more details see the MonoTouch Roadmap

This is absolute awesome as someone who has done a lot of Silverlight development and some iPhone development this is great news.

If you have ever tried to develop on the iPhone it’s like stepping back 10 years.  The prospect of being able to write C# / Silverlight code is just cool.

Once my book is complete this is one of the first set of technologies that I will be messing around, way cool.

Thursday, 9 July 2009

Silverlight: See you at Devlink

I’m very pleased to say that I will be spending a week in August at Nashville at Devlink

I’ve heard Nashville is an awesome place to be and I can’t wait to check it out.  I’ll be spending a few days before the conference chilling out and checking out the sites.  Hopefully I will get a chance to eat some good southern food and of course many many Cheeseburgers.

The attendee party looks great, I’ve never seen a baseball game before so I’m looking forward to it.  The conference agenda looks amazing with an incredible speaker line up. 

My session is on Silverlight Offline at 4.00pm on the Friday night.

It will be nice to concentrate on Silverlight again as I’ve been pretty Azure focused over the past few months :)

Looking forward to seeing you there, please say hello.

Wednesday, 8 July 2009


This time it's in Wales and is lasting 3 days, with the third being a community day.  Wow it looks a cracker.

Its on Thursday 19th November to Saturday 21st (unfortunately PDC week but I will try and be back for it).

For more details visit SQLBits

I've taken the liberty of translating the official sqlbits v announcement translated from Welsh to English using an online translator below.

"We are being we ' heartburn pleased I announce be SQLBits crookedly go West , the rhandaliad he conferences SQLBits. We are being doing the happening he drives even morely and crookedly better na’a time last , in over 3 day with much more contain , except continuing I keep everything who is has worked as well crookedly the happenings previous. nferred the ddygwiddiad running he Thursday 19fed I Saturday 21ain November to the Celtic d to divine striped in Nghasnewydd , right Wales , nearly I ' group traffordd M4..) happening most yet , with contain gwethaf SQL Server. He will be en begin with day instruction before the happening , with details coming soon. We are being we has listened i’ch.) about happening evening time , ey tasted time self y had scorned we has planned day happening with tall signs Friday the 20few with theme SQL 2008 and R2. He will be Saturday 21fed crookedly day society usual , with speakers around the world speaking about text SQL Server"

Saturday, 4 July 2009

Modifying web.configs on the fly in Windows Azure

This has caught me out often enough that I should blog about it.

If you are working with a web role in Windows Azure your web project is copied into the bin directory of your cloud project and is ran from there.  This allows the Windows Azure Development environment to simulate running within the cloud.

If you need to therefore modify a web.config setting then modifying your web.config on the fly from your source file won’t make the slightest bit of difference.

You need to either modify the web.config in the bin directory of your cloud project, or stop and re-run your role again.

In my case, I was messing with the maxRequestLength attribute of the httpRuntime element.

Azure Pricing

So we will soon know the pricing model of Windows Azure (yay), we will probably find this out on the 13th of July but we will certainly know this by 4.30pm on Tuesday the 14th of July.

If we don’t have the information on this date then the folks attending session “SS006 – The Azure Service Platform Partner Model and Pricing” could be in for a surprise.  The Microsoft Worldwide Partner conference site has more details of this.  This session also seems to indicate that we may get pricing not just on Windows Azure but on SQL Data Services and .NET Services.

There are some other clues that we might be able to guess from the proposed session list.  One of the sessions (SS003) refers to Windows Azure, Business Edition.  This may mean that Microsoft may be offering different levels of service (and pricing) depending on your needs.  This could be good news for developers, maybe we will see a developer edition at some point :)

I can’t wait for this information as it will allow me to complete the section on pricing / SLA’s in the new book I am writing with Brian Prince for Manning titled “Azure in Action”.

Wednesday, 1 July 2009

Loosely couple code/data for static known types

So the title is a bit of a mouthful but I couldn't think of a better one.

The problem is simple and we have all faced it.  We have a database with static data that never or hardly changes.  The major issue we have is that we keep a copy of the data on the database and the we make loose runtime references to the code which can break our application.

For example lets say I have a payroll database.  Some employees are paid weekly, every 2 weeks or ever calendar month.  So I may choose to represent this data in a table called payfrequencytypes where i store my 3 rows.  From a database perspective this is cool.  I can join to this table, I can run reports etc.

From my application layer this is not so great.  If I wish to create some application business logic to determine when to pay my employee, I will need to check their pay frequency.  At this point I need to mix code and data, typically you will see something like

if (emp.PayFrequency == "Monthly")

PayFequency types will never change so I want static compiler checking.  I really want my code to be something like

if (emp.PayFrequency == PayFrequencies.Monthly)

This is much better for me at the app layer however the problem here is that I need to keep my 2 layers in sync now (app and code). 

I think code generation solves this problem.  Really we need to define in our application what static data we require, how we generate it the database and validation routines to make sure it is correct in the db.  We can then make our application responsible for generation and validation meaning we can feel sure that we can use static types

Obviously this example can get more complicated but you see the point.

I will try and put some code generation stuff when I have time that solves that issue for simple examples.

In the future I think this is exactly the sort of problem that Oslo could solve for us.


As I said in my previous post, I've been looking at other technologies in my continuing quest to become a better developer.

One technology is open source database called postgresql.  I haven't installed it yet just looking at the manuals and comparing to sql server.  Perhaps after the book is done I'll get a chance to play.

One of the features that I spotted that I think would pretty cool in SQL Server is the ability to specify sort order of nulls in SELECT statements.

By default in SQL Server nulls are returned first and it's a little nasty to return them last but in PostgreSQL it is easy.

SELECT Firstname, Surname
FROM Customers

In SQL Server you have to do some pretty nasty things that to get the same result.  Some folks often go for case statements or coalesces in the order statement to get a similar result.  I urge against this (hence why I am not showing you the code) as it produces inefficient query plans.  There are also other potential solutions that I am not going to go into (may'be another day),

My point is, I like this feature PostgreSQL has it, I think Oracle has it too and I think it might be a part of the SQL 2003 standard.  Whether it is standardized or not is a little fuzzy but I can't check as it costs lots of money to get a copy.  This leads me onto another point, the ISO standards should be free, end of story.

Finally if Microsoft are looking for a new T-SQL language feature to implement in the next version, this would be cool.

I think it meets the criteria of being something that is sufficiently hard to do and therefore should be covered in the core engine.