<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Coding in the cloud</title>
	<atom:link href="http://joeriks.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://joeriks.com</link>
	<description>Jonas Eriksson (@joeriks) about web programming</description>
	<lastBuildDate>Wed, 22 May 2013 13:19:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='joeriks.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/de130fb9c93626140637e0ebadf04954?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Coding in the cloud</title>
		<link>http://joeriks.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://joeriks.com/osd.xml" title="Coding in the cloud" />
	<atom:link rel='hub' href='http://joeriks.com/?pushpress=hub'/>
		<item>
		<title>The right amount of separation of concerns in Umbraco Razor?</title>
		<link>http://joeriks.com/2013/05/22/the-right-amount-of-separation-of-concerns-in-umbraco-razor/</link>
		<comments>http://joeriks.com/2013/05/22/the-right-amount-of-separation-of-concerns-in-umbraco-razor/#comments</comments>
		<pubDate>Wed, 22 May 2013 10:19:34 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[Razor]]></category>
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=3900</guid>
		<description><![CDATA[We hear it&#8217;s a good thing to separate view code from logic, and also to separate code into controller, model and view files. What does that actually mean? And why is that a good thing? Also does this mean we need to create model and controller class files for all our Umbraco Razor scripts? Consider [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3900&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>We hear it&#8217;s a good thing to separate view code from logic, and also to separate code into controller, model and view files. What does that actually mean? And why is that a good thing? Also does this mean we need to create model and controller class files for all our Umbraco Razor scripts?</strong></p>
<p>Consider a plain read-only, HTML rendering razor script with a good amount of HTML, over a page long. Nothing unusual and it works perfectly fine as it is:</p>
<p><em>The code in this post is for Umbraco MVC (4.10+), but it&#8217;s concepts apply to all versions of Umbraco.</em></p>
<pre class="brush: plain; title: ; notranslate">
&lt;...lots of tags above this point...&gt;
&lt;div class=&quot;widget&quot;&gt;
    &lt;h4&gt;Recent Posts&lt;/h4&gt;
    &lt;ul&gt;
        @foreach (var blogPost in Umbraco.TypedContent(1068)
            .Children().Where(t=&gt;t.IsVisible()).OrderByDescending(t =&gt; t.CreateDate).Take(10))
        {
            &lt;li&gt;&lt;a href=&quot;@blogPost.Url&quot;&gt;@blogPost.Name&lt;/a&gt;
            @foreach (var item in blogPost.GetPropertyValue&lt;string&gt;(&quot;categories&quot;).Split(','))
                { &lt;span&gt;@item&lt;/span&gt; } &lt;/li&gt;
        }

    &lt;/ul&gt;
&lt;/div&gt;
&lt;...lots of tags beneath this point...&gt;
</pre>
<p><strong>A few things that can be made better here as I see it:</strong><br />
- The recent blog posts widget can be separated from the rest of the view into a reusable partial.<br />
- Intentions are not clear, what exactly are we trying to do with the chained methods?<br />
- Hard coded node number 1068, what if we change that one later?<br />
- Lot of C# mixed inside HTML makes both the HTML and the C# harder to read and problems harder to find.</p>
<p><strong>I suggest:</strong><br />
- Separate the code into a partial / separate razor script, give it a name and or a location that both describes the type of HTML it renders aswell as the content, for example &#8220;Widgets/RecentBlogPosts.cshtml&#8221;.<br />
- Move all C# code, but a bare minimum to the beginning of the script.<br />
- Specify the intent with the code being used by using good names, close to what it is described as on the actual site, or in the specification to the customer.<br />
- Stay away from hard coded node numbers.<br />
- Use C# Linq with Lambdas together with typed content. It&#8217;s a great syntax to express Umbraco content queries.<br />
- Use the .Select method, together with anonymous object to return exactly what you need, i.e. arrays and objects with only simple types. This will help you make clear what you need and will show you possible problems early.</p>
<p>Main cshtml:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;...lots of tags above this point...&gt;
@Html.Partial(&quot;Widgets/RecentBlogPosts&quot;)
&lt;...lots of tags beneath this point...&gt;
</pre>
<p>Partials/Widgets/RecentBlogPosts.cshtml:</p>
<pre class="brush: plain; title: ; notranslate">
@{
  var blogPostsRootNode = Model.Content.AncestorOrSelf(1);
  var recentBlogPosts = blogPostsRootNode.Children
    .Where(t=&gt;t.IsVisible())
    .OrderByDescending(t =&gt; t.CreateDate)
    .Take(10)
    .Select(p =&gt; new
    {
      p.Url, 
      p.Name, 
      Categories = 
        (p.GetPropertyValue&lt;string&gt;(&quot;categories&quot;) ?? &quot;&quot;)
          .Split(',')
    });
}
&lt;div class=&quot;widget&quot;&gt;
    &lt;h4&gt;Recent Posts&lt;/h4&gt;
    &lt;ul&gt;
        @foreach (var blogPost in recentBlogPosts)
        {                                                            
            &lt;li&gt;&lt;a href=&quot;@blogPost.Url&quot;&gt;@blogPost.Name&lt;/a&gt;
            @foreach (var category in blogPost.Categories)
            { &lt;span&gt;@category&lt;/span&gt; } &lt;/li&gt;
        }
    &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p><strong>What about separate model, view and controller classes?</strong><br />
The C# part of the script is building a ViewModel and, as such, could be placed in a C# model file, which in turn could be instantiated from the controller file firing up the view file.</p>
<p>We certainly could. And we could create a strongly typed view, and unit test the controller and the model. But would it really help us for this kinds of scripts that only show content &#8211; and does not deal with posted data?</p>
<p>I don&#8217;t think so. I found the approach described in this blog post be good amount of separation of concerns for views like this, I would very much like to hear experiences / opinions / examples from you, dear reader!</p>
<p>Happy coding</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/3900/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/3900/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3900&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/05/22/the-right-amount-of-separation-of-concerns-in-umbraco-razor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Some thoughts in between SPA projects</title>
		<link>http://joeriks.com/2013/05/02/some-thoughts-in-between-spa-projects/</link>
		<comments>http://joeriks.com/2013/05/02/some-thoughts-in-between-spa-projects/#comments</comments>
		<pubDate>Thu, 02 May 2013 07:37:49 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[Javascript / Html5]]></category>
		<category><![CDATA[SPA]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=3837</guid>
		<description><![CDATA[Yay, I just launched a project. It&#8217;s an internal single page application. On the server side a restful api built with ServiceStack serving json data and files (reports in PDF format and images) on a separate service-address (cross domain). And a client side application primarily for iPads, but built with Html5 for wider platform reach [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3837&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Yay, I just launched a project. It&#8217;s an internal single page application. On the server side a restful api built with ServiceStack serving json data and files (reports in PDF format and images) on a separate service-address (cross domain). And a client side application primarily for iPads, but built with Html5 for wider platform reach in the future.</strong></p>
<p>I&#8217;m currently trying to collect my thoughts about what I could have done better, and what to change for next project (or for refactoring the same project). One thing is the team. I was the developer for both client and server side + the UI&amp;UX designer (or rather &#8220;Bootstrap-devsigner&#8221;), and it would probably be better to be at least two persons for this kind of a project.</p>
<p>I&#8217;m rather pleased with the server side. ServiceStack makes it pretty easy to build a well structured, easy to maintain api. I&#8217;m using it together with the PetaPoco microorm, and legacy Poco&#8217;s. I would probably have choosen ServiceStack&#8217;s own MicroOrm if I was to redo it now. Since I ditched most of my legacy code anyways.</p>
<p>For the client side I&#8217;m pleased with the application, but the road there was a bit rocky. And the maintenance will be a bit harder than it should. So for the future I decided to find and choose a good client side framework.</p>
<p>Currently it looks like I&#8217;m going to choose AngularJs, which seems to get increasing popularity for each day, and I hear good things about it from pretty much everywhere. Plus I like the Angular team opinions and ideas. The main alternative is Backbone+Marionette. I already use some of backbone, and adding more of it + Marionette in iterations would probably be easier and more seamless than moving to Angular.</p>
<p>The client side language is Typescript, which I&#8217;m very happy with. The tools failed me a few times, nothing to write home about, but as it is still preview some problems was expected.</p>
<p>To be continued&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/3837/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/3837/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3837&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/05/02/some-thoughts-in-between-spa-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple module dependencies in Typescript</title>
		<link>http://joeriks.com/2013/03/30/simple-module-dependencies-in-typescript/</link>
		<comments>http://joeriks.com/2013/03/30/simple-module-dependencies-in-typescript/#comments</comments>
		<pubDate>Sat, 30 Mar 2013 18:25:31 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[TypeScript]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=3807</guid>
		<description><![CDATA[I&#8217;m not that convinced about the AMD module model. I rather use a simpler model which is also easily possible to achieve with typescript: use &#60;reference path&#8230;&#62; and compile to one file using the &#8211;out parameter. This is my application structure: main.ts (contains bootstrap startup code, reference to refs.ts) refs.ts (contains all references) modules&#8230; (contains [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3807&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>I&#8217;m not that convinced about the AMD module model. I rather use a simpler model which is also easily possible to achieve with typescript: use &lt;reference path&#8230;&gt; and compile to one file using the &#8211;out parameter.</strong></p>
<p>This is my application structure:</p>
<ul>
<li>main.ts (contains bootstrap startup code, reference to refs.ts)</li>
<li>refs.ts (contains all references)</li>
<li>modules&#8230; (contains only a single ref, to refs.ts)</li>
</ul>
<p>With this structure I run the instruction</p>
<pre class="brush: plain; title: ; notranslate">TSC refs.ts --out refs.js</pre>
<p>To get refs.js with all code from all referenced files. The refs.ts has all references in order (where necessary).</p>
<p>On deploy to the live site I simply minify the refs.js. </p>
<p>With this I only need to include &lt;script src=&#8221;refs.js&#8221;&gt; in my html.</p>
<p>I have the command to compile with &#8211;out as an external tool in Visual Studio. It would be nice to have it included in Web Essentials. I have disabled &#8220;create typescript on save&#8221; in my web essentials.</p>
<p><em>When I add a new module I need to remember to include it in refs.ts. After that it&#8217;s available globally in my application, and it will be included in main.js.</em></p>
<p>I also need to remember to re-build the solution (or run my custom tool) before I test run (parts of) the application after editing a file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/3807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/3807/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3807&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/03/30/simple-module-dependencies-in-typescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Execute Typescript</title>
		<link>http://joeriks.com/2013/03/30/execute-typescript/</link>
		<comments>http://joeriks.com/2013/03/30/execute-typescript/#comments</comments>
		<pubDate>Sat, 30 Mar 2013 09:11:11 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[TypeScript]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=3797</guid>
		<description><![CDATA[Want to easily execute Typescript? Cool thing is that TSC.exe (that comes with the Typescript installation) has a -e option to execute a file. So you can simply write: That command will compile the .ts to .js and execute that js. But we also like to be able to see some generated output. We can [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3797&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Want to easily execute Typescript?</strong></p>
<p>Cool thing is that TSC.exe (that comes with the Typescript installation) has a -e option to execute a file. So you can simply write:</p>
<pre class="brush: plain; title: ; notranslate">tsc -e somefile.ts</pre>
<p>That command will compile the .ts to .js and execute that js.</p>
<p>But we also like to be able to see some generated output. We can do that using the IO object that TSC creates for us. So let&#8217;s write a small ts file:</p>
<pre class="brush: plain; title: ; notranslate">declare var IO;
IO.print(&quot;hello world&quot;);</pre>
<p>Execute that one and you get &#8220;foo&#8221; in the console. Add the TSC -e command as an external tool to your Visual Studio and you have a useful shortcut to execute whatever ts you like.</p>
<p>A few useful functions within IO:</p>
<pre class="brush: plain; title: ; notranslate">IO.readFile(path:string):string;
IO.writeFile(path: string, contents: string): void;
IO.print(value:any):void;
IO.printLine(value:any):void;
IO.dir(path:string):string[];
IO.fileExists(path: string): bool;
</pre>
<p><a href="https://gist.github.com/joeriks/5276607">Full IO.d.ts in this gist. </a>(It&#8217;s auto-generated from the TypeScript source.) However &#8211; to use the d.ts (instead of the anonymous declare var IO;) you need to use a rather strange workaround currently (I expect it to be fixed soon?):</p>
<p><strong>Workaround to use io.d.ts in current version of Typescript</strong></p>
<p>Create an empty file to reference to (for example empty.ts). And add refs to that file aswell as to io.d.ts:</p>
<pre class="brush: plain; title: ; notranslate">/// &lt;reference path=&quot;empty.ts&quot;/&gt;
/// &lt;reference path=&quot;io.d.ts&quot;/&gt;
IO.print(&quot;hello world&quot;);</pre>
<p>Then execute it with the &#8211;out parameter:</p>
<pre class="brush: plain; title: ; notranslate">tsc -e somefile.ts --out somefile.js</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/3797/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/3797/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3797&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/03/30/execute-typescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Execute Javascript and Typescript within Visual Studio (and repl)</title>
		<link>http://joeriks.com/2013/03/27/execute-javascript-and-typescript-within-visual-studio-and-repl/</link>
		<comments>http://joeriks.com/2013/03/27/execute-javascript-and-typescript-within-visual-studio-and-repl/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 10:24:20 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=3649</guid>
		<description><![CDATA[Add PhantomJs as an external tool in Visual Studio and you have a really easy way to test run your javascript or typescript. You can even use it to play around with your code in a run-eval-print-loop (repl). First download PhantomJs from http://phantomjs.org/ and extract the folder. Copy the path. Next open Visual Studio and open [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3649&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Add PhantomJs as an external tool in Visual Studio and you have a really easy way to test run your javascript or typescript. You can even use it to play around with your code in a run-eval-print-loop (repl).</strong></p>
<p>First download PhantomJs from http://phantomjs.org/ and extract the folder. Copy the path.</p>
<p><a href="http://joeriks.files.wordpress.com/2013/03/phantom.png"><img class="wp-image-3770 alignright" alt="phantom" src="http://joeriks.files.wordpress.com/2013/03/phantom.png?w=283&#038;h=277" width="283" height="277" /></a></p>
<p>Next open Visual Studio and open the menu Tools &gt; External Tools</p>
<p>Add a new tool, give it the title Phantom&amp;Js (the ampersand makes you get an alt-shortcut for the letter J in the menu).</p>
<p>Paste the path to your phantomjs.exe as the command, add $(ItemFileName).js as the filename and add $(ItemDir) as the initial directory.</p>
<p>The explicit file extension (.js) makes typescript files work just fine, we cannot send the actual .ts file to PhantomJs, so we need the typescript compiled .js (use WebEssentials to compile to .js on save).</p>
<p>Check the &#8220;use output window&#8221; to get the console result there.</p>
<p>&nbsp;</p>
<p>Next add a small typescript file, sample code in this image, the actual test code is below the class, simply a value output&#8217;ed with console.log:<br />
<a style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;white-space:normal;" href="http://joeriks.files.wordpress.com/2013/03/console-ts.png"><img class=" wp-image-3768 alignright" alt="console ts" src="http://joeriks.files.wordpress.com/2013/03/console-ts.png?w=283&#038;h=241" width="283" height="241" /></a><br />
<span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;">Save the file. Now run the script from the Tools menu, or hit Alt+T,J .</p>
<p>You should get the result &#8220;hello Foo&#8221; in the output window.</span><br />
&nbsp;</p>
<p>phantom.exit(); is necessary to stop the execution. (Otherwise you can do that from the tools window.)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Add a REPL</strong><br />
Cool &#8211; but what if you like to play with the code in a console window? That is also possible since PhantomJs can be run in &#8220;REPL mode&#8221;. To do that, just create another external tool. With the following values:</p>
<p>Title : Phantom &amp;Repl<br />
Command : the path to phantomjs.exe<br />
Filename : empty<br />
InitialDirectory : $(ItemDir)</p>
<p>Do not check the use output window checkbox.</p>
<p>Now when you hit Alt+T+R you will get a command prompt with a phantomjs&gt; prompt.<br />
Try writing some code:</p>
<pre class="brush: plain; title: ; notranslate">
var foo = &quot;bar&quot;;
console.log(foo);
</pre>
<p>You should get the result &#8220;bar&#8221; inside the console.</p>
<p>You can also load your own scripts into the repl using the injectJs function:</p>
<pre class="brush: plain; title: ; notranslate">
phantom.injectJs(&quot;somelib.js&quot;);
var test = new MyAwesomeClass();
console.log(test.Whatever());
</pre>
<p>Check out the PhantomJs site for more information.</p>
<p>Note: I tried to get the Nuget Package Manager console to behave nicely with PhantomJs Repl, I could not do that as the output pipeline is not redirected to the console host, I guess a Powershell guru can fix that pretty easily (it does work in std PowerShell).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/3649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/3649/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=3649&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/03/27/execute-javascript-and-typescript-within-visual-studio-and-repl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>

		<media:content url="http://joeriks.files.wordpress.com/2013/03/phantom.png" medium="image">
			<media:title type="html">phantom</media:title>
		</media:content>

		<media:content url="http://joeriks.files.wordpress.com/2013/03/console-ts.png" medium="image">
			<media:title type="html">console ts</media:title>
		</media:content>
	</item>
		<item>
		<title>Web app woes: The database needs another field</title>
		<link>http://joeriks.com/2013/03/19/web-app-woes-the-database-needs-another-field/</link>
		<comments>http://joeriks.com/2013/03/19/web-app-woes-the-database-needs-another-field/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 09:12:54 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[SPA]]></category>
		<category><![CDATA[Web frameworks]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=2991</guid>
		<description><![CDATA[After a few weeks on client side coding. I realize I need another field in the database and in the DTO. So I need to leave my client side project and enter the dark dungeons of the server side. Add a field to the dev database. Add the property to the DTO. Deploy a new [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2991&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>After a few weeks on client side coding. I realize I need another field in the database and in the DTO. So I need to leave my client side project and enter the dark dungeons of the server side.</strong></p>
<p>Add a field to the dev database. Add the property to the DTO. Deploy a new version of the dev dll&#8217;s. And later repeat the same thing for the production database and deploy the dll scheduled at night to the production web server.</p>
<p>Small thing? Why complain? Well, when I&#8217;m into client side flow dev, I dislike leaving my comfort zone for quite some time just to do such a futile task.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/2991/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/2991/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2991&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/03/19/web-app-woes-the-database-needs-another-field/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Nice and simple Razor templates with the help of RenderPage and some dynamic sugar</title>
		<link>http://joeriks.com/2013/03/06/displaytemplates-in-mvc-and-webpages-razor/</link>
		<comments>http://joeriks.com/2013/03/06/displaytemplates-in-mvc-and-webpages-razor/#comments</comments>
		<pubDate>Wed, 06 Mar 2013 08:02:05 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[Razor]]></category>
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=2959</guid>
		<description><![CDATA[Besides saving global helpers in App_Code we have the option to use RenderPage (or Html.Partial) in Razor to reuse code globally. Both ways helps in making the HTML code DRY and well structured. But an important difference is a RenderPage file can be wherever we want, and changes are fluent (no app restarts). We do [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2959&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Besides saving global helpers in App_Code we have the option to use RenderPage (or Html.Partial) in Razor to reuse code globally.</strong></p>
<p>Both ways helps in making the HTML code DRY and well structured. But an important difference is a RenderPage file can be wherever we want, and changes are fluent (no app restarts). We do loose strongly typed parameters but I think that is a small price to pay when we are doing Html functions. We can still send a typed viewmodel to the rendered page. What about performance? As far as I understand we will get a performance hit the first time we call the page after a save (generally much quicker than a app restart tho). But after that it&#8217;s on par with a global helper. Correct me if I&#8217;m wrong.</p>
<p>This is the basic syntax : </p>
<pre class="brush: plain; title: ; notranslate">@RenderPage(&quot;/path/to/SomeTypedView.cshtml&quot;,someObject)</pre>
<p>And in the SomeTypedView.cshtml :</p>
<pre class="brush: plain; title: ; notranslate">@{var viewModel = (SomeType)PageData[0]; // mimic strongly typed view}
&lt;div=&quot;phew&quot;&gt;@viewModel.Name&lt;/div&gt;</pre>
<p>But the RenderPage-code is rather ugly. Let&#8217;s make a small global helper to make the syntax nicer:<br />
/App_Code/Tmpl.cshtml:</p>
<pre class="brush: plain; title: ; notranslate">@helper Display(object value, string templateName=&quot;&quot;) {
    if (templateName==&quot;&quot;) {
        templateName = value.GetType().Name;
    }
    @PageContext.Page.RenderPage(&quot;~/Shared/DisplayTemplates/&quot; + templateName + &quot;.cshtml&quot;,value)    
}</pre>
<p>It&#8217;s using a defined path. And it also checks the type name if we do not specify it. So the two following instructions makes the same result: </p>
<pre class="brush: plain; title: ; notranslate">@{var myObj = new MyType();}
@Tmpl.Display(myObj,&quot;MyType&quot;)
@Tmpl.Display(myObj)</pre>
<p>They both renders /Shared/DisplayTemplates/MyType.cshtml</p>
<p><strong>Introducing RazorTemplates</strong></p>
<p>Can we extend this further, using dynamics to write:</p>
<pre class="brush: plain; title: ; notranslate">@tmpl.MyTemplateName(someModel)</pre>
<p>&#8230;as a way to render the /DisplayTemplates/MyTemplateName.cshtml with someModel ?</p>
<p>Yes we can, check out <a href="https://gist.github.com/joeriks/5098153">DynamicHtmlTemplates in this gist</a>, <strong>[Update: or the <a href="http://our.umbraco.org//projects/website-utilities/razortemplates">Umbraco RazorTemplates package</a> which is basically the same, but evolved a little bit to an Umbraco context - also automatically picking up NodeTypeAlias to render file according to document type.]</strong></p>
<p>Put DynamicHtmlTemplates in your App_Code and you can use:</p>
<p><a href="http://joeriks.files.wordpress.com/2013/03/dynamicrender2.png"><img src="http://joeriks.files.wordpress.com/2013/03/dynamicrender2.png?w=588&#038;h=532" alt="DynamicRender" width="588" height="532" class="alignleft size-full wp-image-2979" /></a></p>
<p><i>Cool eh?</i></p>
<pre class="brush: plain; title: ; notranslate">
@using DynamicHtmlTemplates
@{
 var myobj = new MyClass{Name=&quot;Someone&quot;, Value=&quot;123&quot;};   
 dynamic tmpl = new Templates();
 // or dynamic tmpl = new Templates(&quot;~/Path/ToTemplates/&quot;);
 // or dynamic tmpl = new Templates(&quot;SubPathToTemplates&quot;);
}
        
Rendering /DisplayTemplates/MyClass.cshtml (sending myobj to PageData[0])
@tmpl.Display(myobj)

Rendering /DisplayTemplates/MyClassAlternative.cshtml  (sending myobj to PageData[0])
@tmpl.Display(myobj, &quot;MyClassAlternative&quot;)
        
... or let it use Dynamic to figure out the template name:
Rendering /DisplayTemplates/MyClassAlternative.cshtml  (sending myobj to PageData[0])
@tmpl.MyClass(myobj)

Rendering /DisplayTemplates/MyClassAlternative.cshtml  (sending myobj to PageData[0])
@tmpl.MyClassAlternative(myobj)
        
Rendering /DisplayTemplates/Possible.cshtml (sending inline razor item template to PageData[0] and list to PageData[1])
@tmpl.Possible(Templates.ItemTemplate(@&lt;text&gt;this is @item&lt;/text&gt;),new List&lt;string&gt;{&quot;one&quot;,&quot;two&quot;})

Contents of /DisplayTemlpate/Possible.cshtml:        
&lt;div&gt;
    @foreach(var item in PageData[1]) {
        @PageData[0](item)
    }
&lt;/div&gt;</pre>
<p>So with this, a bootstrap form can be created in a much more DRY way:<br />
<a href="http://joeriks.files.wordpress.com/2013/03/bootstrap.png"><img src="http://joeriks.files.wordpress.com/2013/03/bootstrap.png?w=588&#038;h=588" alt="bootstrap" width="588" height="588" class="alignleft size-full wp-image-2983" /></a></p>
<p>Tested in Umbraco 4.71 and Umbraco 6.02 as well as a vanilla WebPages site</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/2959/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/2959/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2959&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/03/06/displaytemplates-in-mvc-and-webpages-razor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>

		<media:content url="http://joeriks.files.wordpress.com/2013/03/dynamicrender2.png" medium="image">
			<media:title type="html">DynamicRender</media:title>
		</media:content>

		<media:content url="http://joeriks.files.wordpress.com/2013/03/bootstrap.png" medium="image">
			<media:title type="html">bootstrap</media:title>
		</media:content>
	</item>
		<item>
		<title>Hack: Dynamic helpers in WebPages Razor v1</title>
		<link>http://joeriks.com/2013/03/04/dynamic-helpers-in-razor-yet-another-approach/</link>
		<comments>http://joeriks.com/2013/03/04/dynamic-helpers-in-razor-yet-another-approach/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 13:36:33 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[Razor]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=2943</guid>
		<description><![CDATA[It&#8217;s well known that we can create global helpers by saving them in the App_Code folder. But changes in App_Code forces app restarts and therefore its quite interesting to find out alternative ways to call functions cross files. Here is one way &#8211; that works fine in WebPages Razor v1 (not MVC, and not WebPages [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2943&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s well known that we can create global helpers by saving them in the App_Code folder. But changes in App_Code forces app restarts and therefore its quite interesting to find out alternative ways to call functions cross files.</p>
<p>Here is one way &#8211; that works fine in WebPages Razor v1 (not MVC, and not WebPages Razor v2) &#8211; use the CreateInstanceFromVirtualPath method to create an instance of an existing cshtml page, and call methods within it. Like this:</p>
<pre class="brush: plain; title: ; notranslate">@{
    dynamic hlp = WebPageBase.CreateInstanceFromVirtualPath(&quot;~/dev/SharedHelpers.cshtml&quot;);
}       
@hlp.SomeHelper()</pre>
<p>You can use this together with razor code aswell,<a href="http://joeriks.com/2013/03/04/razor-helpers-with-razor-content/"> as I write about in another article</a>. But to call a dynamic function with a Func (as the razor code behaves as) you need to cast it:</p>
<pre class="brush: plain; title: ; notranslate">@hlp.SomeHelper(new Func&lt;string, HelperResult&gt;(@&lt;p&gt;foo&lt;/p&gt;))</pre>
<p>Unfortunately using CreateInstanceFromVirtualPath this way is <a href="http://stackoverflow.com/questions/15212055/use-createinstancefromvirtualpath-in-mvc-and-webpages-2">&#8220;not supported&#8221;</a> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/2943/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/2943/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2943&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/03/04/dynamic-helpers-in-razor-yet-another-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Razor helpers with razor content</title>
		<link>http://joeriks.com/2013/03/04/razor-helpers-with-razor-content/</link>
		<comments>http://joeriks.com/2013/03/04/razor-helpers-with-razor-content/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 09:11:28 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[Razor]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=2906</guid>
		<description><![CDATA[Adding a little more DRY to Razor scripts. If you find yourself adding the same boilerplate code over and over again in your razor scripts: You&#8217;ll do yourself a favour if you add a helper: Which means you can write: - Ok. But. What if we want this to be available globally? In every Razor [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2906&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Adding a little more DRY to Razor scripts.</strong></p>
<p>If you find yourself adding the same boilerplate code over and over again in your razor scripts:</p>
<pre class="brush: plain; title: ; notranslate">&lt;div class=&quot;this&quot;&gt;
  &lt;div class=&quot;that&quot;&gt;
    foo
  &lt;/div&gt;
&lt;div&gt;</pre>
<p>You&#8217;ll do yourself a favour if you add a helper:</p>
<pre class="brush: plain; title: ; notranslate">@helper DivThisThat(string contents)
{
    &lt;div class=&quot;this&quot;&gt;
        &lt;div class=&quot;that&quot;&gt;
            @contents
        &lt;/div&gt;
    &lt;/div&gt;
}</pre>
<p>Which means you can write:</p>
<pre class="brush: plain; title: ; notranslate">@DivThisThat(&quot;foo&quot;)</pre>
<p><em>- Ok. But. What if we want this to be available globally? In every Razor script. </em></p>
<p>Just add the helper to a Razor file inside the App_Code folder, call it /App_Code/GlobalHelpers.cshtml , that way you can use it everywhere like:</p>
<pre class="brush: plain; title: ; notranslate">@GlobalHelpers.DivThisThat(&quot;foo&quot;)</pre>
<p><em>- Ok. But. Simple text is not enough, I like to use this and include custom razor.<br />
</em><br />
Like this:</p>
<pre class="brush: plain; title: ; notranslate">@GlobalHelpers.DivThisThat(
  @&lt;div class=&quot;thus&quot;&gt;foo&lt;/div&gt;
)</pre>
<p>You can, just change the signature of your helper to this:</p>
<pre class="brush: plain; title: ; notranslate">@helper DivThisThat(Func&lt;string, HelperResult&gt; template)
{
    &lt;div class=&quot;this&quot;&gt;
        &lt;div class=&quot;that&quot;&gt;
            @template(&quot;&quot;)
        &lt;/div&gt;
    &lt;/div&gt;
}</pre>
<p><em>- Ok. But. What&#8217;s that empty string?<br />
</em><br />
It writes text <i>out to your template</i>. Let&#8217;s say you like to do a helper for displaying a list, and you like to optionally write something special if the list is empty. Then you can create this helper:</p>
<pre class="brush: plain; title: ; notranslate">@helper ListIfContent(List&lt;string&gt; someList, Func&lt;string, HelperResult&gt; liTemplate, Func&lt;string, HelperResult&gt; emptyTemplate)
{
    if (someList.Any())
    {
    &lt;ul&gt;
        @foreach (var i in someList)
        {
            @liTemplate(i)
        }
    &lt;/ul&gt;
    } else {
        @emptyTemplate(&quot;&quot;)
    }
}</pre>
<p>Use like this:</p>
<pre class="brush: plain; title: ; notranslate">@GlobalHelpers.ListIfContent(someList,@&lt;li class=&quot;whatever&quot;&gt;@item&lt;/li&gt;,@&lt;p&gt;No data&lt;/p&gt;)</pre>
<p>And the result is this if the list is not empty:</p>
<pre class="brush: plain; title: ; notranslate">&lt;ul&gt;
  &lt;li class=&quot;whatever&quot;&gt;one&lt;/li&gt;
  &lt;li class=&quot;whatever&quot;&gt;two&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>And this if the list is empty:</p>
<pre class="brush: plain; title: ; notranslate">&lt;p&gt;No data&lt;/p&gt;</pre>
<p>Notice &#8220;@item&#8221; in the first template, that&#8217;s where the helper writes the string content.</p>
<p><em>- Cool. But I tried it and got errors:<br />
</em></p>
<pre class="brush: plain; title: ; notranslate">@GlobalHelpers.DivThisThat(
  @&lt;div class=&quot;thus&quot;&gt;foo&lt;/div&gt;
  @&lt;div class=&quot;the&quot;&gt;bar&lt;/div&gt;
)</pre>
<p>You can only add one helper result to the function, but you can easily use them together by adding the text tag:</p>
<pre class="brush: plain; title: ; notranslate">@GlobalHelpers.DivThisThat(@&lt;text&gt;
  &lt;div class=&quot;thus&quot;&gt;foo&lt;/div&gt;
  &lt;div class=&quot;the&quot;&gt;bar&lt;/div&gt;
&lt;/text&gt;)</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/2906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/2906/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2906&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/03/04/razor-helpers-with-razor-content/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Web app woes: Save files offline for later upload to server</title>
		<link>http://joeriks.com/2013/02/27/web-app-woes-save-files-offline-for-later-upload-to-server/</link>
		<comments>http://joeriks.com/2013/02/27/web-app-woes-save-files-offline-for-later-upload-to-server/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 19:17:57 +0000</pubDate>
		<dc:creator>joeriks</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://joeriks.com/?p=2891</guid>
		<description><![CDATA[Ok, so this is something I like to do with a web application: make the users choose pictures when they are offline, and upload them later when they are online (even after the original page was closed). Easy? Not as far as I understand. Data is easy to store locally in localstorage. But localstorage is [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2891&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Ok, so this is something I like to do with a web application: make the users choose pictures when they are offline, and upload them later when they are online (even after the original page was closed). Easy? Not as far as I understand.</strong></p>
<p>Data is easy to store locally in localstorage. But localstorage is not good for images. There&#8217;s a limit of 5 mb&#8217;s. FileApi? Yes, seems like a good candidate, but not on iOS Safari, which is a requirement, it cannot do filewrites.</p>
<p>My current shot is to keep the page open and keep the files in a DataForm variable until the user goes online again. The page must be kept alive. But I think we can live with that (it is a single page application). And in worst case, the users just need to find the images from the local disk again. Another alternative is to use createObjectUrl(), which generates a temorary url to a local file, the url is easy to store in localstorage. But, those urls are only valid during the document lifetime. Don&#8217;t understand why. Should at least be an option to keep them longer. A more robust alternative for the iPad would be to rely on some native application to keep the files for us. I think PhoneGap can do that, but I&#8217;m not sure.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeriks.wordpress.com/2891/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeriks.wordpress.com/2891/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeriks.com&#038;blog=11388728&#038;post=2891&#038;subd=joeriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeriks.com/2013/02/27/web-app-woes-save-files-offline-for-later-upload-to-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/5c1ed377a5b2e96c567e4184a7be70b1?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">joeriks</media:title>
		</media:content>
	</item>
	</channel>
</rss>
