Skip to content

Instantly share code, notes, and snippets.

@bleroy
Created April 2, 2015 00:25
Show Gist options
  • Save bleroy/4629740939b67b5c2351 to your computer and use it in GitHub Desktop.
Save bleroy/4629740939b67b5c2351 to your computer and use it in GitHub Desktop.
CodePlex Issue #16552 Plain Text Attachments
<rss version="2.0"><channel><title>Richard's blog</title><link>/blog</link><description>Richard's blog</description><item><title>Sending XML to an ASP.NET MVC Action Method Argument</title><link>/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;</description><pubDate>2010-07-15T18:30:39</pubDate><guid isPermaLink="true">/blog/xml-to-asp.net-mvc-action-method</guid></item><item><title>Microsoft Webcamps</title><link>/blog/webcamps2010</link><description>&lt;p&gt;Last weekend I went to &lt;a href="http://www.webcamps.ms/"&gt;Microsoft Webcamps&lt;/a&gt; London: a two day event mainly about ASP.NET MVC and a little bit about the Entity Framework. It was a two day event mainly aimed at Microsoft developers who'd not used .NET MVC before. I've done a few MVC projects now, but there's always more to learn and it's always good to meet other people doing similar stuff to you.&lt;/p&gt;
&lt;p&gt;The first day was a series of talks by &lt;a href="http://weblogs.asp.net/jgalloway/"&gt;Jon Galloway&lt;/a&gt; and &lt;a href="http://www.arrabiata.net/unternehmen.php"&gt;Christian Wenz&lt;/a&gt;. The talks were excellent and even though they covered a lot of things I already knew, I still found out lots I didn't and made lots of notes.&lt;/p&gt;
&lt;p&gt;The second day was going to be more challenging. At the end of the first day some people pitched ideas for simple one day web projects. As a group we then chose our favourites and formed into small teams to implement them. As a freelancer I don't often get to work in teams so I was looking forward to this. I was a bit worried though about what we'd be able to get done in a day, particularly as I was the only one in my team who had used .NET MVC before.&lt;/p&gt;
&lt;p&gt;Our project idea came from Jasmin. We were going to create Stuff Exchange, a simple site for listing items you wanted to give away. A bit like &lt;a href="http://www.ilovefreegle.org/"&gt;Freegle&lt;/a&gt; or &lt;a href="http://www.freecycle.org/"&gt;Freecycle&lt;/a&gt;. This was a nice project and it suited our range of skills. One of the nice and slightly unique features of our website was using the &lt;a href="http://www.smugmug.com/"&gt;Smug Mug&lt;/a&gt; API to show photo libraries with each item. This was Doug's idea. One of the nice things about this was Smug Mug dealt with all the image resizing. What we managed to do with this in a day was pretty good, but given a little bit more time we could have done something really impressive with it.&lt;/p&gt;
&lt;p&gt;&lt;img src="/Media/Default/blogpost/blog/webcamps/stuff-exhange-1.png" alt="Screenshot of Stuff Exchange " /&gt;&lt;/p&gt;
&lt;p&gt;As the time to present our project approached we realised we'd need to add some things to our site we wanted to give away. As we were in Microsoft's plush London offices the obvious thing was to try and give away their furniture and anything else that wasn't nailed down, including Jon Galloway.&lt;/p&gt;
&lt;p&gt;&lt;img src="/Media/Default/blogpost/blog/webcamps/stuff-exchange-2.png" alt="Typical stuff exchange advert offering unwanted old programmers" /&gt;&lt;/p&gt;
&lt;p&gt;We should have been first to present, but as Chistian came to collect us disaster struck. We'd just combined everyone's last set of changes and it wouldn't build. Christian kindly pretended not to be able to find us, so we got a chance to fix everything. Unfortunatley we missed several other group's presentations, including this one about &lt;a href="http://www.thetechnologystudio.co.uk/technologyblog/index.php/2010/06/microsoft-webcamps-london/"&gt;transport pooling when ash clouds are about&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After everyone had presented Jon and Christian sauntered off to judge our efforts. We must have done something right as we came joint first with this group who had an excellent &lt;a href="http://www.kakariki.co.uk/blogs/WebCampsLondon.aspx"&gt;idea about swapping food&lt;/a&gt;. We all got very nice bags as a prize. I'm also wondering if I can now call myself a prize winning Microsoft developer. Surely it's just one step away from being a &lt;acronym title="Microsoft Valued Professional"&gt;MVP&lt;/acronym&gt;.&lt;/p&gt;</description><pubDate>2010-06-11T00:02:13</pubDate><guid isPermaLink="true">/blog/webcamps2010</guid></item><item><title>Newcastle to London bike challenge</title><link>/blog/newcastle-london-bike-challenge</link><description>&lt;p&gt;My friend &lt;a href="http://www.scrambledheads.co.uk/"&gt;Dave&lt;/a&gt; and some of his colleagues from &lt;a href="http://www.think.eu/"&gt;TH_NK&lt;/a&gt; are doing a very impressive bike challenge. They're cycling from Newcastle to London in &lt;a href="http://www.justgiving.com/newcastle-to-london-cycle-event"&gt;aid of Breast Cancer Campaign&lt;/a&gt;. They're going to do this over 5 days.&lt;/p&gt;
&lt;p&gt;Inspired by this I've decided to do the same, well sort of. I'm going to cycle the same distance, but over 30 days and I'm going to cycle where ever I feel like. I'm just doing this for fun, but if you feel like sponsoring anyone, please &lt;a href="http://www.justgiving.com/newcastle-to-london-cycle-event"&gt;sponsor Dave and his gang&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is also partly to make full use of my new Garmin Edge 705 cycle GPS. I got it on Friday and have cyled loads since I got it. As you can see from this map, I'm well on my way to London:&lt;/p&gt;
&lt;p&gt;&lt;a title="View this map on Google maps" href="http://maps.google.co.uk/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=104789774385499544558.000485cb9c78af6f853c1&amp;amp;ll=53.343993,-0.878906&amp;amp;spn=10.859707,36.628418&amp;amp;z=6"&gt;&lt;img src="/Media/blogpost/blog/map.png" alt="Map showing Newcastle to London route" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It also tells me how many calories I've used on these rides. A calory doesn't mean much really, so I'm using a different unit.&lt;/p&gt;
&lt;p&gt;&lt;img src="/Media/blogpost/blog/tart.png" alt="bakewell tart" /&gt;The bakwell tart has 183 callories in it.&lt;/p&gt;
&lt;p&gt;So far I have cycled off 25.4 bakewells. Not as many as I'd hoped, but pretty good going.&lt;/p&gt;
&lt;h2&gt;Update&lt;/h2&gt;
&lt;p&gt;I completed the challenge on Sunday 30 May 2010. I cycled &lt;span id="reportContent"&gt;&lt;span class="reportValueColumn"&gt;323.66 miles in &lt;/span&gt;&lt;/span&gt;&lt;span id="reportContent"&gt;&lt;span class="reportValueColumn"&gt;27 hours and 53 minutes. I burned of 90 bakewell tarts worth of callories.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description><pubDate>2010-05-05T14:40:40</pubDate><guid isPermaLink="true">/blog/newcastle-london-bike-challenge</guid></item><item><title>Sketching logos</title><link>/blog/sketching-logos</link><description>&lt;p&gt;I've been thinking about the logo for my new site. Here are a few of my ideas:&lt;/p&gt;
&lt;p&gt;&lt;img src="/Media/blogpost/blog/logo-ideas.png" alt="logo ideas for NogginBox" /&gt;&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;</description><pubDate>2010-04-29T22:26:00</pubDate><guid isPermaLink="true">/blog/sketching-logos</guid></item><item><title>Running on alpha</title><link>/blog/running-on-alpha</link><description>&lt;p&gt;This is going to be my new web site. Nogginbox.co.uk will be the new online home of Richard Garside. But, it's not quite ready yet.&lt;/p&gt;
&lt;p&gt;This site is running on a new CMS called &lt;a href="http://www.orchardproject.net/"&gt;Orchard&lt;/a&gt;. Orchard uses ASP.NET &lt;abbr title="Model View Controller"&gt;MVC&lt;/abbr&gt;, a server side technology that I've been using a lot lately and have found to be very effective. Orchard is only in alpha at the moment, so it's really early days. It's Open Source and being developed by Microsoft; strange, but true.&amp;nbsp; I think it shows a lot of potential and I'm hoping to be able to use it for lots of projects when it's ready.&lt;/p&gt;
&lt;p&gt;It's also early days for Noggin Box. We're only at Noggin Box alpha at the moment. Noggin Box is going to be my new home on the web. My old website &lt;a href="http://www.richardsprojects.co.uk"&gt;richardsprojects.co.uk&lt;/a&gt;, was created before I went freelance. It was a place for my projects, but it doesn't really seem to fit anymore. Plus, it sometimes confuses clients. It's going to stay for a while, but once this site is ready it will take over and I'll start moving content over.&lt;/p&gt;
&lt;p&gt;I'm not completely sure what I want Noggin Box to be yet. It will be my personal site and also a site for my freelance work. Hopefully I can strike a nice ballance between the two.&lt;/p&gt;
&lt;p&gt;Anyway, first things first. I'm going to need a logo.&lt;/p&gt;</description><pubDate>2010-04-15T00:26:00</pubDate><guid isPermaLink="true">/blog/running-on-alpha</guid></item></channel></rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment