<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>A blog about my life as a hobby photographer and software/website developer, who’s eager to try out new things and try to work from different perspectives.</description><title>Paradigm Play</title><generator>Tumblr (3.0; @dykam)</generator><link>http://dykam.tumblr.com/</link><item><title>De wereld en de Nederlander</title><description>&lt;p&gt;&lt;em&gt;Dutch poem, written for dutch literature class.&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;Reizen, daarvan droomt elk
kind, als volwassene niet minder.
Verzinnen met wie en naar welk
land te gaan, zonder enig hinder.

Dan vertrekt men toch naar ginder,
hoog over aardes melk.
Men verkent aardes kelk,
de schoonheid niet veel minder.

Overal kijkt men rond,
waar de tip hen heen zond.
Maar aan alles komt een eind.

Tot rust kom je dan weer thuis,
terug als ontspanne huismuis.
Weer het leven aangelijnd.&lt;/pre&gt;</description><link>http://dykam.tumblr.com/post/1264406552</link><guid>http://dykam.tumblr.com/post/1264406552</guid><pubDate>Thu, 07 Oct 2010 23:11:00 +0200</pubDate></item><item><title>School ICT: Incompetent Computer Techs</title><description>&lt;p&gt;Being a last grade high schooler with an above average interest in &lt;a href="http://en.wikipedia.org/wiki/Computer_science"&gt;CS&lt;/a&gt; and related, I find the state of ICT at my school quite not workable.&lt;/p&gt;

&lt;p&gt;Over the years at school, the system has been revised several times in several ways. First there was Novell Netware, also called crapware. They switched to using native windows. This was a good thing. Then they started to restrict more and more. Eventually also a good thing, saved them time repairing computers. But then it went from workable to.. well, unworkable.&lt;/p&gt;

&lt;h1&gt;Incompetent Computer Techs&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Thanks Heath for the title&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;The school computers are not as good as they can be&lt;/h2&gt;

&lt;p&gt;Last year they replaced all computers, more than a hundred, with brand new quadcores. The network, both intranet and internet, are very, very fast. Still they manage to have applications boot very slow, and have slow internet for the same reason as why the applications boot so slow. Why? They use VMWare ThinApp. This is a tool to pack all application files into a single portable executable. When an application is fired it is loaded from a central server and booted. This is to ease updating of applications, as the files come from one central file, instead being copied on each single computer.&lt;/p&gt;

&lt;p&gt;But this has several downsides, for example the two I named above. Firefox can be easily around 40MB when installed, this means that for every start of Firefox, 40MB is transferred. This is not as bad, until a complete classroom logs in and boots up their programs. This can bring the complete network to a halt. The other downside is that settings are forgotten. They are simply overwritten when restarting the application.&lt;/p&gt;

&lt;h2&gt;The other big issue is the screwed up WiFi network&lt;/h2&gt;

&lt;p&gt;At the end of the big computer renewal, a WiFi network was installed, covering the complete school. Sweet. Well&amp;#8230; first they decided it was fun if thy blocked all ports except a few. For the CS class I (teach and) participate in, quite a few tools, some essential, where rendered useless. For example, GIT. We couldn&amp;#8217;t work at school anymore.&lt;/p&gt;

&lt;p&gt;Then they put an (extra) layer of protection on the WiFi. When opening the browser, you were forwarded to a login page, requiring you to login with your school&amp;#8217;s network-account. No problem, only that it does not work constantly on all devices. Some times you have an endless loading, sometimes you are not even forwarded to the login pages, or get a white page after logging in. Generally poking the ICT people helps, but they managed to break it again after a few days.&lt;/p&gt;

&lt;h1&gt;Why students know better&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Thanks Martijn for the title&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When asking for a catchy title for a blog post about whining about school ICT, someone suggested &amp;#8216;Why students know better&amp;#8217;. That made me decide to not just whine about it but to also offer some ideas and suggestions.&lt;/p&gt;

&lt;h2&gt;Computer messup mania&lt;/h2&gt;

&lt;h2&gt;Update frenzy&lt;/h2&gt;

&lt;p&gt;Well, the biggest fear of a computer service team at a high school is having to repair loads of computers every day being messed up by bored students. The second biggest fear is having to update every PC every day. Well, that&amp;#8217;s actually what every ICT team hates. And hey, there is a combined solution! Enter network boot. Every night, boot every computer from a central server and have it overwrite the HDD with a fresh image. There you go, no crap, all software at their latest version.&lt;/p&gt;

