<?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/"
	>

<channel>
	<title>LinkiT projects</title>
	<atom:link href="http://linkit-projects.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://linkit-projects.nl</link>
	<description>Effective Software Delivery</description>
	<lastBuildDate>Wed, 30 Jun 2010 07:33:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Implementing MVC with JavaScriptMVC</title>
		<link>http://linkit-projects.nl/2010/06/implementing-mvc-with-javascriptmvc/</link>
		<comments>http://linkit-projects.nl/2010/06/implementing-mvc-with-javascriptmvc/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 18:47:52 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScriptMVC]]></category>

		<guid isPermaLink="false">http://linkit-projects.nl/?p=1370</guid>
		<description><![CDATA[
			
				
			
		
After the initial usage of JavaScriptMVC in my first view, I reviewed the code. One of the things I saw [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;source=linkitprojects&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>After the initial usage of <a href="http://javascriptmvc.com/">JavaScriptMVC</a> in my first view, I reviewed the code. One of the things I saw was my wrong usage of <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">MVC</a>. I&#8217;m not publishing that code, it was that bad. This had nothing to do with the implementation of JavaScriptMVC, but only with the usage of the framework.<br />
<span id="more-1370"></span><br />
What I had was an element controller, which takes care of reacting on changes of the input element, should update the model and get some info back from the model and can inform the view. This can be divided into 3 steps:<br />
1. Controller gets event from view, e.g user has typed something in the input element.<br />
2. Controller lets the model update itself with the data type by the user.<br />
3. Controller gets event from model that everything is done</p>
<p>Identifying the above steps. I had no difficulty at all to implement a correct MVC pattern with JavaScriptMVC</p>
<h2>Controller gets event from view</h2>
<p>First we register a change event handler on the input element controller. This is done with the following snippet:<br />
<script src="http://gist.github.com/452931.js?file=registration_element_oncontroller.js"></script><br />
._dayinput is a class selector, the change the event. The function is executed when someone has changed the element. This gets us to the second step. </p>
<h2>Controller lets the model update itself</h2>
<p>Due to the registration of the view element on the controller, there is a change event fired and caught by the controller. This fires the next function.<br />
<script src="http://gist.github.com/453080.js?file=registrationChanged.js"></script></p>
<h2>Controller gets event from model that everything is done</h2>
<p>It’s turns out the JavaScriptMVC framework uses ajax openhub to publish events about all sort of things. It also publishes create, update, destroy and error events.<br />
Basically it works as follows. The model receives the data and changes the model. The model then fires an event, on which the controller is subscribed.<br />
The events fired by the model are handled by the framework. If you want to react on those event you have to subscribe the controller to those events. See the code snippet for an example.</p>
<p><script src="http://gist.github.com/453097.js?file=registrationsubscribecreated.js"></script></p>
<p>The implementation briefly describes how I implemented the MVC pattern with JavaScriptMVC. The framework itself is very powerful in doing this, I should have done more rtfm before coding.</p>




	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;partner=sociable" title="Print"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;title=Implementing%20MVC%20with%20JavaScriptMVC&amp;bodytext=After%20the%20initial%20usage%20of%20JavaScriptMVC%20in%20my%20first%20view%2C%20I%20reviewed%20the%20code.%20One%20of%20the%20things%20I%20saw%20was%20my%20wrong%20usage%20of%20MVC.%20I%27m%20not%20publishing%20that%20code%2C%20it%20was%20that%20bad.%20This%20had%20nothing%20to%20do%20with%20the%20implementation%20of%20JavaScriptMVC%2C%20but%20onl" title="Digg"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;title=Implementing%20MVC%20with%20JavaScriptMVC&amp;notes=After%20the%20initial%20usage%20of%20JavaScriptMVC%20in%20my%20first%20view%2C%20I%20reviewed%20the%20code.%20One%20of%20the%20things%20I%20saw%20was%20my%20wrong%20usage%20of%20MVC.%20I%27m%20not%20publishing%20that%20code%2C%20it%20was%20that%20bad.%20This%20had%20nothing%20to%20do%20with%20the%20implementation%20of%20JavaScriptMVC%2C%20but%20onl" title="del.icio.us"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;t=Implementing%20MVC%20with%20JavaScriptMVC" title="Facebook"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;title=Implementing%20MVC%20with%20JavaScriptMVC&amp;annotation=After%20the%20initial%20usage%20of%20JavaScriptMVC%20in%20my%20first%20view%2C%20I%20reviewed%20the%20code.%20One%20of%20the%20things%20I%20saw%20was%20my%20wrong%20usage%20of%20MVC.%20I%27m%20not%20publishing%20that%20code%2C%20it%20was%20that%20bad.%20This%20had%20nothing%20to%20do%20with%20the%20implementation%20of%20JavaScriptMVC%2C%20but%20onl" title="Google Bookmarks"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.hyves.nl/profilemanage/add/tips/?name=Implementing%20MVC%20with%20JavaScriptMVC&amp;text=After%20the%20initial%20usage%20of%20JavaScriptMVC%20in%20my%20first%20view%2C%20I%20reviewed%20the%20code.%20One%20of%20the%20things%20I%20saw%20was%20my%20wrong%20usage%20of%20MVC.%20I%27m%20not%20publishing%20that%20code%2C%20it%20was%20that%20bad.%20This%20had%20nothing%20to%20do%20with%20the%20implementation%20of%20JavaScriptMVC%2C%20but%20onl+http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;rating=5" title="Hyves"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/hyves.png" title="Hyves" alt="Hyves" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F&amp;title=Implementing%20MVC%20with%20JavaScriptMVC&amp;source=LinkiT+projects+Effective+Software+Delivery&amp;summary=After%20the%20initial%20usage%20of%20JavaScriptMVC%20in%20my%20first%20view%2C%20I%20reviewed%20the%20code.%20One%20of%20the%20things%20I%20saw%20was%20my%20wrong%20usage%20of%20MVC.%20I%27m%20not%20publishing%20that%20code%2C%20it%20was%20that%20bad.%20This%20had%20nothing%20to%20do%20with%20the%20implementation%20of%20JavaScriptMVC%2C%20but%20onl" title="LinkedIn"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=Implementing%20MVC%20with%20JavaScriptMVC&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fimplementing-mvc-with-javascriptmvc%2F" title="Netvibes"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://linkit-projects.nl/2010/06/implementing-mvc-with-javascriptmvc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JavaScriptMVC &#8211; refactoring the controller</title>
		<link>http://linkit-projects.nl/2010/06/javascriptmvc-refactoring-the-controller/</link>
		<comments>http://linkit-projects.nl/2010/06/javascriptmvc-refactoring-the-controller/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 15:11:45 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScriptMVC]]></category>

		<guid isPermaLink="false">http://linkit-projects.nl/?p=1351</guid>
		<description><![CDATA[
			
				
			
		
We are doing a project with JavaScriptMVC as the framework for the front-end. The framework itself is a good framework [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;source=linkitprojects&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>We are doing a project with <a href="http://javascriptmvc.com/">JavaScriptMVC</a> as the framework for the front-end. The framework itself is a good framework for building web applications. One of our development principals is test driven development (TDD). By default <a href="http://javascriptmvc.com/">JavaScriptMVC</a> comes with the jQuery testing environment, nothing wrong with that, but we are more fond of <a href="http://github.com/pivotal/jasmine">Jasmine</a>.<br />
<span id="more-1351"></span><br />
 One of the things we also have in place is code coverage. So if you don&#8217;t want to disappoint your colleagues, you have to have your tests in place (not mentioning that its TDD and not TAD).</p>
<p>The testing of the model and the view are pretty straightforward, so we thought the controller should also be very easy to test. We opened the generated code and came across the following piece of code:<br />
<script src="http://gist.github.com/428764.js?file=generatedcontrollerload.js"></script><br />
With this code we had some trouble:<br />
1. Not testable, at least difficult to test<br />
2. To much view in the controller code<br />
3. Code duplication across the controllers.</p>
<p>So how do we solve those issues? This didn&#8217;t seem to hard, and if you think for a few minutes, it really is not that difficult.<br />
The first thing we did is moving the code to a different method:<br />
<script src="http://gist.github.com/428770.js?file=generatedcontrollerloadstep1.js"></script><br />
This is a solution only for the current controller, and the code is not that good.<br />
Next step is to determine where to put the code so every controller can use this. The first thought was to patch the controller of JavaScriptMVC. We thought this was not correct, because when you update JavaScript MVC with a new version, you forget that you patched it. We decided to put it in the plugins directory. We created a directory &#8220;controllers&#8221; and put a file in it called &#8220;controller_extensions.js&#8221;. In this file we put the code code to extend the Controler class (a jmvc framewrok class) with the show method. And to make it more javascriptie the method expects an array with keys for id (id of the element), view (the name of the view to be show) en data (containing the data used by the view):<br />
<script src="http://gist.github.com/428771.js?file=generatedcontrollerloadstep2.js"></script><br />
You can use the the show method in the load method as follows:<br />
<script src="http://gist.github.com/428772.js?file=generatedcontrollerusagenew.js"></script><br />
There is one drawback, and that is that you explicitly have to provide the directory the view file is in. This is because JavaScriptMVC determines the path of the view based on the controller. And now the controller is Controller in stead monthcontroller.</p>
<p>In our next blog we will show you how this made testing the load method way easier.</p>




	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;partner=sociable" title="Print"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;title=JavaScriptMVC%20-%20refactoring%20the%20controller&amp;bodytext=We%20are%20doing%20a%20project%20with%20JavaScriptMVC%20as%20the%20framework%20for%20the%20front-end.%20The%20framework%20itself%20is%20a%20good%20framework%20for%20building%20web%20applications.%20One%20of%20our%20development%20principals%20is%20test%20driven%20development%20%28TDD%29.%20By%20default%20JavaScriptMVC%20comes%20w" title="Digg"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;title=JavaScriptMVC%20-%20refactoring%20the%20controller&amp;notes=We%20are%20doing%20a%20project%20with%20JavaScriptMVC%20as%20the%20framework%20for%20the%20front-end.%20The%20framework%20itself%20is%20a%20good%20framework%20for%20building%20web%20applications.%20One%20of%20our%20development%20principals%20is%20test%20driven%20development%20%28TDD%29.%20By%20default%20JavaScriptMVC%20comes%20w" title="del.icio.us"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;t=JavaScriptMVC%20-%20refactoring%20the%20controller" title="Facebook"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;title=JavaScriptMVC%20-%20refactoring%20the%20controller&amp;annotation=We%20are%20doing%20a%20project%20with%20JavaScriptMVC%20as%20the%20framework%20for%20the%20front-end.%20The%20framework%20itself%20is%20a%20good%20framework%20for%20building%20web%20applications.%20One%20of%20our%20development%20principals%20is%20test%20driven%20development%20%28TDD%29.%20By%20default%20JavaScriptMVC%20comes%20w" title="Google Bookmarks"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.hyves.nl/profilemanage/add/tips/?name=JavaScriptMVC%20-%20refactoring%20the%20controller&amp;text=We%20are%20doing%20a%20project%20with%20JavaScriptMVC%20as%20the%20framework%20for%20the%20front-end.%20The%20framework%20itself%20is%20a%20good%20framework%20for%20building%20web%20applications.%20One%20of%20our%20development%20principals%20is%20test%20driven%20development%20%28TDD%29.%20By%20default%20JavaScriptMVC%20comes%20w+http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;rating=5" title="Hyves"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/hyves.png" title="Hyves" alt="Hyves" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F&amp;title=JavaScriptMVC%20-%20refactoring%20the%20controller&amp;source=LinkiT+projects+Effective+Software+Delivery&amp;summary=We%20are%20doing%20a%20project%20with%20JavaScriptMVC%20as%20the%20framework%20for%20the%20front-end.%20The%20framework%20itself%20is%20a%20good%20framework%20for%20building%20web%20applications.%20One%20of%20our%20development%20principals%20is%20test%20driven%20development%20%28TDD%29.%20By%20default%20JavaScriptMVC%20comes%20w" title="LinkedIn"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=JavaScriptMVC%20-%20refactoring%20the%20controller&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F06%2Fjavascriptmvc-refactoring-the-controller%2F" title="Netvibes"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://linkit-projects.nl/2010/06/javascriptmvc-refactoring-the-controller/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A brave new world</title>
		<link>http://linkit-projects.nl/2010/05/a-brave-new-world/</link>
		<comments>http://linkit-projects.nl/2010/05/a-brave-new-world/#comments</comments>
		<pubDate>Wed, 12 May 2010 13:34:16 +0000</pubDate>
		<dc:creator>Renzo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linkit-projects.nl/?p=1140</guid>
		<description><![CDATA[

			
				
			
		
A quest for a full Ajax application (in 8 parts or so)
In my previous blog I came to the conclusion [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://linkit-projects.nl/2010/05/a-brave-new-world/" title="Permanent link to A brave new world"><img class="post_image alignleft" src="http://linkit-projects.nl/wp-content/uploads/braveNewWorldMedia.jpg" width="300" height="188" alt="Post image for A brave new world" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;source=linkitprojects&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><em>A quest for a full Ajax application (in 8 parts or so)</em></p>
<p>In my previous <a title="There must be a better way" href="/?p=1119">blog</a> I came to the conclusion that we, developers, use too many development languages to get the job done. Having multiple languages causes overhead, mistakes and could force you to implement things more than once.<br />
<span id="more-1140"></span><br />
PART 2</p>
<p>Wouldn’t it be nice to have just one language in your development environment. Life would certainly be a lot easier. After some googling and some very nice (and concrete) suggestions of my colleagues, I came up with the following software stack, which is mainly based around javascript.</p>
<p><strong>CouchDB </strong>for storage<br />
<a href="http://couchdb.apache.org">http://couchdb.apache.org</a>/</p>
<p>CouchDB is document based schema free database.  A document is basically a JSON object. Each document can have it&#8217;s own properties. So you can add or remove properties (of a single document) without update scripts to add or remove columns. CouchDB comes with a RESTful JSON api which integrates seamlessly with HTTP clients. Querying(map/reduce) and validation are done with javascript. An advantage is that these validation methods can also be reused in other javascript supporting layers.</p>
<p>The architecture of CouchDB allows for easy replication and scalability.</p>
<p><strong>NodeJS<br />
<span style="font-weight: normal;"><a href="http://nodejs.org">http://nodejs.org</a>/</span></strong></p>
<p>The goal of NodeJS is to provide an easy way to build scalable network programs. NodeJS is based on googles V8 javascript engine. The core principal of NodeJS is to do all I/O non blocking, so more calls can be served with fewer threads. This way the through put isn&#8217;t limited by the number of threads allowed to spawn, but by the resources of the computer(CPU, memory, disk or network I/O).</p>
<p>In combination with Express(<a href="http://expressjs.com">http://expressjs.com</a>/) this makes our server-side application tier. This server layer probably won&#8217;t become that big since we are trying to push as much as we can to the client machine.</p>
<p><strong>jQuery<br />
<span style="font-weight: normal;"><a href="http://jquery.com">http://jquery.com</a>/</span></strong></p>
<p>I think jQuery is pretty well known. So I’m won’t dig in to deep on what it does. More interesting is that I also took a look at Closure(<a href="http://code.google.com/closure/">http://code.google.com/closure/</a>). Compared to jQuery, Closure is more of Javascript SDK with AWT. Unfortunately you have to move the earth to add some simple behavior to your page. The nice fluent interface of jQuery simply blows Closure away in that area. Closure did help me to realize that TDD is more necessary than ever.</p>
<p><strong>Jasmine<br />
<span style="font-weight: normal;"><a href="http://github.com/pivotal/jasmine">http://github.com/pivotal/jasmine#readme</a></span></strong></p>
<p>Jasmine is very nice test framework for javascript. It has build in support for asserts and mocking and it is easily extensible. Jasmine test are written in a BDD style(Behaviour driven).</p>
<p><strong>Javascript</strong></p>
<p>As you may have noticed they al bear one thing in common&#8230;<strong>javascript</strong>. This certainly helps reducing the software stack.</p>
<p><strong>Prefetching static noise</strong></p>
<p>Another choice which might not be so obvious, is to render the html from at the client side with the javascript. This means we don’t require a template engine to render the html. And the back-end only needs to send data after the initial load and thus minimizing network bandwidth.</p>
<p><strong> </strong></p>
<p><strong>My brave new world</strong></p>
<p><strong> </strong></p>
<table style="margin-bottom: 25px;">
<tbody>
<tr>
<th width="200px"></th>
<th>language</th>
</tr>
<tr>
<th style="vertical-align: top;">language</th>
<td><strong>javascript with jQuery</strong></td>
</tr>
<tr>
<th style="vertical-align: top;">build file</th>
<td style="background-color: #ffffcc;"><strong>CouchApp and some script files</strong></td>
</tr>
<tr>
<th style="vertical-align: top;">render templates</th>
<td><strong>javascript</strong><br />
<em>string concatenation and some jQuery</em></td>
</tr>
<tr>
<th style="vertical-align: top;">config/fixtures</th>
<td style="background-color: #ffffcc;"><strong>JSON</strong></td>
</tr>
<tr>
<th style="vertical-align: top;">database access</th>
<td><strong>CouchDB</strong></td>
</tr>
<tr>
<th style="vertical-align: top;">Business DSL</th>
<td style="background-color: #ffffcc;"><strong>project specific</strong></td>
</tr>
<tr>
<th style="vertical-align: top;">View</th>
<td><strong>html</strong><br />
<em>given; we run in a browser</em></td>
</tr>
<tr>
<th style="vertical-align: top;">Styling</th>
<td style="background-color: #ffffcc;"><strong>css</strong><br />
<em>given; we run in a browser</em></td>
</tr>
<tr>
<th style="vertical-align: top;">View behavior</th>
<td><strong>javascript</strong></td>
</tr>
</tbody>
</table>
<p>I think some small notes are required on the build file.  CouchApp loads your application in to CouchDB by convention. With my current understanding an experience of CouchDB and CouchApp this should be enough for &#8220;building&#8221; your database.</p>
<p>So what other build files are required javascript doesn&#8217;t compile and jasmine has a test runner. So I guess we only need some scripts(shell or other) to tie it together.</p>
<p>The first five rows are all javascript, JSON, a subset of javascript, or javascript enabled. This is a huge reduction of the language stack.</p>
<p><strong>Will it blend?</strong></p>
<p>It all looks nice on paper, but will it work well together. There is only one way to find out. Put it to the test by making a nice application. I will blog on each part and present my final conclusions by building a sample application.  The next blog will handle writing a plain javascript loader. which prefetches all the static data of the application.</p>
<p><strong><em>By the way: </em><span style="font-weight: normal;"><em>As it happens a other colleague of mine Jeroen van Menen took a look at iPhone apps. He came up with </em><strong><em>jQTouch </em></strong><em>and</em><strong><em> PhoneGap</em></strong><em>. jQTouch is a javascript/css3 based library and PhoneGap compiles a iPhone application out of “your web site/application”.  This would blend perfectly with  the suggested stack.</em></span></strong></p>
<p><strong> </strong></p>




	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;partner=sociable" title="Print"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;title=A%20brave%20new%20world&amp;bodytext=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0AIn%20my%20previous%20blog%20I%20came%20to%20the%20conclusion%20that%20we%2C%20developers%2C%20use%20too%20many%20development%20languages%20to%20get%20the%20job%20done.%20Having%20multiple%20languages%20causes%20overhead%2C%20mistakes%20and%20could%20force%20yo" title="Digg"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;title=A%20brave%20new%20world&amp;notes=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0AIn%20my%20previous%20blog%20I%20came%20to%20the%20conclusion%20that%20we%2C%20developers%2C%20use%20too%20many%20development%20languages%20to%20get%20the%20job%20done.%20Having%20multiple%20languages%20causes%20overhead%2C%20mistakes%20and%20could%20force%20yo" title="del.icio.us"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;t=A%20brave%20new%20world" title="Facebook"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;title=A%20brave%20new%20world&amp;annotation=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0AIn%20my%20previous%20blog%20I%20came%20to%20the%20conclusion%20that%20we%2C%20developers%2C%20use%20too%20many%20development%20languages%20to%20get%20the%20job%20done.%20Having%20multiple%20languages%20causes%20overhead%2C%20mistakes%20and%20could%20force%20yo" title="Google Bookmarks"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.hyves.nl/profilemanage/add/tips/?name=A%20brave%20new%20world&amp;text=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0AIn%20my%20previous%20blog%20I%20came%20to%20the%20conclusion%20that%20we%2C%20developers%2C%20use%20too%20many%20development%20languages%20to%20get%20the%20job%20done.%20Having%20multiple%20languages%20causes%20overhead%2C%20mistakes%20and%20could%20force%20yo+http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;rating=5" title="Hyves"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/hyves.png" title="Hyves" alt="Hyves" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F&amp;title=A%20brave%20new%20world&amp;source=LinkiT+projects+Effective+Software+Delivery&amp;summary=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0AIn%20my%20previous%20blog%20I%20came%20to%20the%20conclusion%20that%20we%2C%20developers%2C%20use%20too%20many%20development%20languages%20to%20get%20the%20job%20done.%20Having%20multiple%20languages%20causes%20overhead%2C%20mistakes%20and%20could%20force%20yo" title="LinkedIn"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=A%20brave%20new%20world&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F05%2Fa-brave-new-world%2F" title="Netvibes"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://linkit-projects.nl/2010/05/a-brave-new-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There must be a better way</title>
		<link>http://linkit-projects.nl/2010/04/there-must-be-a-better-way-2/</link>
		<comments>http://linkit-projects.nl/2010/04/there-must-be-a-better-way-2/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 08:58:35 +0000</pubDate>
		<dc:creator>Renzo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linkit-projects.nl/2010/04/there-must-be-a-better-way-2/</guid>
		<description><![CDATA[
			
				
			
		
A quest for a full Ajax application (in 8 parts or so)
PART 1
Here I’am a software developer with mainly server-side [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;source=linkitprojects&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><em>A quest for a full Ajax application (in 8 parts or so)</em></p>
<p><strong>PART 1</strong></p>
<p>Here I’am a software developer with mainly server-side development skills. I did my share of Java, C# and a bit of Ruby. All very nice software development environments, but they all fail in scalability(cpu and bandwidth) and ceremony(development overhead). Ruby does it slightly better considering development overhead, but still the stack seems off. Did you ever count all the different program languages you use when writing a web application.<br />
<span id="more-1119"></span></p>
<table>
<tbody>
<tr>
<th width="200px"></th>
<th style="text-align: center;">Java</th>
<th style="text-align: center;">C#</th>
<th style="text-align: center;">Ruby</th>
</tr>
<tr>
<th style="text-align: left;">build file</th>
<td style="text-align: center;">ant</td>
<td style="text-align: center;">nant</td>
<td style="text-align: center;">rake</td>
</tr>
<tr>
<th style="text-align: left;">render templates</th>
<td style="text-align: center; background-color: #ffffcc;">jsp</td>
<td style="text-align: center; background-color: #ffffcc;">aspx</td>
<td style="text-align: center; background-color: #ffffcc;">erb</td>
</tr>
<tr>
<th style="text-align: left;">config/fixtures</th>
<td style="text-align: center;">xml</td>
<td style="text-align: center;">xml</td>
<td style="text-align: center;">yaml</td>
</tr>
<tr>
<th style="text-align: left;">database access</th>
<td style="text-align: center; background-color: #ffffcc;">Mostly Hibernate<br />
with criteria DSL</td>
<td style="text-align: center; background-color: #ffffcc;">Mostly NHibernate<br />
with criteria DSL</td>
<td style="text-align: center; background-color: #ffffcc;">Active Record<br />
with SQL queries</td>
</tr>
<tr>
<th style="text-align: left;">Business DSL</th>
<td style="text-align: center;" colspan="3">project specific</td>
</tr>
<tr>
<th style="text-align: left;">View</th>
<td style="text-align: center; background-color: #ffffcc;" colspan="3">html</td>
</tr>
<tr>
<th style="text-align: left;">Styling</th>
<td style="text-align: center;" colspan="3">css</td>
</tr>
<tr>
<th style="text-align: left;">View behavior</th>
<td style="text-align: center; background-color: #ffffcc;" colspan="3">javascript</td>
</tr>
</tbody>
</table>
<p>You might even throw in some testing stuff like Fitness or cucumber. This is quite a big stack, isn’t it. Why is this an issue?<br />
Well first of all did you ever used a &amp;lt; in your code or ever wondered about the numerous ways to escape a character in a string? Pretty often a different language on your software stack is bugging you.</p>
<p>And second and probably more important. As a software engineer I like to solve my problems only once.<br />
If I would like to validate my objects I’d write some validation in my business tier. I would be nice to have the same validation also available in the web front-end(and all other types of front-end). If I’m lucky I can generate some javascript and use that, but if it get’s to complex I have to do some custom plumbing. You could use the validation in you business tier on the server, but this would mean some form of lousy validation on form post backs or continuously wacking your server with stupid validation requests, making sure you abuse CPU, bandwidth, memory and the patience of your users. Most of my application do all the easy validations with javascript on the front-end and the complex stuff on the server, It might be practical, but in the end it is a half hearted solution.</p>
<p>If you also would like to ensure the integrity of your data storage, because your users/admins keep poking around in the database. You would probably end up writing some sort of stored procedure, trigger or other hook to make the database validation dance the way you desire. Personally I end up with a disclosure clause in the contract stating</p>
<blockquote><p>“Thou shall not temper with the database”</p></blockquote>
<p>I feel ashamed for being a software engineer&#8230;. We should be able to do better than this. This is my first goal keeping applications DRY(Don’t Repeat Yourself) and simple by finding a language/software stack better fit for writing web applications.</p>
<p>The next blog will give a first glance of the new software stack</p>




	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;partner=sociable" title="Print"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;title=There%20must%20be%20a%20better%20way&amp;bodytext=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0APART%201%0D%0A%0D%0AHere%20I%E2%80%99am%20a%20software%20developer%20with%20mainly%20server-side%20development%20skills.%20I%20did%20my%20share%20of%20Java%2C%20C%23%20and%20a%20bit%20of%20Ruby.%20All%20very%20nice%20software%20development%20environments%2C%20but%20they%20a" title="Digg"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;title=There%20must%20be%20a%20better%20way&amp;notes=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0APART%201%0D%0A%0D%0AHere%20I%E2%80%99am%20a%20software%20developer%20with%20mainly%20server-side%20development%20skills.%20I%20did%20my%20share%20of%20Java%2C%20C%23%20and%20a%20bit%20of%20Ruby.%20All%20very%20nice%20software%20development%20environments%2C%20but%20they%20a" title="del.icio.us"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;t=There%20must%20be%20a%20better%20way" title="Facebook"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;title=There%20must%20be%20a%20better%20way&amp;annotation=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0APART%201%0D%0A%0D%0AHere%20I%E2%80%99am%20a%20software%20developer%20with%20mainly%20server-side%20development%20skills.%20I%20did%20my%20share%20of%20Java%2C%20C%23%20and%20a%20bit%20of%20Ruby.%20All%20very%20nice%20software%20development%20environments%2C%20but%20they%20a" title="Google Bookmarks"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.hyves.nl/profilemanage/add/tips/?name=There%20must%20be%20a%20better%20way&amp;text=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0APART%201%0D%0A%0D%0AHere%20I%E2%80%99am%20a%20software%20developer%20with%20mainly%20server-side%20development%20skills.%20I%20did%20my%20share%20of%20Java%2C%20C%23%20and%20a%20bit%20of%20Ruby.%20All%20very%20nice%20software%20development%20environments%2C%20but%20they%20a+http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;rating=5" title="Hyves"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/hyves.png" title="Hyves" alt="Hyves" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F&amp;title=There%20must%20be%20a%20better%20way&amp;source=LinkiT+projects+Effective+Software+Delivery&amp;summary=A%20quest%20for%20a%20full%20Ajax%20application%20%28in%208%20parts%20or%20so%29%0D%0A%0D%0APART%201%0D%0A%0D%0AHere%20I%E2%80%99am%20a%20software%20developer%20with%20mainly%20server-side%20development%20skills.%20I%20did%20my%20share%20of%20Java%2C%20C%23%20and%20a%20bit%20of%20Ruby.%20All%20very%20nice%20software%20development%20environments%2C%20but%20they%20a" title="LinkedIn"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=There%20must%20be%20a%20better%20way&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F04%2Fthere-must-be-a-better-way-2%2F" title="Netvibes"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://linkit-projects.nl/2010/04/there-must-be-a-better-way-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Eerste workshop Test-Driven Development groot succes</title>
		<link>http://linkit-projects.nl/2010/03/eerste-workshop-test-development-groot-succes/</link>
		<comments>http://linkit-projects.nl/2010/03/eerste-workshop-test-development-groot-succes/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 15:00:50 +0000</pubDate>
		<dc:creator>Jeroen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linkit-projects.nl/?p=896</guid>
		<description><![CDATA[
			
				
			
		
Op dinsdag 9 en woensdag 10 maart vond de eerste workshop Test-Driven Development plaats in ons cursus lokaal in De [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;source=linkitprojects&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Op dinsdag 9 en woensdag 10 maart vond de eerste <a href="/?page_id=58">workshop Test-Driven Development</a> plaats in ons cursus lokaal in De Meern. </p>
<h4>Dag 1</h4>
<p>Na een uurtje introductie en theorie was het tijd om aan de slag te gaan, het is immers een workshop en TDD leer je alleen maar door het ook daadwerkelijk te doen. Elke cursist had dan ook een computer tot zijn beschikking met daarop geïnstalleerd Visual Studio 2008 en Resharper. Hiervan werd gretig gebruik gemaakt om mij te volgen terwijl ik de eerste test schreef voor wat na twee dagen zou uitmonden in een eenvoudig cursus registratie systeem.<br />
<span id="more-896"></span><br />
Vooral het feit dat ik Test-First werkte, eerst een test schrijven en dan pas de daadwerkelijke implementatie, was voor de cursisten toch wel een redelijke &#8220;mind-shift&#8221;. De cursisten kregen dan ook ruimschoots de tijd om daar middels diverse oefeningen ervaring mee op te doen. Nadat de cursisten de ochtend hadden besteed aan het (uit)bouwen van de business logica laag van ons registratie systeem, werd het aan het begin van de middag tijd om aandacht te besteden aan diverse design/test patterns. Maar eerst even lunchen en een frisse neus halen. </p>
<p>Patterns die &#8217;s middag aan de orde kwamen waren o.a. dependency injection, inheritance en het gebruik van factories. Deze patterns hebben we vervolgens toegepast bij het testbaar houden van onze business logica en de provider laag (later op de middag). Aan het eind van dag 1 hadden we volledig Test-Driven de business logica laag gecreëerd en een deel van de provider (database) laag. </p>
<h4>Dag 2</h4>
<p>Vandaag begonnen de cursisten met een oefening in het onderkennen van testgevallen voor nieuwe eisen aan onze business logica. Vervolgens gingen de zij middels pair programming aan de slag met het coderen van de tests en het schrijven van de implementatie om deze tests te laten slagen. Weer een stukje oefening in 1 van de meest belangrijke TDD mantra&#8217;s &#8220;Red, Green, Refactor&#8221;. Het tweede deel van de ochtend werd vervolgens besteed aan het verder uitwerken van de provider en database laag. En prima gelegenheid om te laten zien en te ontdekken hoe interfaces, factories, mocks en stubs kunnen helpen voorkomen dat tests afhankelijk worden van de data in je database.</p>
<p>Na de lunch was het tijd voor de laatste laag in onze applicatie, het user interface. Hierbij begonnen we met een redelijk ontestbare web pagina (met code behind) implementatie. Middels <a href="http://www.watin.net" target="_blank">WatiN</a> borgden we het gedrag waarna we stapje voor stapje de code &#8220;achter het scherm&#8221; konden gaan aanpassen conform het MVP pattern. Door het toepassen van dit pattern werd onze user interface code ook testbaar middels unit tests, wat ons in staat stelde gecontroleerd aanpassingen te kunnen doorvoeren aan de UI logica. Met deze laatste stap ronde we de implementatie van ons cursus registratie systeem af.</p>
<p>In het tweede deel van de middag zijn we nog kort ingegaan op functioneel testen. Ook hebben we gesproken hoe al dit nou te borgen in je ontwikkel process. Continues integration is hierbij toch wel de spil waar alles om draait. En natuurlijk die ene vraag: Ga je dit morgen toepassen in je werkzaamheden en&#8230;. waarom niet.</p>
<p>Gezien de enthousisate reacties van de cursisten en het plezier dat ik ook zelf heb beleefd aan het delen van mijn kennis, krijgt deze workshop van mij het stempel: Zeer geslaagd!</p>
<p>Jeroen van Menen<br />
Trainer TDD workshop</p>




	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;partner=sociable" title="Print"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;title=Eerste%20workshop%20Test-Driven%20Development%20groot%20succes&amp;bodytext=Op%20dinsdag%209%20en%20woensdag%2010%20maart%20vond%20de%20eerste%20workshop%20Test-Driven%20Development%20plaats%20in%20ons%20cursus%20lokaal%20in%20De%20Meern.%20%0D%0A%0D%0ADag%201%0D%0ANa%20een%20uurtje%20introductie%20en%20theorie%20was%20het%20tijd%20om%20aan%20de%20slag%20te%20gaan%2C%20het%20is%20immers%20een%20workshop%20en%20TDD%20leer%20je%20" title="Digg"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;title=Eerste%20workshop%20Test-Driven%20Development%20groot%20succes&amp;notes=Op%20dinsdag%209%20en%20woensdag%2010%20maart%20vond%20de%20eerste%20workshop%20Test-Driven%20Development%20plaats%20in%20ons%20cursus%20lokaal%20in%20De%20Meern.%20%0D%0A%0D%0ADag%201%0D%0ANa%20een%20uurtje%20introductie%20en%20theorie%20was%20het%20tijd%20om%20aan%20de%20slag%20te%20gaan%2C%20het%20is%20immers%20een%20workshop%20en%20TDD%20leer%20je%20" title="del.icio.us"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;t=Eerste%20workshop%20Test-Driven%20Development%20groot%20succes" title="Facebook"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;title=Eerste%20workshop%20Test-Driven%20Development%20groot%20succes&amp;annotation=Op%20dinsdag%209%20en%20woensdag%2010%20maart%20vond%20de%20eerste%20workshop%20Test-Driven%20Development%20plaats%20in%20ons%20cursus%20lokaal%20in%20De%20Meern.%20%0D%0A%0D%0ADag%201%0D%0ANa%20een%20uurtje%20introductie%20en%20theorie%20was%20het%20tijd%20om%20aan%20de%20slag%20te%20gaan%2C%20het%20is%20immers%20een%20workshop%20en%20TDD%20leer%20je%20" title="Google Bookmarks"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.hyves.nl/profilemanage/add/tips/?name=Eerste%20workshop%20Test-Driven%20Development%20groot%20succes&amp;text=Op%20dinsdag%209%20en%20woensdag%2010%20maart%20vond%20de%20eerste%20workshop%20Test-Driven%20Development%20plaats%20in%20ons%20cursus%20lokaal%20in%20De%20Meern.%20%0D%0A%0D%0ADag%201%0D%0ANa%20een%20uurtje%20introductie%20en%20theorie%20was%20het%20tijd%20om%20aan%20de%20slag%20te%20gaan%2C%20het%20is%20immers%20een%20workshop%20en%20TDD%20leer%20je%20+http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;rating=5" title="Hyves"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/hyves.png" title="Hyves" alt="Hyves" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F&amp;title=Eerste%20workshop%20Test-Driven%20Development%20groot%20succes&amp;source=LinkiT+projects+Effective+Software+Delivery&amp;summary=Op%20dinsdag%209%20en%20woensdag%2010%20maart%20vond%20de%20eerste%20workshop%20Test-Driven%20Development%20plaats%20in%20ons%20cursus%20lokaal%20in%20De%20Meern.%20%0D%0A%0D%0ADag%201%0D%0ANa%20een%20uurtje%20introductie%20en%20theorie%20was%20het%20tijd%20om%20aan%20de%20slag%20te%20gaan%2C%20het%20is%20immers%20een%20workshop%20en%20TDD%20leer%20je%20" title="LinkedIn"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=Eerste%20workshop%20Test-Driven%20Development%20groot%20succes&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F03%2Feerste-workshop-test-development-groot-succes%2F" title="Netvibes"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://linkit-projects.nl/2010/03/eerste-workshop-test-development-groot-succes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Whitepaper: Kwaliteit binnen Agile &#8211; Building the right thing</title>
		<link>http://linkit-projects.nl/2010/02/kwaliteit-binnen-agile/</link>
		<comments>http://linkit-projects.nl/2010/02/kwaliteit-binnen-agile/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 13:41:28 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Agile software ontwikkeling]]></category>
		<category><![CDATA[kwaliteit]]></category>

		<guid isPermaLink="false">http://linkit-projects.nl/?p=155</guid>
		<description><![CDATA[
			
				
			
		
Agile is “hot”. Agile projecten beloven sneller software te leveren, die na elke iteratie onmiddellijk in productie kan. Daarnaast zou [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;source=linkitprojects&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Agile is “hot”. Agile projecten beloven <strong>sneller</strong> software te leveren, die na elke iteratie onmiddellijk in productie kan. Daarnaast zou de software <strong>beter</strong> moeten zijn. Dus sneller en beter, … daar moeten de klanten toch wel tevreden mee zijn? Business managers zijn tegenwoordig ook meer “aware” en vragen soms letterlijk aan hun ICT-afdeling om een meer “agile” aanpak. Toch lossen agile projecten in de praktijk vaak deze beloftes niet in.</p>
<p><span id="more-155"></span></p>
<p>Het één op één toepassen van de “regels” van bijvoorbeeld <a title="Scrum (wikipedia) " href="http://nl.wikipedia.org/wiki/Scrum_(softwareontwikkelmethode)" target="_blank">Scrum</a> blijkt vaak onvoldoende. Het goed begrijpen van de <strong>principes</strong> van agile software development kan al een hoop ellende voorkomen. Theoretische kennis (opgedaan in een eenmalige cursus al dan niet met certificering) en het dogmatisch toepassen van de agile procedures en “regeltjes” alleen is onvoldoende garantie voor succes. Elk project kan weliswaar putten uit dezelfde pot met agile methoden, technieken en tools, maar wat als de ingezette set in de context van een specifiek project onvoldoende blijken te werken?</p>
<p>De agilisten onder ons zullen zeggen: “Daar hebben we toch de retrospective voor?” Inderdaad, maar het is dan wel de kunst om de werkwijze zodanig aan te passen, dat het wel gaat werken voor het project. Hiervoor is het nodig om echte agile <strong>ervaring</strong> in het project in te brengen, zeker als agile nieuw is.</p>
<p>Het is ook zeer belangrijk om de <strong>discipline</strong> vast te houden. Wat we in de praktijk regelmatig tegenkomen, is dat van principiële keuzes, zoals een gezamenlijke sprint planning, TDD (test driven development), refactoring of pairing gedurende het project wordt afgestapt. Meestal wordt dit ingegeven door een korte termijn doelstelling van de project manager: tijdswinst. Wat daarmee vaak wordt opgeofferd is kwaliteit en dus ook … tijd. Immers de op korte termijn “gewonnen” tijd wordt later in veelvoud weer ingeleverd door meer bug fixing, testwerk, etcetera.</p>
<p>Verder is het belangrijk om de juiste <strong>focus</strong> te houden op het doel: het opleveren van werkende en voor de klant waardevolle software. Het proces is hieraan ondergeschikt en slechts een middel om op effectieve wijze de software op te leveren. Wat we vaak tegenkomen is het halsstarrig vasthouden aan templates en werkafspraken, terwijl die voor het betreffende team onvoldoende blijken te werken. Een goede agile coach zal hier en daar het team moeten masseren. Uiteindelijk gaat het om het handhaven van de agile principes en is de invulling – het proces – flexibel. Stand-up meetings en retrospectives zijn hierbij uitermate geschikte momenten om het proces met het gehele team tegen het licht te houden.</p>
<p>Dit drieluik van whitepapers gaat in om het aspect <strong>kwaliteit</strong> binnen agile sofware development. Hoe kunnen we ervoor zorgen dat de sofware, die een agile project elke iteratie opnieuw oplevert, inderdaad van hoge kwaliteit is. Immers, pas dan heeft de business lead (product owner in Scrum terminologie) werkelijk de keuze om na elke iteratie in productie te gaan met de opgeleverde software.</p>
<p>Een simpele, algemene definitie van kwaliteit is “de mate waarin het geleverde aan de verwachtingen van de klant voldoet”. Volgens <a title="Kwaliteit (wikipedia)" href="http://nl.wikipedia.org/wiki/Kwaliteit_(hoedanigheid)" target="_blank">ISO 8402</a> is kwaliteit: het geheel van eigenschappen en kenmerken van een product of dienst dat van belang is voor het voldoen aan vastgestelde of vanzelfsprekende behoeften. De auteur Joseph Juran beschrijft kwaliteit als “fitness for use” en Prince2 hanteert de definitie “fitness for purpose” of “conforms to requirements”.</p>
<p>“Fitness for purpose” kan worden gesplitst in:<a href="http://linkit-projects.nl/wp-content/uploads/QualityInAgile.png"></a></p>
<ul>
<li>“Building the right thing”</li>
<li>“Building the thing right”</li>
</ul>
<p>In de eerste plaats moet je de juiste requirements ontwikkelen (“building the right thing”), en deze moet je op de juiste wijze implementeren (“buidling the thing right”).</p>
<p>Binnen Linkit projects is “fitness for purpose” alleen niet voldoende. Het is mooi, dat de software nu precies doet wat de klant ervan verwacht. Maar wat als de verwachtingen van de klant wijzigen, bijvoorbeeld als gevolg van veranderingen in markt? Iedereen kent de uitspraak “resultaten behaald in het verleden bieden geen garantie voor de toekomst”. Met kwaliteit is dit net zo: “kwaliteit in het heden is geen garantie voor kwaliteit in de toekomst”. Om software van blijvende waarde te laten zijn voor de klant, dient de software mee te kunnen bewegen met de eisen en wensen van de klant. En dan wel in het tempo van de klant! Dit houdt in, dat we naast “fitness for use” ook “fitness for change” als een belangrijke peiler van kwaliteit zien.</p>
<p>In de eerste whitepaper gaan we verder in op het kwaliteitsaspect “<strong>building the right thing</strong>”: <a href="http://linkit-projects.nl/wp-content/uploads/White-paper-Kwaliteit-in-Agile-Building-the-right-thing.pdf"></a><a href="http://linkit-projects.nl/wp-content/uploads/White-paper-Kwaliteit-in-Agile-Building-the-right-thing.pdf"></a><a href="http://linkit-projects.nl/wp-content/uploads/White-paper-Kwaliteit-in-Agile-Building-the-right-thing.pdf">White paper &#8211; Kwaliteit in Agile &#8211; Building the right thing</a></p>
<p>De volgende twee whitepapers zullen ingaan op respectievelijk “building the thing right” en “fitness for change”.</p>




	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;partner=sociable" title="Print"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;title=Whitepaper%3A%20Kwaliteit%20binnen%20Agile%20-%20Building%20the%20right%20thing&amp;bodytext=Agile%20is%20%E2%80%9Chot%E2%80%9D.%20Agile%20projecten%20beloven%20sneller%20software%20te%20leveren%2C%20die%20na%20elke%20iteratie%20onmiddellijk%20in%20productie%20kan.%20Daarnaast%20zou%20de%20software%20beter%20moeten%20zijn.%20Dus%20sneller%20en%20beter%2C%20%E2%80%A6%20daar%20moeten%20de%20klanten%20toch%20wel%20tevreden%20mee%20zijn%3F%20Bus" title="Digg"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;title=Whitepaper%3A%20Kwaliteit%20binnen%20Agile%20-%20Building%20the%20right%20thing&amp;notes=Agile%20is%20%E2%80%9Chot%E2%80%9D.%20Agile%20projecten%20beloven%20sneller%20software%20te%20leveren%2C%20die%20na%20elke%20iteratie%20onmiddellijk%20in%20productie%20kan.%20Daarnaast%20zou%20de%20software%20beter%20moeten%20zijn.%20Dus%20sneller%20en%20beter%2C%20%E2%80%A6%20daar%20moeten%20de%20klanten%20toch%20wel%20tevreden%20mee%20zijn%3F%20Bus" title="del.icio.us"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;t=Whitepaper%3A%20Kwaliteit%20binnen%20Agile%20-%20Building%20the%20right%20thing" title="Facebook"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;title=Whitepaper%3A%20Kwaliteit%20binnen%20Agile%20-%20Building%20the%20right%20thing&amp;annotation=Agile%20is%20%E2%80%9Chot%E2%80%9D.%20Agile%20projecten%20beloven%20sneller%20software%20te%20leveren%2C%20die%20na%20elke%20iteratie%20onmiddellijk%20in%20productie%20kan.%20Daarnaast%20zou%20de%20software%20beter%20moeten%20zijn.%20Dus%20sneller%20en%20beter%2C%20%E2%80%A6%20daar%20moeten%20de%20klanten%20toch%20wel%20tevreden%20mee%20zijn%3F%20Bus" title="Google Bookmarks"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.hyves.nl/profilemanage/add/tips/?name=Whitepaper%3A%20Kwaliteit%20binnen%20Agile%20-%20Building%20the%20right%20thing&amp;text=Agile%20is%20%E2%80%9Chot%E2%80%9D.%20Agile%20projecten%20beloven%20sneller%20software%20te%20leveren%2C%20die%20na%20elke%20iteratie%20onmiddellijk%20in%20productie%20kan.%20Daarnaast%20zou%20de%20software%20beter%20moeten%20zijn.%20Dus%20sneller%20en%20beter%2C%20%E2%80%A6%20daar%20moeten%20de%20klanten%20toch%20wel%20tevreden%20mee%20zijn%3F%20Bus+http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;rating=5" title="Hyves"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/hyves.png" title="Hyves" alt="Hyves" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F&amp;title=Whitepaper%3A%20Kwaliteit%20binnen%20Agile%20-%20Building%20the%20right%20thing&amp;source=LinkiT+projects+Effective+Software+Delivery&amp;summary=Agile%20is%20%E2%80%9Chot%E2%80%9D.%20Agile%20projecten%20beloven%20sneller%20software%20te%20leveren%2C%20die%20na%20elke%20iteratie%20onmiddellijk%20in%20productie%20kan.%20Daarnaast%20zou%20de%20software%20beter%20moeten%20zijn.%20Dus%20sneller%20en%20beter%2C%20%E2%80%A6%20daar%20moeten%20de%20klanten%20toch%20wel%20tevreden%20mee%20zijn%3F%20Bus" title="LinkedIn"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=Whitepaper%3A%20Kwaliteit%20binnen%20Agile%20-%20Building%20the%20right%20thing&amp;url=http%3A%2F%2Flinkit-projects.nl%2F2010%2F02%2Fkwaliteit-binnen-agile%2F" title="Netvibes"><img src="http://linkit-projects.nl/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://linkit-projects.nl/2010/02/kwaliteit-binnen-agile/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
