<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Richard's blog</title><link>http://www.nogginbox.co.uk:80/blog</link><description>Richard's blog</description><item><title>Developing for the iPhone - what you need to know</title><link>http://www.nogginbox.co.uk:80/blog/developing-for-the-iphone-what-you-need-to-know</link><description>&lt;p&gt;&lt;img width="400" height="297" alt="Picture of iPod touch with tools" src="/Media/Default/BlogPost/blog/iPhone-dev.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;They say the future is mobile. &lt;em&gt;(Ed. Two years on since originally writing this post, it almost seems like the future is here. We might have all missed the App Store gold rush, but app development for mobile is still exciting and now there's Android, Windows Phone 7 and iPads to think about.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So, I'm quite excited to learn about developing for this new platform and see what I can create. Will I be able to use my existing web development and programming skills, or will I need to learn a new set of skills. This is what I've learnt so far about what I'll need to know.&lt;/p&gt;
&lt;p&gt;There are two options when developing for the iPhone (or iPod touch): Develop a web application or develop a native iPhone application. There are plusses and minuses for both, and both require a completely different set of skills. Until recently you could only develop web applications, but Apple has recently released a beta of the iPhone SDK building up towards the planned opening of the iPhone App Store.&lt;/p&gt;
&lt;h3&gt;Developing a web based iPhone application&lt;/h3&gt;
&lt;p&gt;If you're a web developer like me, then this is going to be the easiest and possibly best option. You can use your existing web development skills and you can host your application on your current server.&lt;/p&gt;
&lt;p&gt;I bought myself an iPod touch using the excuse that it would help me test websites on the iPhone. They're the same except the iPod touch doesn't have all the applications the iPhone does (most notably, and understandably the phone application). However, I've discovered that you don't even need an iPod touch. The iPhone Software Development Kit (SDK) includes an iPhone simulator. You will need a Mac though to run the SDK.&lt;/p&gt;
&lt;p&gt;If you have an existing web application, it will probably already work on the iPhone, unless it uses Flash or a few other non-supported technologies. There are several things you could do to make it work better on an iPhone, some of these things will be helpful for other mobile devices.&lt;/p&gt;
&lt;p&gt;You can add an iPhone, or small screen specific style sheet. This will allow you to lay things out better for the available screen size. You may also wish to take advantage of some Safari and iPhone specific CSS. For example there's CSS support for simple animation and transitions.&lt;/p&gt;
&lt;p&gt;You may wish to detect that the browser is on an iPhone and serve them a specialised version. Facebook is an excellent example of this and creates an experience that is very similar to using a native iPhone application.&lt;/p&gt;
&lt;p&gt;You can make use of iPhone JavaScript handlers that respond to touch gestures. The touch interface is one of the things that makes the iPhone shine, so it'd be great to take advantage of this in your web apps.&lt;/p&gt;
&lt;p&gt;There are also some custom meta tags which allow you to control the screen area and whether the user can zoom. You can also add custom links that will launch other iPhone applications. You can even store data in a client side SQLite database, which is apparently part of the HTML 5 spec.&lt;/p&gt;
&lt;p&gt;There's a lot you can do and that just scratches the surface. Using and building upon you existing HTML, CSS and JavaScript knowledge you could make something very exciting.&lt;/p&gt;
&lt;p&gt;Now that all sounds great, but there are limitations with an iPhone web app. Firstly it's not going to work when the user is offline, and it's going to be slow when their connection is slow. You're also not going to be able to access all of the features of the device such as its location awareness, orientation awareness or be able to access things like the address book. If you want to make use of all the power and all the features then you're going to have to make a fully native iPhone application.&lt;/p&gt;
&lt;h3&gt;Developing a native iPhone application&lt;/h3&gt;
&lt;p&gt;If you've previously developed software for Apple Macs then you're probably going to find you can quite easily turn those skills to iPhone development. If you haven't then there's a lot your going to need to learn. It's aimed at software developers, rather than web developers and the skills needed are very different.&lt;/p&gt;
&lt;p&gt;Before you begin there are a few things you will need. You'll need a Mac, you'll need to download the iPhone Software Development Kit (SDK) and it'd help for testing if you had a iPhone or an iPod touch (this last bit isn't essential as there is a simulator).&lt;/p&gt;
&lt;p&gt;The SDK includes all the tools you'll need to develop iPhone applications. These tools include an interface designer, a code editor, profiling tools and an iPhone simulator. They're completely free, but there is an option to join the iPhone Developer Program. This costs $99. As far as I can tell, you need to join this if you wish to share your applications with anyone. Otherwise you can only install your programs on one designated test iPhone. I've also read in forums that the Developer Program is so popular that Apple are putting everyone on a waiting list. I thought I'd wait till I created a program worth sharing before I joined the program. There's a lot to learn before I can even think about doing this.&lt;/p&gt;
&lt;p&gt;If you've not done Mac development before, the first you'll need to learn is the programming language Objective C. Knowing PHP and JavaScript, probably isn't going to help you that much, although it'd be a start. It's most similar to C and C++, although knowing something like Java, Ruby on Rails, or ASP.NET would also be helpful. Although I've used C++ in the past and currently use ASP.NET, I've found Objective C too different to be able to pick up from code samples. I'm currently reading Apple's reference guide to it and I've been reccommended the book &lt;a href="http://www.amazon.co.uk/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.co.uk%2Fdp%2F0672325861%2F&amp;amp;tag=garsonix-21&amp;amp;linkCode=ur2&amp;amp;camp=1634&amp;amp;creative=6738"&gt;Programming in Objective C&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You'll also need a good understanding of object orientated programming. If you've used Ruby on Rails, you'll be pleased to know that they seem to make heavy use of the Model View Controller architecture that Rails is built on.&lt;/p&gt;
&lt;p&gt;All the actual fun stuff seems to be contained in the various frameworks that provide the iPhone functions and features that your application can use. I've not had time to explore this fully as learning Objective C has slowed me down a bit. These frameworks seem to be the Foundation Framework, UIKit and the Cocoa Touch Framework. You'll need to understand the basics of these frameworks so you can start making use of the functions they provide.&lt;/p&gt;
&lt;p&gt;Once you've got your head round Objective C you can start looking through all the code examples they've got. It's probably a good way to start understanding how all the framework features work.&lt;/p&gt;
&lt;p&gt;If you want to find out more, the iPhone Dev Centre has load of videos, reference material and code samples to work through:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://developer.apple.com/iphone/"&gt;iPhone Dev centre for Native Applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://developer.apple.com/webapps/"&gt;iPhone Dev Centre for Web Apps&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Sat, 13 Apr 2013 07:43:31 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/developing-for-the-iphone-what-you-need-to-know</guid></item><item><title>Top Ten Windows 8 Apps</title><link>http://www.nogginbox.co.uk:80/blog/top-ten-windows-8-apps</link><description>&lt;p&gt;&lt;a href="http://appgenerator.creativebloq.com/"&gt;The Creative Bloq App Generator Contest&lt;/a&gt; was sponsored by Windows 8 and was a chance for UK developers to be recognised for their excellent work. I was very pleased that my app Font Picker was one of the top ten winners, particularly because of the high quality of the other winners. Here are the all the winners of the contest.&lt;/p&gt;
&lt;h2&gt;Grand Prize Winner&lt;/h2&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/didlr/7f128187-a596-47bf-9da7-399be979787f"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/didlr-logo.png" alt="Didlr" height="100" width="100" /&gt;Didlr&lt;/a&gt; &amp;ndash; Rich Holdsworth&lt;/h3&gt;
&lt;p&gt;Didlr lets you draw and share your pictures.&lt;/p&gt;
&lt;h2&gt;Top ten prize winners&lt;/h2&gt;
&lt;p&gt;These are in no particular order, except I'm biased so mine is at the top.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-GB/app/font-picker/b4dec161-96ac-4413-b0c0-c0fd7a17f6dd"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/fontpicker-logo.png" alt="Font Picker" height="100" width="100" /&gt;Font Picker&lt;/a&gt; &amp;ndash; Richard Garside&lt;/h3&gt;
&lt;p&gt;Font Picker is an app for designers that makes trawling through your fonts a joy and means you'll always find the perfect font for your project.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/interference/703eba65-2137-46db-9b3b-2ffcb794d8fe"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/interference-logo.png" alt="Interference" height="100" width="100" /&gt;Interference&lt;/a&gt; &amp;ndash; Nathan Beardmore&lt;/h3&gt;
&lt;p&gt;Interference is a game that mixes Chinese Whispers with doodling in a wonderfully addictive way. More fun than you can doodle a stick at.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/tune-up/18337b4f-72f6-4fa0-8502-c19edf7203cd"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/TuneUp-logo.png" alt="Tune Up" height="100" width="100" /&gt;Tune Up&lt;/a&gt; &amp;ndash; Anthony Wieser&lt;/h3&gt;
&lt;p&gt;Tune Up is a simple effective app for tuning your guitar or any other music instrument you have round the house.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/my-study-life/3b763f6d-96dd-40a2-83e3-a3295b8e3697"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/StudyLife-logo.png" alt="My Study Life" height="100" width="100" /&gt;My Study Life&lt;/a&gt; &amp;ndash; Jamie Clarke&lt;/h3&gt;
&lt;p&gt;My Study Life is a planner for student, teachers and lecturers who want to organise their hectic academic lives.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/human-encyclopedia/9e0ccb29-dd37-4b95-8e02-44033099b3e5"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/HumanEncylo-logo.png" alt="Human Encyclopedia" /&gt;Human Encyclopedia&lt;/a&gt; &amp;ndash; Andr&amp;eacute; Barbosa&lt;/h3&gt;
&lt;p&gt;The Human Encyclopedia is a guide to the human body with interactive 3D models.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/getabout-me/b576abe3-c64a-44a3-8146-c8b7f888d59d"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/GetAbout-logo.png" alt="Get About . Me" height="100" width="100" /&gt;GetAbout.Me&lt;/a&gt; &amp;ndash; Mark Bridgett&lt;/h3&gt;
&lt;p&gt;GetAbout.me is a social media monitoring tool that helps you discover what people are talking about.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/pepper/32a36a7a-a3dd-47ac-b5be-63a28a4579af"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/Pepper-logo.png" alt="Pepper" height="100" width="100" /&gt;Pepper&lt;/a&gt; &amp;ndash; David Hamilton&lt;/h3&gt;
&lt;p&gt;Pepper is a social app for discovering, sharing and interacting with live music events.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/study-planner/6509059e-471a-4331-8e1c-b4797c8b48ec"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/StudyPlaner-logo.png" alt="Study Planner" /&gt;Study Planner&lt;/a&gt; &amp;ndash; Dominic Ayre&lt;/h3&gt;
&lt;p&gt;Study Planner is an organising app for students that keep track of their timetable and homework.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-GB/app/album-flow/6b4d4b1b-cba9-4be8-9dd2-ef83d8901e94"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/AlbumFlow-logo.png" alt="Album Flow" height="100" width="100" /&gt;Album Flow&lt;/a&gt; &amp;ndash; Crispin Hoult&lt;/h3&gt;
&lt;p&gt;Album Flow lets you browse through your music collection as if you were flipping though LPs in a record store.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://apps.microsoft.com/windows/en-gb/app/visual-snippet-library/8860c8df-b2bd-493d-8b52-be2791b8f063"&gt;&lt;img src="/Media/Default/BlogPost/blog/logos/Snippet-logo.png" alt="Visual Snippet Library" height="100" width="100" /&gt;Visual Snippet Library&lt;/a&gt; &amp;ndash; Russell Archer&lt;/h3&gt;
&lt;p&gt;Visual Snippet Library allows you to open-up your Visual Studio code snippet library so you can quickly browse, search, view, edit and create snippets.&lt;/p&gt;</description><pubDate>Fri, 15 Feb 2013 18:29:53 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/top-ten-windows-8-apps</guid></item><item><title>Sending XML to an ASP.NET MVC Action Method Argument</title><link>http://www.nogginbox.co.uk:80/blog/xml-to-asp.net-mvc-action-method</link><description>&lt;p&gt;I read a great article recently by Phil Haack on &lt;a href="http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx"&gt;sending JSON to an action method&lt;/a&gt;. This was very timely as I wanted to do exactly that in the REST API I've been created for a &lt;a href="http://www.kenseimedia.com/"&gt;video hosting website&lt;/a&gt;. However, I wanted to make it work with XML as well as JSON.&lt;/p&gt;
&lt;p&gt;Phil Haack creates something called a JSON value provider, so I followed his example and created an XML value provider. I've used it on two projects now and it's worked a treat. I thought I'd share it with the world in the hope that it will be useful to others.&lt;/p&gt;
&lt;h2&gt;Source code&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="/Media/files/XmlValueProviderFactory.txt"&gt;XML Value Provider (C# source)&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To get this working in your project you'll need to follow &lt;a href="http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx"&gt;Phil Haack's instructions&lt;/a&gt; for his JSON Value Provider.&lt;/p&gt;
&lt;p&gt;If anyone has any suggested improvements to the code, then I'd love to hear them.&lt;/p&gt;
&lt;h2&gt;Update - January 2013&lt;/h2&gt;
&lt;p&gt;This code has now been updated to stop it being vulnerable to an &lt;a href="http://msdn.microsoft.com/en-us/magazine/ee335713.aspx"&gt;XML Bomb DOS Attack&lt;/a&gt;. We all know that you shouldn't trust anything sent by the user, but less of us know that XmlReader has a clever feature for expanding entities and that this feature presents a nice attack vector. It's very easy to fix. You just need to provide a setting that prohibits DTD Processing. This probably should be the standard setting, but as it isn't, you need to know to turn if off. If you do need this feature then read the article for details on how to use it and still keep your site safe.&lt;/p&gt;
&lt;p&gt;If you're using an early version of this code, you should update it to this version.&lt;/p&gt;
&lt;h2&gt;Using a Custom Model Binder&lt;/h2&gt;
&lt;p&gt;If your model object needs to use XML attributes then you may be better off using a &lt;a href="/blog/custom-xml-model-binder-asp.net-mvc"&gt;custom XML model binder&lt;/a&gt; instead.&lt;/p&gt;</description><pubDate>Thu, 17 Jan 2013 12:16:39 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/xml-to-asp.net-mvc-action-method</guid></item><item><title>Custom XML model binder for ASP.NET MVC</title><link>http://www.nogginbox.co.uk:80/blog/custom-xml-model-binder-asp.net-mvc</link><description>&lt;p&gt;In an earlier post I wrote about &lt;a href="/blog/xml-to-asp.net-mvc-action-method"&gt;using an XML value provider&lt;/a&gt; to allow you to send XML to your .NET MVC action methods. This is great, untill you want to accept XML where you have a model that needs XML atributes to control how it's deserialized. As the value provider stage happens before mondel binding it has no knowledge of the model objects that the values will be pushed into. So it can't look at your model class's XML attributes.&lt;/p&gt;
&lt;p&gt;In cases like this, you're better of using a custom XML model binder.&lt;/p&gt;
&lt;p&gt;To setup an XML model binder you need to create a model binder and a model binder provider. You then need to register the model binder provider in you app's startup.&lt;/p&gt;
&lt;h2&gt;XML Model Binder&lt;/h2&gt;
&lt;p class="code"&gt;using System;&lt;br /&gt;using System.Web.Mvc;&lt;br /&gt;using System.Xml.Serialization;&lt;br /&gt;&lt;br /&gt;namespace XmlBinderExample.MVC.Extensions&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class XmlModelBinder : IModelBinder&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var serializer = new XmlSerializer(bindingContext.ModelType);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var boundModel = serializer.Deserialize(controllerContext.HttpContext.Request.InputStream);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return boundModel;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Todo: Log this failed binding&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;h2&gt;XML Model Binder Provider&lt;/h2&gt;
&lt;p class="code"&gt;using System;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Mvc;&lt;br /&gt;&lt;br /&gt;namespace XmlBinderExample.MVC.Extensions&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class XmlModelBinderProvider : IModelBinderProvider&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public IModelBinder GetBinder(Type modelType)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var requestType = HttpContext.Current.Request.ContentType.ToLower();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return (requestType == "application/xml"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; || requestType == "text/xml")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ? new XmlModelBinder()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;h2&gt;Register the provider&lt;/h2&gt;
&lt;p&gt;In Global.asax modify your Application_Start method to include this extra line:&lt;/p&gt;
&lt;p class="code"&gt;ModelBinderProviders.BinderProviders.Add(new XmlModelBinderProvider());&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And you're done.&lt;/p&gt;</description><pubDate>Thu, 17 Jan 2013 12:14:17 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/custom-xml-model-binder-asp.net-mvc</guid></item><item><title>Mocking with NSubstitute</title><link>http://www.nogginbox.co.uk:80/blog/mocking-with-nsubstitute</link><description>&lt;p&gt;My previous C# mocking framework of choice was &lt;a href="http://code.google.com/p/moq/"&gt;MOQ&lt;/a&gt;. It's very powerful and fairly easy to use, but I recently started using &lt;a href="http://nsubstitute.github.com"&gt;NSubstitute&lt;/a&gt; and fell in love with how easy and intuative it was to use.&lt;/p&gt;
&lt;p&gt;The cleverest part is that unlike MOQ the mocks produced actually implement the interface they're mocking and this makes the code much clearer and a little bit shorter.&lt;/p&gt;
&lt;p&gt;Here is a very simple example:&lt;/p&gt;
&lt;p class="code"&gt;var mockThing = Substitute.For&amp;lt;IThing&amp;gt;();&lt;br /&gt;mockThing.DoThingy().Returns("Something");&lt;br /&gt;&lt;br /&gt;// Use mock thing&lt;br /&gt;UseThing(mockThing);&lt;/p&gt;
&lt;p&gt;In MOQ this is also quite straightforward but the setup code to change what a mocked method returns always had me reaching for Google.&lt;/p&gt;
&lt;p class="code"&gt;var mockThing = new Mock&amp;lt;IThing&amp;gt;();&lt;br /&gt;mockThing.Setup(m =&amp;gt; m.Now()).Returns(new DateTime());&lt;br /&gt;&lt;br /&gt;// Use mock thing&lt;br /&gt;UseThing(mockThing.Object)&lt;/p&gt;
&lt;p&gt;For a more complete comparison between Moq and NSubstutute you should read &lt;a href="http://programmaticallyspeaking.com/?p=713"&gt;NSubstitute vs Moq&lt;/a&gt;. And, for a more detailed view of what NSubstitute can do you should read the &lt;a href="http://nsubstitute.github.com/help/getting-started/"&gt;getting started guide&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 09 Jan 2013 12:14:34 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/mocking-with-nsubstitute</guid></item><item><title>Moving from Subversion to Mercurial and Bitbucket</title><link>http://www.nogginbox.co.uk:80/blog/subversion-mercurial-bitbucket</link><description>&lt;p&gt;I've been using &lt;a href="http://mercurial.selenic.com/"&gt;Mercurial&lt;/a&gt; for source control on my own small projects for a while and have really liked it. I've also wanted to stop supporting my own Subversion server, but previously I've found hosted solutions too expensive. That's why I like &lt;a href="https://bitbucket.org/"&gt;Bitbucket&lt;/a&gt;'s pricing structure. I have lots of projects that need source control, but I either work alone or as part of a small team. Bitbucket charges by the team size, not the number of projects (which seems like a much better way to judge the budget of a project) and it's free for teams of 5 or under.&lt;/p&gt;
&lt;p&gt;I've wanted to move my existing subversion projects over to Bitbucket, but I thought that keeping the revision history would be too difficult. Turns out that it was really simple.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Step 1: Enable &lt;a href="http://mercurial.selenic.com/wiki/ConvertExtension"&gt;hg convert&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;Assuming you've already installed mercurial command line or as I prefer &lt;a href="http://tortoisehg.bitbucket.org/"&gt;Tortoise HG GUI&lt;/a&gt; on your computer you can enable this extension by finding mercurial.ini in your user directory and adding the following lines:&lt;br /&gt;&lt;span class="code"&gt;[extensions]&lt;br /&gt;hgext.convert =&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 2: Install &lt;a href="http://mercurial.selenic.com/wiki/HgSubversion"&gt;hgsubvversion extension&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;The easiest way to do this is to clone the repository and copy the files into a folder here ~Program Files\TortoiseHg\extensions\hgsubversion&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 3: Create a new mercurial repository in bitbucket&lt;/strong&gt;&lt;br /&gt;Use bitbucket's web interface to create a new repository.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 4: Clone this locally on your machine&lt;/strong&gt;&lt;br /&gt;Use either tortoise or the command line to clone this empty repository:&lt;br /&gt; &lt;span class="code"&gt;hg clone https://{bitbucket-username}@bitbucket.org/{bitbucket-username}/{bitbucket-repository-name} {local-directory-name}&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 5: Get revisions from your subversion repository&lt;/strong&gt;&lt;br /&gt;Use the command line to use the convert extension, then update your local copy:&lt;br /&gt;&lt;span class="code"&gt;hg convert {svn-repository} {local-directory-name}&lt;br /&gt;cd {local-directory-name}&lt;br /&gt;hg update&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 6: Push all these revisions to your bitbucket repository&lt;/strong&gt;&lt;br /&gt;&lt;span class="code"&gt;hg push&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 7: Set up aliases&lt;/strong&gt;&lt;br /&gt;The usernames used by Mercurial and Bitbucket will not match those imported from Subversion. The easiest way to fix this is using aliases in bitbucket. On the commits screen any unknown user has a little question mark by it. Clicking on that lets you alias that username to a Bitbucket user.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That's it.&lt;/p&gt;
&lt;p&gt;The hg convert command can do fancier stuff, like renaming branches and changing usernames, but I've found that I don't really need that.&lt;/p&gt;</description><pubDate>Fri, 09 Nov 2012 22:39:12 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/subversion-mercurial-bitbucket</guid></item><item><title>The Side Project Startup reading list</title><link>http://www.nogginbox.co.uk:80/blog/side-project-startup-reading-list</link><description>&lt;p&gt;This is the reading list for my talk, 'The Side Project Startup. I last gave this &lt;a href="http://developerdeveloperdeveloper.com/North2/ViewSession.aspx?SessionID=962"&gt;talk at DDD North 2&lt;/a&gt; and it's slowly evolving every time I give it. If you're interested in side projects and starting your own small software business then this reading list is for you.&lt;/p&gt;
&lt;h2&gt;Books&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://amzn.to/V9NWfO"&gt;The Lean Startup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://amzn.to/TuJgKr"&gt;Start small stay small&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Blogs&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.startuplessonslearned.com/"&gt;The Lean Startup blog&lt;/a&gt; - Author of The Lean Startup&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.softwarebyrob.com/"&gt;Sofware by Rob&lt;/a&gt; - Author of 'Start small stay small'&lt;/li&gt;
&lt;li&gt;&lt;a href="http://onstartups.com/"&gt;On Startups&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.asmartbear.com/"&gt;A Smart Bear&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.kalzumeus.com/blog/"&gt;Kalzumeus blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://steveblank.com/"&gt;Steve Blank&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.singlefounder.com/"&gt;Single Founder&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Reports&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.visionmobile.com/product/developer-economics-2012/"&gt;Developer Economics 2012&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Videos&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.leanstartupmanchester.co.uk/lean-analytics-with-alistair-croll-webcast-4102012/"&gt;Lean Analytics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Podcasts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.startupsfortherestofus.com/"&gt;Startups for the rest of us&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://startupsuccesspodcast.com/"&gt;The startup Success Podcast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Tue, 06 Nov 2012 15:42:06 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/side-project-startup-reading-list</guid></item><item><title>Record breaking fonts on vinyl</title><link>http://www.nogginbox.co.uk:80/blog/fonts-on-vinyl</link><description>&lt;p&gt;&lt;a href="https://twitter.com/search?q=%23FontSunday"&gt;Font Sunday&lt;/a&gt; is a weekly twitter phenomena where the typographically obsessed share examples of fonts around them. The theme this week was 'Fonts on Vinyl' and this turned out to be a theme that got people excited and it was the most contributed to week we've ever had. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://pinterest.com/fontpicker/font-sunday-fonts-on-vinyl/"&gt;&lt;img src="/Media/Default/BlogPost/blog/FontSunday-Vinyl.jpg" alt="Fonts on Vinyl on Pinterest" height="280" width="550" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Design Museum started Font Sunday and set the theme each week. I help out by collating the contributions on a &lt;a href="http://pinterest.com/fontpicker/"&gt;Pinterest board&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Tue, 06 Nov 2012 15:34:25 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/fonts-on-vinyl</guid></item><item><title>Creating app bar buttons in WinRT</title><link>http://www.nogginbox.co.uk:80/blog/app-bar-buttons-in-winrt</link><description>&lt;p&gt;If you start a new blank Windows 8 App in Visual Studio you get loads of app bar button styles to choose from in StandardStyles.xaml including:&lt;/p&gt;
&lt;ul class="code"&gt;
&lt;li&gt;&lt;em&gt;SkipBackAppBarButtonStyle, SkipAheadAppBarButtonStyle, PlayAppBarButtonStyle, PauseAppBarButtonStyle, EditAppBarButtonStyle, SaveAppBarButtonStyle, DeleteAppBarButtonStyle, DiscardAppBarButtonStyle, RemoveAppBarButtonStyle, AddAppBarButtonStyle, NoAppBarButtonStyle, YesAppBarButtonStyle, MoreAppBarButtonStyle, RedoAppBarButtonStyle, UndoAppBarButtonStyle, HomeAppBarButtonStyle, OutAppBarButtonStyle, NextAppBarButtonStyle, PreviousAppBarButtonStyle, FavouriteAppBarButtonStyle, PhotoAppBarButtonStyle, SettingsAppBarButtonStyle, VideoAppBarButtonStyle, RefreshAppBarButtonStyle, DownloadAppBarButtonStyle, MailAppBarButtonStyle, SearchAppBarButtonStyle, HelpAppBarButtonStyle, UploadAppBarButtonStyle.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If that list doesn't quite cover you then it's really easy to create a metro button style that will. The easiest way is to create a style based on AppBarButton and to use an icon from the font Segoe UI Symbol. The advantage of using a font is that it is automatically scaleable. Segoe UI Symbol has a lot of symbols for you to choose from and is the font used by AppBarButtonStyle, which we are basing our style on. You can use Character Map to find a good one, or I've included some of my favourites at the end of this post.&lt;/p&gt;
&lt;p&gt;Here is my style for a crop button. Include this style in a resource dictionary that will be accessible to all the xaml files that need it:&lt;/p&gt;
&lt;p class="code"&gt;&amp;lt;Style x:Key="&lt;strong&gt;CropAppBarButtonStyle&lt;/strong&gt;" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}"&amp;gt;&lt;br /&gt; &amp;lt;Setter Property="AutomationProperties.AutomationId" Value="&lt;strong&gt;CropAppBarButton&lt;/strong&gt;"/&amp;gt;&lt;br /&gt; &amp;lt;Setter Property="AutomationProperties.Name" Value="&lt;strong&gt;Crop&lt;/strong&gt;"/&amp;gt;&lt;br /&gt; &amp;lt;Setter Property="Content" Value="&lt;strong&gt;&amp;amp;#x25F0;&lt;/strong&gt;"/&amp;gt;&lt;br /&gt; &amp;lt;/Style&amp;gt;&lt;/p&gt;
&lt;p&gt;The text in bold is the text you need to change to make different sorts of buttons. The Content property contains the hex unicode value for the font character you want to use as your icon. I wasn't aware of an accepted standard for a crop icon, so I found one that I thought worked pretty well.&lt;/p&gt;
&lt;p&gt;To use this style on your button you just x like this:&lt;/p&gt;
&lt;p class="code"&gt;&amp;lt;Button x:Name="Crop" Style="{StaticResource CropAppBarButtonStyle}" Click="OnCropButtonClick"/&amp;gt;&lt;/p&gt;
&lt;p&gt;Here is a table including most of the Segoe UI Symbols that you're likely to find useful:&lt;/p&gt;
&lt;p&gt;&lt;iframe src="/Media/Default/BlogPost/segoe.html" height="600" width="100%"&gt;&lt;/iframe&gt;&lt;/p&gt;</description><pubDate>Mon, 24 Sep 2012 20:15:01 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/app-bar-buttons-in-winrt</guid></item><item><title>Windows 8 Excellence Labs</title><link>http://www.nogginbox.co.uk:80/blog/windows-8-excellence-labs</link><description>&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/excellence-lab.jpg" alt="Font Picker at the entrance to Microsoft Reading." height="850" width="550" /&gt;&lt;/p&gt;
&lt;p&gt;Developing for a new platform, particularly one that's not finalised yet can come with a bit of a steep learning curve and a number of frustrating moments. It's also exciting and I can't wait for Windows 8 to come out and for my app Font Picker to be available in the new Windows Store. Something that has blown me away has been the support from Microsoft. The documentation is great, there have been roadshows and you could even get one on one time with a Microsoft engineer to fine tune your app and get it ready for the store. These were the slightly cheesily named 'Excellence Labs'.&lt;/p&gt;
&lt;p&gt;The exciting promise of the excellence labs was that, if you passed, you'd get a developer token that would give you early access to the Windows Store before everyone else.&lt;/p&gt;
&lt;p&gt;I took an early version of Font Picker for Windows 8 to Microsoft Reading in May and met with &lt;a href="https://twitter.com/_richmac"&gt;Richard Macdonald&lt;/a&gt; who gave me a &lt;strong&gt;full 4 hours&lt;/strong&gt; of his time. Before I went I thought I was almost done. The only thing I wasn't happy with was my user interface. XAML gives you so much control over the appearance of your app that it's quite easy to make it look awful and that was what I'd done. So, I expected Richard to give me some UI tips and then hopefully say I could have an early access token on the condition that I improved the UI.&lt;/p&gt;
&lt;p&gt;Instead, he raised the bar. It's incredibly useful to have an outside eye pass judgement over your work, but it's also quite annoying when you thought you were almost done. I had a great time in Reading. I got a lot of great advice and I got to see my app run on a tablet, where it almost immediately crashed because it used too much memory. That was embarrassing and obviously first on my list of things to fix. The problem with having a high powered dev machine is that it hides a multitude of sins. So, I left Reading with a long list of things to do and the promise of a second go at the test.&lt;/p&gt;
&lt;p&gt;It took a while to implement all of Richard's recommendations and to sort out the UI. Font Picker was definitely in my mind finished now. So, I was excited while waiting for Richard to privately test it and then obviously just let me know that I could have my token. He found a UI bug, a really small one. A button remained disabled when it should have been enabled. The problem took 5 minutes to track down and fix, but that was my last chance with Richard. I was really annoyed with myself for not testing it better. I also need to find a way to automate UI testing in Windows 8.&lt;/p&gt;
&lt;p&gt;All was not lost however, because you could apply for another excellence lab. I'd missed the deadline for the next ones but I got another go in August.&lt;/p&gt;
&lt;p&gt;This time I talked to Hans Zeitler remotely (isn't the Internet fantastic) and he gave me &lt;strong&gt;over 2 hours of his time&lt;/strong&gt;. Surely this time getting my token would be a breeze. My app was looking awesome and I'd done everything Richard told me too. But no, they raised the bar again. A fresh pair of eyes will always see new things and find new areas for improvement. Also, Hans told me that they'd learnt a lot since the early labs and they'd become a bit more strict.&lt;/p&gt;
&lt;p&gt;My new list of recommendations was more difficult to implement than the first; in particular adding semantic zoom and not reintroducing the crashing bug I'd had in the first lab. By the time I'd done everything on my new list Font Picker was even more awesome, but the Windows Store had just been opened for everyone so I'd missed the boat on my token.&lt;/p&gt;
&lt;p&gt;So now I'm just about to go through the store approval process and fingers crossed they'll think my app is as awesome as I do. Or, if experience has taught me anything, they'll probably raise the bar and force me make my app even more awesome.&lt;/p&gt;</description><pubDate>Fri, 21 Sep 2012 10:50:42 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/windows-8-excellence-labs</guid></item><item><title>WinRT GridView with inline group headers and semantic zoom</title><link>http://www.nogginbox.co.uk:80/blog/gridview-with-inline-group-headers</link><description>&lt;p&gt;My Windows 8 app had a GridView with grouped content and also made nice use of semantic zoom to make navigating between those groups easy. All I wanted to do was to make the headers appear in the content like the People App. I thought this would be a simple case of finding the right container template to use, but after reading this &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2012/08/14/from-the-windows-8-camps-gridviews-with-inlined-group-headers.aspx"&gt;post by Mike Taulty&lt;/a&gt; it turns out that using the group style built into GridView can't do this. His post goes into a lot of detail about how to figure out your XAML and shows a GridView with inline group headers. I've taken his method and extended it to include semantic zoom.&lt;/p&gt;
&lt;p&gt;This is what we'll be creating:&lt;/p&gt;
&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/inline-headers1.png" alt="GridView group headers in content" height="332" width="550" /&gt;&lt;/p&gt;
&lt;p&gt;This example is a simple app that uses a GridView to show the top 250 films grouped by year. I'll talk you through the steps but the source code is available on Bitbucket.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://bitbucket.org/NogginBox/winrt-examples/src/tip/InlineGroupHeaderApp/InlineGroupHeaderApp"&gt;Final source code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I've also tagged the various versions with the steps I've gone through so you can see my example progress.&lt;/p&gt;
&lt;h2&gt;Step 1 - A GridView showing headers and items&lt;/h2&gt;
&lt;p&gt;To create a GridView with headers shown in the body of the GridView rather than above it, the headers need to be added as items to the GridView's ItemsSource list.&lt;/p&gt;
&lt;p&gt;To manage the groups and the items I've created a &lt;a href="https://bitbucket.org/NogginBox/winrt-extra/src/tip/Collections/GroupCollection.cs"&gt;GroupCollection&amp;lt;T&amp;gt;&lt;/a&gt; and &lt;a href="https://bitbucket.org/NogginBox/winrt-extra/src/tip/Collections/Group.cs"&gt;Group&amp;lt;T&amp;gt;&lt;/a&gt; class. GroupCollection holds our groups of items, but also gives us access to a list of all items with the headers included. Feel free to use these classes and modify them if you need to, or just borrow the bits you need.&lt;/p&gt;
&lt;h3&gt;Setting up your grouped data&lt;/h3&gt;
&lt;p&gt;In App.xaml.cs create a static member variable to hold our film data&lt;/p&gt;
&lt;p class="code"&gt;public static GroupCollection&amp;lt;Film&amp;gt; FilmData;&lt;/p&gt;
&lt;p&gt;We then initialise this collection when the app loads:&lt;/p&gt;
&lt;p class="code"&gt;IEnumerable&amp;lt;Film&amp;gt; films = CreateFilms();&lt;br /&gt;FilmData = new GroupCollection&amp;lt;Film&amp;gt;(null, f =&amp;gt; f.Year.ToString());&lt;br /&gt;FilmData.AddItems(films);&lt;/p&gt;
&lt;p&gt;The clever bit of GroupCollection is that it takes a lambda expression grouping rule which groups the items and gives those groups names. In this case we are grouping films by their year.&lt;/p&gt;
&lt;p&gt;FilmData now has the following useful properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FilmData.Groups - A collection of all the groups containing our films&lt;/li&gt;
&lt;li&gt;FilmData.ItemsWithHeaders - A collection of all the items with the groups included to server as headers&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Displaying the films and group headers in a GridView&lt;/h3&gt;
&lt;p class="code"&gt;In our XAML page MainPage.xaml we set FilmData as the DataContext for the page and add a GridView bound to this list:&lt;/p&gt;
&lt;p class="code"&gt;&amp;lt;GridView ItemsSource="{Binding ItemsWithHeaders}" ItemTemplate="{StaticResource FilmItem}" /&amp;gt;&lt;/p&gt;
&lt;p&gt;There is an item template for our Film item in MainPage's resource dictionary. I won't show it here, but it currently doesn't show our group headers well.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Source code:&lt;/strong&gt; &lt;a href="https://bitbucket.org/NogginBox/winrt-examples/src/9d70f19ff4b8/InlineGroupHeaderApp/InlineGroupHeaderApp/"&gt;Source code for step 1&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Step 2 - Headers with their own display templates&lt;/h2&gt;
&lt;p&gt;To display the film items and group headers differently we need to create a DataTemplateSelector that knows the difference between a film and a group of films. Here is an example of a DataTemplateSelector class which does the trick:&lt;/p&gt;
&lt;p class="code"&gt;class ItemOrHeaderSelector : DataTemplateSelector&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DataTemplate Group { get; set; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DataTemplate Item { get; set; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var itemType = item.GetType();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var isGroup = itemType.Name == "Group`1" &amp;amp;&amp;amp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemType.Namespace == "NogginBox.WinRT.Extra.Collections";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Disable headers so they can't be selected&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var selectorItem = container as SelectorItem;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (selectorItem != null)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; selectorItem.IsEnabled = !isGroup;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return (isGroup) ? Group : Item;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p class="code"&gt;It also disables the item container for headers so you can't click on them. We then need to make our GridView use this DataTemplateSelector and create the two templates it selects. Modify the GridView code to this:&lt;/p&gt;
&lt;p class="code"&gt;&amp;lt;GridView ItemsSource="{Binding ItemsWithHeaders}" ItemTemplateSelector="{StaticResource FilmItemOrHeaderSelector}" /&amp;gt;&lt;/p&gt;
&lt;p class="code"&gt;The selector and templates need to be included in the page's resource dictionary:&lt;/p&gt;
&lt;p class="code"&gt;&amp;lt;Page.Resources&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;ResourceDictionary&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;DataTemplate x:Key="FilmHeader"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Border Margin="6" Width="250" Height="100"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;TextBlock Text="{Binding Title}" Foreground="GreenYellow" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Border&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/DataTemplate&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;DataTemplate x:Key="FilmItem"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Border Margin="6" Width="250" Height="100" Background="DarkSlateGray"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;StackPanel&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;HyperlinkButton NavigateUri="{Binding Link}"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;TextBlock Text="{Binding Title}" Style="{StaticResource ItemTextStyle}"/&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/HyperlinkButton&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;TextBlock Text="{Binding Year}" Style="{StaticResource CaptionTextStyle}" Padding="20,0,0,0" /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/StackPanel&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Border&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/DataTemplate&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;selectors:ItemOrHeaderSelector &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x:Key="FilmItemOrHeaderSelector" &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Item="{StaticResource FilmItem}" &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Group="{StaticResource FilmHeader}" /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/ResourceDictionary&amp;gt; &lt;br /&gt;&amp;lt;/Page.Resources&amp;gt;&lt;/p&gt;
&lt;p class="code"&gt;If all you want is a GridView showing groups with inline headers then we're done. Read on if you want to add semantic zoom.&lt;/p&gt;
&lt;p class="code"&gt;&lt;strong&gt;Source code:&lt;/strong&gt; &lt;a href="https://bitbucket.org/NogginBox/winrt-examples/src/d0f58f6d9796/InlineGroupHeaderApp/InlineGroupHeaderApp"&gt;Source code for step 2&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Step 3 - Adding semantic zoom and linking the two views&lt;/h2&gt;
&lt;p&gt;The nice thing about a GridView using the grouped style is that semantic zoom just works. As we're not using the build in groups feature we need to do a little bit extra, but it's not too hard.&lt;/p&gt;
&lt;p&gt;First we add the SemanticZoom control to MainPage.xaml:&lt;/p&gt;
&lt;p&gt;&amp;lt;SemanticZoom x:Name="FilmZoom"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;SemanticZoom.ZoomedOutView&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GridView ItemsSource="{Binding Groups}" ItemTemplate="{StaticResource GroupTemplate}" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/SemanticZoom.ZoomedOutView&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;SemanticZoom.ZoomedInView&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GridView ItemsSource="{Binding ItemsWithHeaders}" ItemTemplateSelector="{StaticResource FilmItemOrHeaderSelector}" SelectionMode="None" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/SemanticZoom.ZoomedInView&amp;gt;&lt;br /&gt;&amp;lt;/SemanticZoom&amp;gt;&lt;/p&gt;
&lt;p&gt;Now we just need to link up the zoomed in and zoomed out view using the ViewChangeStarted event:&lt;/p&gt;
&lt;p class="code"&gt;FilmZoom.ViewChangeStarted += OnZoomViewChanged;&lt;/p&gt;
&lt;p&gt;And here is the code for that event:&lt;/p&gt;
&lt;p class="code"&gt;private static void OnZoomViewChanged(object sender, SemanticZoomViewChangedEventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; if (e.SourceItem == null) return;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; if (e.SourceItem.Item.GetType() == typeof(Film))&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sourceFilm = (Film)e.SourceItem.Item;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fontsGroup = App.FilmData.GetGroupFor(sourceFilm);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.DestinationItem = new SemanticZoomLocation { Item = fontsGroup };&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; e.DestinationItem = new SemanticZoomLocation { Item = e.SourceItem.Item };&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Now we've implemented semantic zoom and our two views are linked.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Source code:&lt;/strong&gt; &lt;a href="https://bitbucket.org/NogginBox/winrt-examples/src/cacbeeeb0f86/InlineGroupHeaderApp/InlineGroupHeaderApp"&gt;Source code for step 3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That's pretty much everything, but what if you've got some empty groups. My GroupCollection&amp;lt;T&amp;gt; class doesn't add these to the ItemsWithHeaders collection so they don't get shown in the zoomed in view. They are included in Groups so they'll be show in the zoomed out view. You might want to show them differently, which we'll cover in step 4.&lt;/p&gt;
&lt;h2&gt;Step 4 - Zoomed out view with different template for empty groups&lt;/h2&gt;
&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/inline-headers2.png" alt="Semantic zoomed out view" height="332" width="550" /&gt;&lt;/p&gt;
&lt;p&gt;My CollectionGroup&amp;lt;T&amp;gt; class will only create groups that are used by the items in it, but you can initialise it with a list of group names like this:&lt;/p&gt;
&lt;p class="code"&gt;var films = CreateFilms();&lt;br /&gt;var yearHeaders = Enumerable.Range(1912, 100).Select(t =&amp;gt; t.ToString());&lt;br /&gt;FilmData = new GroupCollection&amp;lt;Film&amp;gt;(yearHeaders, f =&amp;gt; f.Year.ToString());&lt;br /&gt;FilmData.AddItems(films);&lt;/p&gt;
&lt;p&gt;We now have some empty groups so we can create a new DataTemplateSelector that chooses different templates based on whether the group is empty or not. Here is the template selector:&lt;/p&gt;
&lt;p class="code"&gt;class EmptyOrFullSelector : DataTemplateSelector&lt;br /&gt; {&lt;br /&gt;&amp;nbsp; public DataTemplate Full { get; set; }&lt;br /&gt;&amp;nbsp; public DataTemplate Empty { get; set; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var groupItem = item as Group&amp;lt;Film&amp;gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var isEmpty = groupItem == null || groupItem.IsEmpty;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Disable empty items&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectorItem = container as SelectorItem;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selectorItem != null)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectorItem.IsEnabled = !isEmpty;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (!isEmpty) ? Full : Empty;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Add this selector to the zoomed out GridView:&lt;/p&gt;
&lt;p&gt;&amp;lt;SemanticZoom.ZoomedOutView&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;GridView ItemsSource="{Binding Groups}" ItemTemplateSelector="{StaticResource GroupTemplate}" /&amp;gt;&lt;br /&gt;&amp;lt;/SemanticZoom.ZoomedOutView&amp;gt;&lt;/p&gt;
&lt;p&gt;Now add the selector and templates to the page's resource dictionary:&lt;/p&gt;
&lt;p&gt;&amp;lt;DataTemplate x:Key="GroupTemplate"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;Border Margin="6" Width="100" Height="100" Background="GreenYellow"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Title}" Foreground="Black" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/Border&amp;gt;&lt;br /&gt;&amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;&amp;lt;DataTemplate x:Key="EmptyGroupTemplate"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;Border Margin="6" Width="100" Height="100" Background="LightGray"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Title}" Foreground="Black" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/Border&amp;gt;&lt;br /&gt;&amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;&amp;lt;selectors:EmptyOrFullSelector&lt;br /&gt;&amp;nbsp; x:Key="FilmGroupEmptyOrFullSelector"&lt;br /&gt;&amp;nbsp; Empty="{StaticResource EmptyGroupTemplate}"&lt;br /&gt;&amp;nbsp; Full="{StaticResource GroupTemplate}" /&amp;gt;&lt;/p&gt;
&lt;p&gt;And we're done.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Source code:&lt;/strong&gt; &lt;a href="https://bitbucket.org/NogginBox/winrt-examples/src/a413fe0c4c08/InlineGroupHeaderApp/InlineGroupHeaderApp"&gt;Source code for step 4&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Step 5 - ?&lt;/h2&gt;
&lt;p&gt;There's one last thing that I would like to do, but I've not figured out how yet. Sometime a header is the bottom item of a column and this doesn't look great. It would be nice to find a way to make sure that a header always has an item below it. I think the best way to do this would be to insert empty items in the list to stop headers being at the bottom of a column. I'd also like it to still work if items were removed from the list. Any ideas?&lt;/p&gt;</description><pubDate>Sun, 09 Sep 2012 22:36:26 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/gridview-with-inline-group-headers</guid></item><item><title>Drawing TEDx Bradford</title><link>http://www.nogginbox.co.uk:80/blog/drawing-tedx-bradford</link><description>&lt;p&gt;I went to &lt;a href="http://www.tedxbradford.com/lifeonline/"&gt;TEDx Bradford&lt;/a&gt; on Friday. I kept visual notes of the talks using &lt;a href="http://itunes.apple.com/gb/app/paper-by-fiftythree/id506003812"&gt;Paper for iPad&lt;/a&gt;. I got better at using Paper with practice so my notes start to look better in the later talks. I had to leave a little bit early, so I didn't get to make notes on all the talks.&lt;/p&gt;
&lt;h2&gt;Tim O&amp;rsquo;Reilly&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPEW6bCEAAVii4.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;h2&gt;Jane MacDonald, Tales of Things &amp;amp; Electronic Memory&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPG0BoCAAA3owo.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPJ4a2CEAIXQDz.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;h2&gt;Mark Graham, Internet &amp;amp; information geographies&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPMBzlCQAIi8JC.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPPDniCIAEHZgf.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;h2&gt;Maureen Pennock, Archiving the Web&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPUbc_CAAAARkg.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;h2&gt;Dominic Smith, Open source, Art &amp;amp; Wizardlyness&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPZ57PCIAAvuAs.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPdw6eCAAA0LE8.jpg" height="412" width="550" /&gt;&lt;/p&gt;
&lt;h2&gt;Dr Kieran Fenby-Hulse, The Modern Mixtape&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://p.twimg.com/ApPgSDBCAAAb0wI.jpg" height="412" width="550" /&gt;&lt;/p&gt;</description><pubDate>Sat, 08 Sep 2012 08:57:15 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/drawing-tedx-bradford</guid></item><item><title>My first Orchard Widget</title><link>http://www.nogginbox.co.uk:80/blog/my-first-orchard-widget</link><description>&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/rain.jpg" alt="Photo of me in the rain" height="225" width="300" /&gt;&lt;/p&gt;
&lt;p&gt;When I first learnt ASP.NET I wrote a control for my website that told my visitors the weather I was currently experiencing. It was just a simple, fun project to help me learn. Now I&amp;rsquo;m using Orchard for my site I still want my visitors to know the weather I am experiencing. So this seemed like the ideal project for my first Orchard CMS module.&lt;/p&gt;
&lt;p&gt;I wanted the module to display a widget that could be placed anywhere using Orchard&amp;rsquo;s new Widget Manager. At this point in time the documentation for making widgets isn&amp;rsquo;t complete and I&amp;rsquo;ve hit a few stumbling blocks along the way.&lt;/p&gt;
&lt;p&gt;The first thing to realise is that a widget is just a content part with some simple extra bits, and there is a good &lt;a href="http://www.orchardproject.net/docs/Writing-a-content-part.ashx"&gt;tutorial on making content parts&lt;/a&gt; on the Orchard website. The simple extra bits are contained in the module&amp;rsquo;s data migration. This registers your content part as a widget when it is installed. The map module in the Modules gallery is an excellent source of code samples for this. It contains a simple Map content type which is also registered as a widget.&lt;/p&gt;
&lt;p&gt;The next problem I hit was an unhelpful error message when I tried to install an early version of my module. The message just said &amp;lsquo;Some features need to be upgraded&amp;rsquo;. This was strange as this was the first time I&amp;rsquo;d tried to install it. I got some very &lt;a href="http://orchard.codeplex.com/Thread/View.aspx?ThreadId=232904"&gt;useful advice on the discussion forum&lt;/a&gt; and finally found there was a problem with my data migration. I&amp;rsquo;d tried to use an unsigned integer and this was not supported by SQL Server.&lt;/p&gt;
&lt;p&gt;A content part has a driver. This is a bit like a controller, but just for a part of the page. My widget displays the current weather based on a feed provided by &lt;a href="http://backstage.bbc.co.uk/"&gt;BBC Backstage&lt;/a&gt;. The driver is the bit that queries this feed, populates a model and then passes this to view.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s the display part of the driver. The driver also controls editing the widget and mine allows the site administrator to change the place where the current weather is shown for.&lt;/p&gt;
&lt;p&gt;When my module was finished and I wanted to deploy it on my real site I came across the dreaded &amp;lsquo;Some features need to be upgraded&amp;rsquo; message again. It took me a while to work out that I hadn&amp;rsquo;t set all the permissions right on my live server. The IIS_IUSRS account needs write access to the App_Data folder and the data base user needs db_ddladmin rights so it can alter the data base. Mine didn&amp;rsquo;t have these because I&amp;rsquo;d moved the files and database from my test server. If I&amp;rsquo;d installed Orchard on the live server I would have realised earlier that these permissions were missing.&lt;/p&gt;
&lt;p&gt;As I&amp;rsquo;m querying a web service and the data doesn&amp;rsquo;t change very often it makes sense to cache the response I&amp;rsquo;m getting. This is next on my list once I&amp;rsquo;ve figured out how Orchard Caching works.&lt;/p&gt;
&lt;p&gt;You can see this widget on my &lt;a href="/"&gt;homepage&lt;/a&gt;. I will probably leave it at this stage, but if I was to continue work on it, I would turn it into a more generic weather forecast module. Perhaps a holiday camp site would find it useful to display the forecast for their camps. I also like the idea of changing the CSS for the whole site based on the weather. I could have a sunny and cloudy site design that changed depending on the weather.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve got some more module ideas for Orchard that I&amp;rsquo;m hoping to put in module gallery. Now I get the basics there&amp;rsquo;s nothing stopping me.&lt;/p&gt;</description><pubDate>Sat, 08 Sep 2012 08:55:49 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/my-first-orchard-widget</guid></item><item><title>Mmmmm, Easter egg</title><link>http://www.nogginbox.co.uk:80/blog/mmmmm-easter-egg</link><description>&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/easter-egg.jpg" alt="Picture of cracked open chocolate egg." height="225" width="300" /&gt;&lt;/p&gt;
&lt;p&gt;For a long time I've felt the Easter eggs you buy in the shops were missing something. There's never enough chocolate, and when I was a kid, the chocolate treats used to be inside.&lt;/p&gt;
&lt;p&gt;This year I decided to make my own. I made a mould out of paper mache and cling-film and coated the inside with chocolate, a lot of chocolate. The finished product was fantastic. It looks a bit like a dinosaur egg, which wasn't quite what I intended, but I think it adds to its charm.&lt;/p&gt;
&lt;p&gt;Next year, I might try and perfect the mould to get a smoother outside. I might also try and make it twice as big. Mmmmmmmmm, chocolate!&lt;/p&gt;</description><pubDate>Sat, 08 Sep 2012 08:55:01 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/mmmmm-easter-egg</guid></item><item><title>Making a noise at Thwaite Mill</title><link>http://www.nogginbox.co.uk:80/blog/making-a-noise-at-thwaite-mill</link><description>&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/thwaite-mill.jpg" alt="Photo of wheels and cogs in the mill" height="225" width="300" /&gt;&lt;/p&gt;
&lt;p&gt;I've just recently started leading another art project. This time I'm working with the adult group from &lt;a href="http://www.pyramid-of-arts.org.uk/"&gt;Pyramid of Arts&lt;/a&gt;. The BBC have very kindly leant us some sound recording equipment. We've used this to record some sounds and we're going to splice them together into something musical.&lt;/p&gt;
&lt;p&gt;We spent the first few weeks of the project exploring sound. Making it, listening to it, drawing it and recording it. We've just got back from a sound recording trip to &lt;a href="http://www.leeds.gov.uk/page.aspx?egmsIdentifier=A1CA27884AF8613C80256E1B00560F5E"&gt;Thwaite Mill&lt;/a&gt;. We recorded a huge array of sounds made by the mill and pretty much anything else we could find that made sounds.&lt;/p&gt;
&lt;p&gt;So, now we've got all our sounds, we just need to put them together into something musical. The difficult part is not going to be finding good sounds, it's going to be choosing the best ones from the hundreds we've got.&lt;/p&gt;</description><pubDate>Sat, 08 Sep 2012 08:54:28 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/making-a-noise-at-thwaite-mill</guid></item><item><title>A quick project. Is there a strike?</title><link>http://www.nogginbox.co.uk:80/blog/is-there-a-strike</link><description>&lt;p&gt;&lt;img src="/Media/Default/Blogpost/blog/strike.png" alt="Is there a strike" height="243" width="300" /&gt;&lt;/p&gt;
&lt;p&gt;This was just a little Sunday project inspired by the number of strikes we&amp;rsquo;ve been having and the &lt;a href="http://isitchristmas.com"&gt;isitchristmas.com website&lt;/a&gt;. &lt;em&gt;Isthereastrike.co.uk&lt;/em&gt; lists organisations that have been experiences strikes and then has a simple yes/no page for each one.&lt;/p&gt;
&lt;p&gt;As the site is very simple it was also a nice test bed for a few things I&amp;rsquo;ve been learning about lately. It runs on ASP.NET MVC (it may be the simplest MVC site ever), has an Entity Framework data model keeping track of the strikes and has a Dynamic Data admin section.&lt;/p&gt;
&lt;p&gt;There is a small unit test for the project using xUnit and I&amp;rsquo;m going to try using an IOC container to allow me to test the data filtering. It&amp;rsquo;s overkill, but a good way to learn.&lt;/p&gt;
&lt;p&gt;Perhaps people will even find it useful, but I&amp;rsquo;m really hoping that all the strikes (particularly Leeds Bin Strike) will be sorted out soon.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The Leeds bin strike was sorted. However the administrative burden of keeping strike information updated proved a bit too much for me. I never realised strikes change so often. So the site's not currently maintained, and probably won't be unless someone fancies taking it on.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; Isthereastrike.co.uk ran its course and I didn't renew the domain.&lt;/p&gt;</description><pubDate>Sat, 08 Sep 2012 08:53:30 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/is-there-a-strike</guid></item><item><title>Our sculpture on Google Earth</title><link>http://www.nogginbox.co.uk:80/blog/our-sculpture-on-google-earth</link><description>&lt;p&gt;I've made a 3D model of Pyramid of Arts' sculpture at Thwaite Mill. Pyramid of Arts is an arts charity bringing together artists with and without learning disabilities to work on large scale arts projects.&lt;/p&gt;
&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/thwaite-sculpture.jpg" alt="Photo of the real sculpture" height="225" width="300" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/thwaite-sculpture-model.jpg" alt="Picture of the model" height="225" width="300" /&gt;&lt;/p&gt;
&lt;p&gt;I wanted to have an experiment with creating 3D models in &lt;a href="http://sketchup.google.com/"&gt;Sketch-up&lt;/a&gt; and see if I could get it added to &lt;a href="http://earth.google.com/"&gt;Google Earth&lt;/a&gt;. Google Earth is a program by Google that displays pictures of the whole world and 3D models of some of it.&lt;/p&gt;
&lt;p&gt;Pyramid made this sculpture about 3 years ago and had just finished it when I joined. It's Pyramid's first permanent work, so it would be really nice if it could be added to Google Earth. Hopefully more people will get to enjoy it that way.&lt;/p&gt;
&lt;p&gt;I've submitted it to Google Earth, but it needs to be popular to get added so everyone can see it. Please &lt;a href="http://sketchup.google.com/3dwarehouse/details?mid=1155ee86c9c106589c8c684261f49f5d"&gt;visit it and vote for it&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://sketchup.google.com/3dwarehouse/details?mid=1155ee86c9c106589c8c684261f49f5d"&gt;Thwaite Mill Sculpture for Google Earth&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information about Pyramid of Arts and this particular sculpture project, you may find the following links interesting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.pyramid-of-arts.org.uk/"&gt;Pyramid of Arts website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pyramid-of-arts.org.uk/MODULES/GALLERY/pyramid_GALLERYmoduleASP/GALLERYMOD_item.asp?imagename=joes%20pics%20016.jpg&amp;amp;amp;amp;sectionid=1"&gt;Photo gallery of the group making the sculpture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pyramid-of-arts.org.uk/MODULES/GALLERY/pyramid_GALLERYmoduleASP/GALLERYMOD_item.asp?imagename=Lead_artists_Joe_Cooke_and_Cath_Murphy(1).jpg&amp;amp;amp;amp;sectionid=4"&gt;Photo gallery of the unveiling of the sculpture&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Sat, 08 Sep 2012 08:50:00 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/our-sculpture-on-google-earth</guid></item><item><title>Happy 21st for Pyramid of Arts at Light Night Leeds</title><link>http://www.nogginbox.co.uk:80/blog/pyramid-of-arts-at-light-night</link><description>&lt;p&gt;Here is a guest post I wrote for The Guardian Leeds Blog:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.guardian.co.uk/leeds/2010/oct/03/pyramid-of-arts-light-night-leeds"&gt;Happy 21st for Pyramid of Arts at Light Night Leeds&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 07 Sep 2012 09:30:17 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/pyramid-of-arts-at-light-night</guid></item><item><title>Videos about Orchard</title><link>http://www.nogginbox.co.uk:80/blog/videos-about-orchard</link><description>&lt;p&gt;Bradley Millington recently talked at Tech Ed Europe about Orchard. His first talk introduced Orchard CMS and its features. In the second he went into more depth about how to extend Orchard. If you've not heard of Orchard before these two videos are a great way to get up to speed.&lt;/p&gt;
&lt;h2&gt;Building websites with Orchard&lt;/h2&gt;
&lt;p&gt;&lt;object type="application/x-silverlight-2" data="data:application/x-silverlight-2," height="310" width="550"&gt;&lt;param name="source" value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" /&gt;&lt;param name="initParams" value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/web303.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" /&gt;&lt;param name="background" value="#00000000" /&gt;&lt;param name="minRuntimeVersion" value="3.0.50106.0" /&gt;&lt;param name="windowless" value="true" /&gt;&lt;param name="enableGPUAcceleration" value="true" /&gt;&lt;param name="autoUpgrade" value="true" /&gt;&lt;a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;amp;v=3.0.50106.0"&gt; &lt;img src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" /&gt; &lt;/a&gt; &lt;/object&gt;&lt;/p&gt;
&lt;p&gt;View and download &lt;a href="http://www.msteched.com/2010/Europe/WEB303"&gt;Building websites with Orchard files&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Deep dive into Orchard extensibility&lt;/h2&gt;
&lt;p&gt;&lt;object type="application/x-silverlight-2" data="data:application/x-silverlight-2," height="310" width="550"&gt;&lt;param name="source" value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" /&gt;&lt;param name="initParams" value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/web310.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" /&gt;&lt;param name="background" value="#00000000" /&gt;&lt;param name="minRuntimeVersion" value="3.0.50106.0" /&gt;&lt;param name="windowless" value="true" /&gt;&lt;param name="enableGPUAcceleration" value="true" /&gt;&lt;param name="autoUpgrade" value="true" /&gt;&lt;a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;amp;v=3.0.50106.0"&gt; &lt;img style="border-style: none;" src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" /&gt;&lt;/a&gt; &lt;/object&gt;&lt;/p&gt;
&lt;p&gt;View and download &lt;a href="http://www.msteched.com/2010/Europe/WEB310"&gt;Deep dive into Orchard extensibility files&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 07 Sep 2012 09:29:43 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/videos-about-orchard</guid></item><item><title>Be in the Simpsons</title><link>http://www.nogginbox.co.uk:80/blog/be-in-the-simpsons</link><description>&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/SimpsonMe.gif" alt="Picture of Richy Simpson" height="300" width="300" /&gt;&lt;/p&gt;
&lt;p&gt;This is my favourite recent discovery. A fantastic site for the new Simpsons Movie. The site is so good that I may go and see the film again.&lt;/p&gt;
&lt;p&gt;The site is full of brilliant ideas and lots of cool games to play.&lt;/p&gt;
&lt;p&gt;The part that has captured my imagination most is the create your own Simpsons character bit. Once you've made one, there are lots of ways to share it with your friends. What a brilliant piece of personalised viral marketting.&lt;/p&gt;
&lt;p&gt;Here is my attempt, although I couldn't quite get the hair right.&lt;/p&gt;</description><pubDate>Fri, 07 Sep 2012 09:26:34 GMT</pubDate><guid isPermaLink="true">http://www.nogginbox.co.uk:80/blog/be-in-the-simpsons</guid></item></channel></rss>