&lt;h2&gt;(WiFi) Network misuse&lt;/h2&gt;

&lt;p&gt;They currently block a wide range of ports. This disallows many services, including GIT/ssh and connecting to a remote desktop. There are several solutions to this:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;White list more ports, possibly per student/group. This is possible as you have to login anyway.&lt;/li&gt;
&lt;li&gt;Open everything up. As you are logged in, every network action can be traced back to you, and they can block you access to the complete network.&lt;/li&gt;
&lt;li&gt;Keep it closed and have a bunch of angry students as well teachers.&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Remember application settings&lt;/h2&gt;

&lt;p&gt;Currently user documents are saved on a network drive. No issue, pretty fast. But as they are using ThinApp, settings are not saves at all. The solution I brought up for keeping the computers fresh solves this as well. Apps can run from the computer itself, and settings can be saved on the network drive. Just like at home.&lt;/p&gt;

&lt;h2&gt;Speed up the network and application boot&lt;/h2&gt;

&lt;p&gt;Well, if the first solution is followed, the network returns to it&amp;#8217;s old speed, as the network only is used for updating at night, and the programs come from the PC you&amp;#8217;re using.&lt;/p&gt;

&lt;h1&gt;Conclusion&lt;/h1&gt;

&lt;p&gt;It was a relief to rant about my experiences at my school concerning the ICT. I know I&amp;#8217;m lucky to have a fast network at all, as well global WiFI, it&amp;#8217;s just that it doesn&amp;#8217;t work properly.&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/1121700932</link><guid>http://dykam.tumblr.com/post/1121700932</guid><pubDate>Tue, 14 Sep 2010 19:37:00 +0200</pubDate><category>school</category><category>experiences</category><category>rant</category></item><item><title>My visual report of the World Statues.</title><description>&lt;a href="http://www.flickr.com/photos/dykam/sets/72157624835248018/"&gt;My visual report of the World Statues.&lt;/a&gt;</description><link>http://dykam.tumblr.com/post/1033156795</link><guid>http://dykam.tumblr.com/post/1033156795</guid><pubDate>Sun, 29 Aug 2010 23:55:55 +0200</pubDate><category>photo</category><category>world statues</category><category>statues</category><category>flickr</category><category>arnhem</category></item><item><title>Living Statues by night, Fire show

Tonight, accompanying the...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo2_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo3_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo4_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo5_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo7_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo8_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo9_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vw7949Au1qzwa9vo10_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;h2&gt;Living Statues by night, Fire show&lt;/h2&gt;

&lt;p&gt;Tonight, accompanying the living statues (by night), a fire show was given. Actors dancing around with…. fire. Looked pretty cool, though I’ve seen this (I suspect the same group) 2 weeks before at some fest.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Came after: &lt;a href="http://tumblr.com/xcygzrkwd"&gt;Living Statues by Night&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/1027427416</link><guid>http://dykam.tumblr.com/post/1027427416</guid><pubDate>Sun, 29 Aug 2010 01:04:50 +0200</pubDate><category>photo</category><category>statues</category><category>world statues</category><category>night</category><category>fire</category><category>act</category><category>show</category><category>arnhem</category></item><item><title>Living Statues by night

As preparation on the big World Statues...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo2_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo3_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo4_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo5_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo6_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo7_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo8_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo9_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7vxdbNx0u1qzwa9vo10_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;h2&gt;Living Statues by night&lt;/h2&gt;

&lt;p&gt;As preparation on the big World Statues event, as more local centric ‘Statues by Night’ is organized, giving the artists more freedom in what to show.&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/1027532173</link><guid>http://dykam.tumblr.com/post/1027532173</guid><pubDate>Sun, 29 Aug 2010 01:03:00 +0200</pubDate><category>photo</category><category>arnhem</category><category>statues</category><category>world statues</category><category>night</category></item><item><title>Ireland, day 6-8

We’re in western Ireland, still loads of...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo10_500.jpg"/&gt;&lt;br/&gt; Sun, shiny sun.&lt;br/&gt;&lt;br/&gt; &lt;img src="http://25.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo9_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo8_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo7_500.jpg"/&gt;&lt;br/&gt; Somewhere remote, we took the wrong way&lt;br/&gt;&lt;br/&gt; &lt;img src="http://24.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo6_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo5_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo4_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo3_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l7eswasHmw1qzwa9vo2_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;h2&gt;Ireland, day 6-8&lt;/h2&gt;

&lt;p&gt;We’re in western Ireland, still loads of sun, although alternated by rainy moments.&lt;/p&gt;

&lt;p&gt;Taking way too many pictures, here’s a mini selection.&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/977879221</link><guid>http://dykam.tumblr.com/post/977879221</guid><pubDate>Thu, 19 Aug 2010 19:07:00 +0200</pubDate><category>ireland</category><category>photo</category><category>harbor</category><category>nature</category><category>inland</category></item><item><title>Thinkering: Henshu and its possibilities</title><description>&lt;p&gt;&lt;em&gt;This is a follow up on &lt;a href="http://tumblr.com/xcyf9odsr"&gt;Html templates, my way&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Last time my post was only about the selector engine, and how it could replace content. This time I&amp;#8217;m going to look at some other possibilities and ideas I had.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I named the engine and the project 編集(henshū), or Editing. I refer to it from now on as Henshu.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Deletion/Condition&lt;/li&gt;
&lt;li&gt;Option/Switch&lt;/li&gt;
&lt;li&gt;Sequential selectors&lt;/li&gt;
&lt;/ul&gt;&lt;h1&gt;Deletion&lt;/h1&gt;

&lt;p&gt;Let&amp;#8217;s consider the following case. The user can either be logged in, or not. Now, it is currently possible to simply put in an empty array. This deletes the element as seen in the following example:&lt;/p&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;span id="NotLoggedIn"&amp;gt;You are not logged in! Please log in.&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;{ "#NotLoggedIn": [] }
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Nothing of course, the element .NotLoggedIn is replaced with itself repeated zero times. --&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;p&gt;But this is not directly obvious. What about using boolean-false to denote the absence of an element? Or null? Let&amp;#8217;s see and let me hear what you think:&lt;/p&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;{ "#NotLoggedIn": false }
{ "#NotLoggedIn": null }
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;h1&gt;Option/Switch&lt;/h1&gt;

&lt;p&gt;And then there is the scenario of multiple types of data to show. You can ofcourse use multiple false&amp;#8217;s, but it is counterintuitive to denote which of the multiple you do not want to see. You want to point what you &lt;em&gt;do&lt;/em&gt; want to see. My solution had a few requirements and ways of execution. I&amp;#8217;m working with C# as engine/API, and JSON as engine food. Going to hack in a neat C# solution will not be that hard, considering the availability of types. But JSON only has a few, and only one, a string, as &lt;strong&gt;key&lt;/strong&gt;, which I&amp;#8217;m currently using for selecting. But I did figure out a solution. Namely, CSS selectors do only start with a dot (.), a hash (#), a colon (:), a star (*) or a letter. All others are virtually free to (mis)use.&lt;/p&gt;

&lt;p&gt;I decided to use - as a multiple option denoter, basically a remove-all-but denoter, prepending that to the selector. Here is some example:&lt;/p&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="Ranking"&amp;gt;
    &amp;lt;img class="Admin" src="./admin.png" /&amp;gt;
    &amp;lt;img class="User" src="./user.png" /&amp;gt;
    &amp;lt;img class="Mod" src="./mod.png" /&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;{ "-.Ranking": ".User" }
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="Ranking"&amp;gt;
    &amp;lt;img class="User" src="./user.png" /&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;p&gt;Or, more advanced, showing multiple AND replacing content:&lt;/p&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="Ranking"&amp;gt;
    &amp;lt;span class="Admin"&amp;gt;&amp;lt;img src="./admin.png" /&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;span class="User"&amp;gt;&amp;lt;img src="./user.png" /&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;span class="Mod"&amp;gt;&amp;lt;img src="./mod.png" /&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;{
    "-.Ranking": [ ".Admin", ".User" ],
    ".Ranking .User": "User"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="Ranking"&amp;gt;
    &amp;lt;span class="Admin"&amp;gt;&amp;lt;img src="./admin.png" /&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;span class="User"&amp;gt;User&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;h1&gt;Sequential selectors&lt;/h1&gt;

&lt;p&gt;Now you might be thinking, what about those sequential properties in the JSON? These are to be evaluated from top to bottom. This means the a selection applies to the the content after the previous selector&amp;amp;content is applied. Thus in the following, the second is rendered useless by the first one:&lt;/p&gt;

&lt;hr&gt;&lt;pre&gt;&lt;code&gt;{
    ".Foo": [],
    ".Foo": "ContentWhichYouNeverWillSee"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;&lt;p&gt;&lt;em&gt;Footnote: I&amp;#8217;m eager to hear your comments and ideas, so please comment.&lt;/em&gt;&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/953473262</link><guid>http://dykam.tumblr.com/post/953473262</guid><pubDate>Sat, 14 Aug 2010 21:09:00 +0200</pubDate><category>web</category><category>dev</category><category>templates</category><category>xhtml</category><category>henshu</category></item><item><title>Ireland, day three

The beach at Ballymoney, near Courtown near...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo10_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo9_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo2_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo3_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo15_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo17_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l73pm2ia4q1qzwa9vo16_r1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;h2&gt;Ireland, day three&lt;/h2&gt;

&lt;p&gt;The beach at Ballymoney, near Courtown near Gorey.&lt;/p&gt;

&lt;p&gt;Although it was a cloudy day, the sun happily peeked through at some moments. Visited some little beach at &lt;a href="http://maps.google.com/maps?ll=52.671594,-6.20676"&gt;Ballymoney&lt;/a&gt; and then went to take a look at &lt;a href="http://maps.google.com/maps?ll=52.673988,-6.293106"&gt;Gorey&lt;/a&gt;.&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/948096878</link><guid>http://dykam.tumblr.com/post/948096878</guid><pubDate>Fri, 13 Aug 2010 19:22:00 +0200</pubDate><category>ireland</category><category>photo</category><category>beach</category><category>play</category><category>nature</category></item><item><title>Html templates, my way</title><description>&lt;p&gt;&lt;em&gt;This is a follow up on &lt;a href="http://tumblr.com/xcyf9guyo"&gt;Html templates, how it is done currently and what I dislike about that&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My tools for experimenting with new concepts generally are Visual Studio/MonoDevelop and C#4. This was no exception. But this time I focussed on creating an API which would be easy to port to other languages and platforms. One major influence is the easiness of selecting elements using jQuery, so I&amp;#8217;m adopting that. Let&amp;#8217;s skip the talk, and jump straight into an example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;Template&amp;lt;/title&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;div class="Content"&amp;gt;
            &amp;lt;h1&amp;gt;Post Title&amp;lt;/h1&amp;gt;
            &amp;lt;p class="Item"&amp;gt;&amp;lt;/p&amp;gt;
            &amp;lt;p class="Author"&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Simple, clean html, which even contains some sample data. But now, how do you fill this? I&amp;#8217;ve developed a working example, which uses JSON as input format. Some example input could be:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{
    "title": "The Template Engine"
    ".Content": [
    {
        "h1": "First entry"
        ".Item": "This is the content of the first entry.",
        ".Author": "Dykam",
    },
    {
        "h1": "Second entry"
        ".Item": [
            "This is the content of the second entry.",
            "With multiple paragraphs!"
        ],
        ".Author": "Dykam",
    }
    ],
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What can we see here? Css Selectors. The engine is using CSS selectors to select the elements to modify. The content to be applied to a selected element can be on of the following:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Just text. The content of the element is plainly replaced with the json value.&lt;/li&gt;
&lt;li&gt;More content. The selectors in the subcontent are applied to the children of the selected element.&lt;/li&gt;
&lt;li&gt;Arrays. When they occur, the element it applies on is repeated for entry.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;So, what does this mean? I just show you what the resulting html is.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;The Template Engine&amp;lt;/title&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;div class="Content"&amp;gt;
            &amp;lt;h1&amp;gt;First entry&amp;lt;/h1&amp;gt;
            &amp;lt;p class="Item"&amp;gt;This is the content of the first entry.&amp;lt;/p&amp;gt;
            &amp;lt;p class="Author"&amp;gt;Dykam&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="Content"&amp;gt;
            &amp;lt;h1&amp;gt;Second entry&amp;lt;/h1&amp;gt;
            &amp;lt;p class="Item"&amp;gt;This is the content of the second entry.&amp;lt;/p&amp;gt;
            &amp;lt;p class="Item"&amp;gt;With multiple paragraphs!&amp;lt;/p&amp;gt;
            &amp;lt;p class="Author"&amp;gt;Dykam&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, what are the profits of this?&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;The designer does not have to know anything of the back end or some custom language.&lt;/li&gt;
&lt;li&gt;The designer can fill it with custom data and apply JavaScript and CSS straight away to see the result.&lt;/li&gt;
&lt;li&gt;No chance of interference with other processing engines, as plain html is used. For example, you can drop in yet another template engine to generate the templates, or the other way around.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;In subsequent posts I will go into detail about more possibilities, behavior and edge cases of the engine, and how flexible it really is.&lt;/p&gt;

&lt;hr&gt;&lt;p&gt;&lt;em&gt;Footnode:
I used the term &lt;strong&gt;html&lt;/strong&gt; all around the post, but I really focus on &lt;strong&gt;xhtml&lt;/strong&gt;, or any kind of &lt;strong&gt;xml&lt;/strong&gt;. I might later on hook in an html4/5 parser to support that, but that is not in my near planning.&lt;/em&gt;&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/923246811</link><guid>http://dykam.tumblr.com/post/923246811</guid><pubDate>Sun, 08 Aug 2010 21:00:00 +0200</pubDate><category>html</category><category>templates</category><category>xhtml</category><category>web</category><category>dev</category></item><item><title>Html templates, how it is done currently and what I dislike about that</title><description>&lt;p&gt;Html templates&amp;#8230; the urge to have some kind of Html and let some kind of engine fill it with data. The common reason for templates is to separate code from design, both from a designer/programmer perspective and for separation of concerns.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve seen multiple tries as this, and the general trend is to have special characters denote where contents goes, like in the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;{title}&amp;lt;/h1&amp;gt;
&amp;lt;p&amp;gt;{item}&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This works perfectly well, until it gets more complex, and you need to loop through repeating data. You get artificial constructs like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;h1&amp;gt;{title}&amp;lt;/h1&amp;gt;
{for:items as item}
&amp;lt;p&amp;gt;{item}&amp;lt;/p&amp;gt;
{/for}
{if:author}
&amp;lt;p&amp;gt;{author}&amp;lt;/p&amp;gt;
{/if}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This works well on small scale, but on large files and more complex data, you can get complex logic ending up in template files.&lt;/p&gt;

&lt;p&gt;Another complaint I have about this kind of templates, is that you have yet another special character or &lt;a href="http://en.wikipedia.org/wiki/Domain-specific_language"&gt;DSL&lt;/a&gt;. A side effect of this is when the template engine fails to replace all &lt;em&gt;tokens&lt;/em&gt;. You see those tokens appear in the page, not quite what you want. So I started playing with several ideas.&lt;/p&gt;

&lt;p&gt;My preferences included &lt;strong&gt;clean html&lt;/strong&gt; and &lt;strong&gt;obvious html&lt;/strong&gt;. That is, the html should not contain anything like DSL and alike. The following would not fit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Custom characters --&amp;gt;
&amp;lt;h1&amp;gt;{title}&amp;lt;/h1&amp;gt;
&amp;lt;!-- Misuse of html, also because it clutters --&amp;gt;
&amp;lt;h1&amp;gt;&amp;lt;span class="value title"&amp;gt;&amp;lt;/h1&amp;gt;
&amp;lt;!-- Illegal html --&amp;gt;
&amp;lt;h1&amp;gt;&amp;lt;value name="title"&amp;gt;&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So I decided to swing it the other way around. The template would be a proper html page, which even can contain some demo content, and the the template engine would infer from the data if something is optional, hidden or repeated.&lt;/p&gt;

&lt;p&gt;In my next post, I will show a way of doing this cleanly.&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/922895808</link><guid>http://dykam.tumblr.com/post/922895808</guid><pubDate>Sun, 08 Aug 2010 20:12:00 +0200</pubDate><category>dev</category><category>html</category><category>templates</category><category>web</category></item><item><title>Big constructions works going on at Arnhem Central station. Two...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_l6u39bVh0x1qzwa9vo5_500.jpg"/&gt;&lt;br/&gt; The roof of the tunnel to be build.&lt;br/&gt;&lt;br/&gt; &lt;img src="http://24.media.tumblr.com/tumblr_l6u39bVh0x1qzwa9vo3_500.jpg"/&gt;&lt;br/&gt; Spectators watching this rare event&lt;br/&gt;&lt;br/&gt; &lt;img src="http://24.media.tumblr.com/tumblr_l6u39bVh0x1qzwa9vo1_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://25.media.tumblr.com/tumblr_l6u39bVh0x1qzwa9vo4_500.jpg"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;p&gt;Big constructions works going on at Arnhem Central station. Two of three directions are closed for a month to speed up works on the tunnel. The tunnel is build is to enable faster changing of tracks, literally by just skipping them.&lt;/p&gt;</description><link>http://dykam.tumblr.com/post/922196186</link><guid>http://dykam.tumblr.com/post/922196186</guid><pubDate>Sun, 08 Aug 2010 14:41:00 +0200</pubDate><category>photo</category><category>arnhem</category><category>station</category><category>construction works</category></item></channel></rss>
