<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>javablog.ch</title>
	<link>http://www.javablog.ch</link>
	<description>Keep on learning...</description>
	<pubDate>Wed, 24 Feb 2010 21:22:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Top-7 der XCode-Shortcuts</title>
		<link>http://www.javablog.ch/2010/02/24/top-7-der-xcode-shortcuts/</link>
		<comments>http://www.javablog.ch/2010/02/24/top-7-der-xcode-shortcuts/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 21:21:54 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[IDE]]></category>

		<category><![CDATA[objectivec]]></category>

		<category><![CDATA[shortcuts]]></category>

		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2010/02/24/top-7-der-xcode-shortcuts/</guid>
		<description><![CDATA[[Novum heute: Der erste Blogeintrag zu Objective-C bzw. XCode.]
XCode ist Apple&#8217;s IDE für die Entwicklung von iPhone und Mac-Applikationen. Allerdings ist XCode bei weitem nicht so komfortabel und mächtig wie Eclipse. Dennoch gibt es ein paar Shortcuts, die jeder iPhone-Entwickler kennen sollte:
1. cmd-shift-d (Springt schnell zu einem File, ähnlich ctrl-shift-r in Eclipse )
2. cmd-alt-up (Wechselt [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Novum heute: Der erste Blogeintrag zu Objective-C bzw. XCode.]</em><br />
XCode ist Apple&#8217;s IDE für die Entwicklung von iPhone und Mac-Applikationen. Allerdings ist XCode bei weitem nicht so komfortabel und mächtig wie Eclipse. Dennoch gibt es ein paar Shortcuts, die jeder iPhone-Entwickler kennen sollte:</p>
<p>1. cmd-shift-d (Springt schnell zu einem File, ähnlich ctrl-shift-r in Eclipse )<br />
2. cmd-alt-up (Wechselt von .h Datei zur passenden .m Datei und umgekehrt)<br />
3. cmd-shift-j (Refactor von Klassen, Methoden und Variablen)<br />
4. ctrl-shift-7  (Springt zum nächsten Platzhalter)<br />
5. cmd-shift-7 (Kommentiert markierten Code)<br />
6. ctrl-k (Löscht aktuelle Zeile)<br />
7. cmd-shift-e (Schaltet den Editor in der Projektansicht ein und aus)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2010/02/24/top-7-der-xcode-shortcuts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bauen mit Ant4Eclipse</title>
		<link>http://www.javablog.ch/2010/01/30/bauen-mit-ant4eclipse/</link>
		<comments>http://www.javablog.ch/2010/01/30/bauen-mit-ant4eclipse/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 23:49:03 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[IDE]]></category>

		<category><![CDATA[ant]]></category>

		<category><![CDATA[ant4eclipse]]></category>

		<category><![CDATA[hudson]]></category>

		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2010/01/30/bauen-mit-ant4eclipse/</guid>
		<description><![CDATA[Vor kurzem habe ich für ein bereits aufgesetztes Blackberry-Projekt einen automatischen Build für Hudson konfiguriert. Wenn Maven im Einsatz ist, ist das normalerweise schnell gemacht, aber bei diesem Projekt war der Einsatz von Maven nicht möglich. Somit bleibt einem nichts anderes übrig, als selbst ein paar Ant-Skripte zu programmieren. Klar, kein Problem. Allerdings wollte ich [...]]]></description>
			<content:encoded><![CDATA[<p>Vor kurzem habe ich für ein bereits aufgesetztes Blackberry-Projekt einen automatischen Build für <a href="https://hudson.dev.java.net/">Hudson</a> konfiguriert. Wenn Maven im Einsatz ist, ist das normalerweise schnell gemacht, aber bei diesem Projekt war der Einsatz von Maven nicht möglich. Somit bleibt einem nichts anderes übrig, als selbst ein paar Ant-Skripte zu programmieren. Klar, kein Problem. Allerdings wollte ich nicht die ganzen Projektabhängigkeiten im Ant-Skript wiederholen (<a href="http://de.wikipedia.org/wiki/Don%E2%80%99t_repeat_yourself">DRY</a> und so&#8230;), sie wurden ja schon im Eclipse-Projekt konfiguriert. </p>
<p>Aber wie bekomme ich die Informationen aus der <code>.classpath</code>-Datei ? </p>
<p>Hier hilft <a href="http://www.ant4eclipse.org/">ant4eclipse</a>: Der &#8220;getJdtClassPath&#8221;-Task extrahiert den Classpath aus dem Eclipse-Projekt und stellt ihn für die weitere Verwendung in ant bereit. Das nachfolgende Beispiel-Skript nutzt den extrahierten Classpath und kompiliert damit die Java-Klassen:</p>
<div class="codeblock">
<div class="xml" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;project</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hudson_build&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">&quot;.&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;build&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;xmlns:ant4<span style="color: #000066;">eclipse</span>=<span style="color: #ff0000;">&quot;antlib:org.ant4eclipse&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;workspaceDirectory&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${basedir}/..&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- define ant4eclipse tasks --&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;taskdef</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">&quot;antlib:org.ant4eclipse&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;org/ant4eclipse/antlib.xml&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- import the ant4eclipse platform macros --&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;import</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${basedir}/hudson/ant4eclipse/macros/a4e-platform-macros.xml&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- import the ant4eclipse jdt macros --&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;import</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${basedir}/hudson/ant4eclipse/macros/a4e-jdt-macros.xml&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;build&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ant4eclipse:getJdtClassPath</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;classpath&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">pathId</span>=<span style="color: #ff0000;">&quot;classpathref&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">workspaceDirectory</span>=<span style="color: #ff0000;">&quot;${workspaceDirectory}&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">projectName</span>=<span style="color: #ff0000;">&quot;ch.javablog.myproject&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- classes folder --&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;delete</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">failonerror</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;fileset</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;classes&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/delete<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mkdir</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;classes&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;javac</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">srcdir</span>=<span style="color: #ff0000;">&quot;src&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">destdir</span>=<span style="color: #ff0000;">&quot;classes&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">classpathref</span>=<span style="color: #ff0000;">&quot;classpathref&quot;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;1.1&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/project<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li></ol></div>
</div>
<p>Praktisch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2010/01/30/bauen-mit-ant4eclipse/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jPrep in Version 1.2 nun auf dem AppStore</title>
		<link>http://www.javablog.ch/2010/01/22/jprep-12/</link>
		<comments>http://www.javablog.ch/2010/01/22/jprep-12/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 20:32:51 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[jprep]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2010/01/22/jprep-12/</guid>
		<description><![CDATA[Wesentliche neue Features:

Erklärungstext für jede Frage
Verbesserte Listendarstellung in &#8220;MyList&#8221;
Und ganz wichtig: Schickeres Applikationsicon

Hier gehts zum Download. Viel Spaß beim Lernen.
]]></description>
			<content:encoded><![CDATA[<p>Wesentliche neue Features:</p>
<ul>
<li>Erklärungstext für jede Frage</li>
<li>Verbesserte Listendarstellung in &#8220;MyList&#8221;</li>
<li>Und ganz wichtig: Schickeres Applikationsicon</li>
</ul>
<p>Hier gehts zum <a href="http://www.itunes.com/app/jprep">Download</a>. Viel Spaß beim Lernen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2010/01/22/jprep-12/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Frontend Caching mit Expire Headers</title>
		<link>http://www.javablog.ch/2009/11/30/frontend-caching-mit-expire-headers/</link>
		<comments>http://www.javablog.ch/2009/11/30/frontend-caching-mit-expire-headers/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:18:58 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[Infrastruktur Innatura]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[cache]]></category>

		<category><![CDATA[expire]]></category>

		<category><![CDATA[frontend]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2009/11/30/frontend-caching-mit-expire-headers/</guid>
		<description><![CDATA[Eigentlich ist es ganz einfach. Aber es wird dennoch häufig vergessen. Die Rede ist vom &#8220;Expire&#8221; HTTP-Header. Er gibt dem Webbrowser zu erkennen, ab wann eine Resource &#8220;veraltet&#8221; ist. Typischerweise werden diese Header im Webserver konfiguriert (und nicht in der eigentlichen Applikation). Hier ein Beispiel aus einer Apache HTTP Konfiguration, die dafür sorgt, dass alle [...]]]></description>
			<content:encoded><![CDATA[<p>Eigentlich ist es ganz einfach. Aber es wird dennoch häufig vergessen. Die Rede ist vom &#8220;Expire&#8221; HTTP-Header. Er gibt dem Webbrowser zu erkennen, ab wann eine Resource &#8220;veraltet&#8221; ist. Typischerweise werden diese Header im Webserver konfiguriert (und nicht in der eigentlichen Applikation). Hier ein Beispiel aus einer Apache HTTP Konfiguration, die dafür sorgt, dass alle statische Komponenten nach einem Tag &#8220;veralten&#8221;.</p>
<div class="codeblock">
<pre>
<div>
        &lt;LocationMatch &#8220;^/static(.*)&#8221;&gt;
                ExpiresActive On
                ExpiresDefault &#8220;access plus 1 day&#8221;
        &lt;/LocationMatch&gt;
</div>
</pre>
</div>
<p>Allerdings besteht die Gefahr, dass Codeänderungen aufgrund des clientseitigen Caches beim Kunden erst sich nach einem Tag manifestieren. Eine Lösung ist, den Resourcen einen Timestamp des Deployments zu geben, so dass sie quasi endlos gecached werden können. Bei einem neuen Deployment erhalten die Resourcen einen neuen Timestamp. Mehr zu Frontend Best Practises gibts <a href="http://developer.yahoo.com/performance/rules.html">hier</a> oder auch <a href="http://www.amazon.de/gp/product/0596529309?ie=UTF8&#038;tag=javablog-21&#038;linkCode=as2&#038;camp=1638&#038;creative=6742&#038;creativeASIN=0596529309">hier</a><img src="http://www.assoc-amazon.de/e/ir?t=javablog-21&#038;l=as2&#038;o=3&#038;a=0596529309" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2009/11/30/frontend-caching-mit-expire-headers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Statische Codeanalysen mit Maven 2</title>
		<link>http://www.javablog.ch/2009/09/13/statische-codeanalysen-mit-maven-2/</link>
		<comments>http://www.javablog.ch/2009/09/13/statische-codeanalysen-mit-maven-2/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 18:08:09 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[Maven Mediator]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2009/09/13/statische-codeanalysen-mit-maven-2/</guid>
		<description><![CDATA[Zur Qualitätssicherung eines Softwareprojekts gehören neben Unittests auch statische Codeanalysen. Tools wie Checkstyle, Findbugs oder PMD untersuchen Java-Klassen und bewerten den Code anhand verschiedener Metriken. 
Zwar können diese Checks einen manuellen Codereview nicht ersetzen, aber Standardfehler und bekannte Anti-Patterns werden zuverlässig erkannt. Für jedes der genannten Tools gibt es ein Eclipse-Plugin, das die betreffenden Codestellen [...]]]></description>
			<content:encoded><![CDATA[<p>Zur Qualitätssicherung eines Softwareprojekts gehören neben Unittests auch statische Codeanalysen. Tools wie <a href="http://checkstyle.sourceforge.net/">Checkstyle</a>, <a href="http://findbugs.sourceforge.net/">Findbugs</a> oder <a href="http://pmd.sourceforge.net/">PMD</a> untersuchen Java-Klassen und bewerten den Code anhand verschiedener Metriken. </p>
<p>Zwar können diese Checks einen manuellen Codereview nicht ersetzen, aber Standardfehler und bekannte Anti-Patterns werden zuverlässig erkannt. Für jedes der genannten Tools gibt es ein Eclipse-Plugin, das die betreffenden Codestellen markiert. Die Anzeige der Fehler ist aber nicht ausreichend: Bei schwerwiegenden Verstössen soll auch der Build scheitern, ansonsten besteht die Gefahr, dass der Code nicht korrigiert wird. Aber wie kann man das umsetzen ? </p>
<p>Mit Maven 2 geht dies einfach mit einer Plugin-Konfiguration innerhalb des &#8220;build&#8221;-Elements. </p>
<p>Hier ein Projektbeispiel für die PMD Analyse:</p>
<div class="codeblock">
<div class="xml" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;build<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;plugins<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;groupId<span style="font-weight: bold; color: black;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/groupId<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span>maven-pmd-plugin<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;sourceEncoding<span style="font-weight: bold; color: black;">&gt;</span></span></span>${file.encoding}<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/sourceEncoding<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;minimumTokens<span style="font-weight: bold; color: black;">&gt;</span></span></span>100<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/minimumTokens<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;targetJdk<span style="font-weight: bold; color: black;">&gt;</span></span></span>${java.target.version}<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/targetJdk<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;failOnViolation<span style="font-weight: bold; color: black;">&gt;</span></span></span>true<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/failOnViolation<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;failurePriority<span style="font-weight: bold; color: black;">&gt;</span></span></span>2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/failurePriority<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;version<span style="font-weight: bold; color: black;">&gt;</span></span></span>${pmd.version}<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/version<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;executions<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;execution<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;goals<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;goal<span style="font-weight: bold; color: black;">&gt;</span></span></span>check<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/goal<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;goal<span style="font-weight: bold; color: black;">&gt;</span></span></span>cpd-check<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/goal<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/goals<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/execution<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/executions<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/plugins<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/build<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li></ol></div>
</div>
<p>Mit dieser einfachen Konfiguration wird sichergestellt, dass der Code keine PMD-Verstösse der Kategorie 1 und 2  enthält. Zudem ist garantiert, dass der Build bei Copy&#038;Paste von 100 Wörtern (bzw. Tokens) scheitert. Praktisch !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2009/09/13/statische-codeanalysen-mit-maven-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Praktisch: JD Java Decompiler</title>
		<link>http://www.javablog.ch/2009/08/29/praktisch-jd-java-decompiler/</link>
		<comments>http://www.javablog.ch/2009/08/29/praktisch-jd-java-decompiler/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 15:44:36 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[IDE]]></category>

		<category><![CDATA[decompiler]]></category>

		<category><![CDATA[jad]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[jd]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2009/08/29/praktisch-jd-java-decompiler/</guid>
		<description><![CDATA[Wenn Bibliotheken von Drittherstellern nicht vollständig dokumentiert sind, und dann auch noch der Quelltext fehlt,  kann ein Decompiler Abhilfe schaffen. Leider wurde die Entwicklung des kostenlosen Decompilers &#8220;JAD&#8221; von Pavel Kouznetsov eingestellt. 
Seit letztem Jahres steht eine Alternative namens &#8220;JD&#8221; ebenfalls kostenlos zur Verfügung. Das Projekt ist zu finden unter http://java.decompiler.free.fr/ und bietet neben [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn Bibliotheken von Drittherstellern nicht vollständig dokumentiert sind, und dann auch noch der Quelltext fehlt,  kann ein Decompiler Abhilfe schaffen. Leider wurde die Entwicklung des kostenlosen Decompilers &#8220;JAD&#8221; von Pavel Kouznetsov eingestellt. </p>
<p>Seit letztem Jahres steht eine Alternative namens &#8220;JD&#8221; ebenfalls kostenlos zur Verfügung. Das Projekt ist zu finden unter <a href="http://java.decompiler.free.fr">http://java.decompiler.free.fr/</a> und bietet neben einer schicken Standalone GUI-Version auch ein Eclipse-Plugin an. Obwohl es noch nicht ganz <a href="http://java.decompiler.free.fr/?q=bugs&#038;p=7&#038;s=4">fertig</a> ist, hinterlässt das Tool einen sehr guten Eindruck. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2009/08/29/praktisch-jd-java-decompiler/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Praktisch: Maven-Help-Plugin</title>
		<link>http://www.javablog.ch/2009/07/18/praktisch-maven-help-plugin/</link>
		<comments>http://www.javablog.ch/2009/07/18/praktisch-maven-help-plugin/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 21:34:27 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[Maven Mediator]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2009/07/18/praktisch-maven-help-plugin/</guid>
		<description><![CDATA[Apache Maven ist ein fantastisches Buildsystem, allerdings sind manche Plugins eher spartanisch dokumentiert. Für mehr Klarheit sorgt das maven-help-plugin mit seinem &#8220;describe&#8220;-goal, welches alle Goals eines Plugins inkl. der möglichen Parameter beschreibt. Beispielaufruf:
mvn help:describe -Dplugin=org.codehaus.mojo:findbugs-maven-plugin -Dfull
Ebenso hilfreich ist das &#8220;effective-pom&#8220;-goal,  mit dem ein POM inkl. aller geerbten Eigenschaften ausgegeben wird. Vor allem bei grossen [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://maven.apache.org">Apache Maven</a> ist ein fantastisches Buildsystem, allerdings sind manche Plugins eher spartanisch dokumentiert. Für mehr Klarheit sorgt das maven-help-plugin mit seinem &#8220;<strong>describe</strong>&#8220;-goal, welches alle Goals eines Plugins inkl. der möglichen Parameter beschreibt. Beispielaufruf:</p>
<p><code>mvn help:describe -Dplugin=org.codehaus.mojo:findbugs-maven-plugin -Dfull</code></p>
<p>Ebenso hilfreich ist das &#8220;<strong>effective-pom</strong>&#8220;-goal,  mit dem ein POM inkl. aller geerbten Eigenschaften ausgegeben wird. Vor allem bei grossen Projekten mit vielen Parents ist die generierte Übersicht hilfreich. Beispiel:</p>
<p><code>mvn help:effective-pom</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2009/07/18/praktisch-maven-help-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jPrep auf dem Appstore</title>
		<link>http://www.javablog.ch/2009/06/20/jprep-auf-dem-appstore/</link>
		<comments>http://www.javablog.ch/2009/06/20/jprep-auf-dem-appstore/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 12:47:08 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[jprep]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2009/06/20/jprep-auf-dem-appstore/</guid>
		<description><![CDATA[In der letzten Zeit gabs weniger Posts im Blog. Dies hatte auch einen Grund: jPrep. Seit ein paar Monaten beschäftige ich mit der Entwicklung von iPhone / iPod touch Applikationen. Die erste habe ich nun auf den Appstore gestellt.
jPrep ist ein Vorbereitungstool für die SCJP 6 (Sun Certified Java Programmer) Zertifizierung. In Form eines Quiz [...]]]></description>
			<content:encoded><![CDATA[<p>In der letzten Zeit gabs weniger Posts im Blog. Dies hatte auch einen Grund: <a href="http://www.itunes.com/app/jprep">jPrep</a>. Seit ein paar Monaten beschäftige ich mit der Entwicklung von iPhone / iPod touch Applikationen. Die erste habe ich nun auf den Appstore gestellt.</p>
<p><strong>jPrep</strong> ist ein Vorbereitungstool für die SCJP 6 (Sun Certified Java Programmer) Zertifizierung. In Form eines Quiz mit 175 Fragen wird der Anwender auf die Prüfung vorbereitet. Eine übersichtliche Statistik zeigt Stärken und Schwächen in den einzelnen Themengebieten auf. Als zusätzlichen Feature können die Quizfragen zu einer eigenen Merkliste (&#8221;MyList&#8221;) hinzugefügt werden. Für die meisten Fragen habe ich einen direkten Link auf die Java Reference (API oder die Java Language Specification) eingepflegt, der über den (applikationsinternen) Browser geöffnet werden kann. Hier ein paar Screenshots:</p>
<div style="float:left; width:320px">
<strong>Themenübersicht</strong><br />
<a href="http://www.itunes.com/app/jprep"><img src="http://www.javablog.ch/wp-content/uploads/2009/topics.png" /></a>
</div>
<div style="margin-left:340px">
<strong>Beispielfrage</strong><br />
<a href="http://www.itunes.com/app/jprep"><img src="http://www.javablog.ch/wp-content/uploads/2009/question_1.png" /></a>
</div>
<div style="clear:left"></div>
<p><br/></p>
<div style="float:left; width:320px">
<strong>Statistik</strong><br />
<a href="http://www.itunes.com/app/jprep"><img src="http://www.javablog.ch/wp-content/uploads/2009/statistics.png" /></a>
</div>
<div style="margin-left:340px">
<strong>MyList</strong><br />
<a href="http://www.itunes.com/app/jprep"><img src="http://www.javablog.ch/wp-content/uploads/2009/mylist.png" /></a>
</div>
<div style="clear:left"></div>
<p>Umgesetzt wurde es komplett mit Objective-C. Als Java-Entwickler muss man sich zwar an manche Besonderheiten der Sprache und der IDE erst mal gewöhnen, aber wenn diese Hürde geschafft ist, macht iPhone-Entwicklung richtig Spass. Apropos Spass: Für die Pflege der Fragen habe ich eine eigene Webapplikation mit Ruby On Rails geschrieben. Ging definitiv schneller als mit Java <img src='http://www.javablog.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2009/06/20/jprep-auf-dem-appstore/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Unit-Tests Teil 2: Integrationstests</title>
		<link>http://www.javablog.ch/2009/04/16/unit-tests-teil-2-integrationstests/</link>
		<comments>http://www.javablog.ch/2009/04/16/unit-tests-teil-2-integrationstests/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 18:48:31 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[Test Toccata]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2009/04/16/unit-tests-teil-2-integrationstests/</guid>
		<description><![CDATA[Im Gegensatz zu Mocktests beschränkt sich ein Integrationstest nicht auf die JVM, sondern involviert auch Fremdsysteme wie Datenbanken, LDAPs oder Webservices. Ein Integrationstest ist auf immer gleichbleibende Testdaten im Fremdsystem angewiesen, muss aber ggf. auch den schreibenden Zugriff testen. Hier bieten sich Transaktionen an: Jede Testmethode läuft in einer eigenen Transaktion, die unabhängig vom Testergebnis [...]]]></description>
			<content:encoded><![CDATA[<p>Im Gegensatz zu Mocktests beschränkt sich ein Integrationstest nicht auf die JVM, sondern involviert auch Fremdsysteme wie Datenbanken, LDAPs oder Webservices. Ein Integrationstest ist auf immer gleichbleibende Testdaten im Fremdsystem angewiesen, muss aber ggf. auch den schreibenden Zugriff testen. Hier bieten sich Transaktionen an: Jede Testmethode läuft in einer eigenen Transaktion, die unabhängig vom Testergebnis immer wieder zurückgerollt wird. Somit bleibt das Fremdsystem in einem definierten Zustand. Dennoch sollten Integrationstests nicht auf den späteren Liveinstanzen ausgeführt werden, sondern immer auf dedizierte Testinstanzen. Allerdings sollte sichergestellt sein, dass die Test- und Liveinstanzen sich gleich verhalten. </p>
<p>Integrationstests bieten sich insbesondere für Dao-Klassen an, da hier der Zugriffscode für Fremdsysteme gekapselt wird. Gute Unterstützung bietet hier das Spring Framework mit den Annotationen <strong>@RunWith</strong>, <strong>@Transactional</strong> und <strong>@TransactionalConfiguration</strong>. </p>
<p><strong>Beispiel-Code:</strong></p>
<div class="codeblock">
<div class="java" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@ContextConfiguration<span style="color: #111111;">&#40;</span>locations = <span style="color: #111111;">&#123;</span> <span style="color: #CF6F35;">&quot;/applicationContext-test-jdbc-ldap-transactional.xml&quot;</span> <span style="color: #111111;">&#125;</span><span style="color: #111111;">&#41;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@RunWith<span style="color: #111111;">&#40;</span>SpringJUnit4ClassRunner.<span style="color: #222222; font-weight: bold;">class</span><span style="color: #111111;">&#41;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Transactional</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@TransactionConfiguration<span style="color: #111111;">&#40;</span>defaultRollback = <span style="color: #222222; font-weight: bold;">true</span><span style="color: #111111;">&#41;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #222222; font-weight: bold;">public</span> <span style="color: #222222; font-weight: bold;">class</span> LdapUserDaoImplIntegrationTest</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #111111;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; @Test</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #222222; font-weight: bold;">public</span> <span style="color: #222222; font-weight: bold;">void</span> createUser<span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #111111;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// create the user</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LdapUser ldapUser = createLdapUserPeterMueller<span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MutableLdapUserIdentity identity = ldapUser.<span style="color: #537799;font-weight: bold;">getIdentity</span><span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #415D77; ">String</span></a> id = identity.<span style="color: #537799;font-weight: bold;">getSamAccountName</span><span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// method under test</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ldapUserDaoImpl.<span style="color: #537799;font-weight: bold;">createUser</span><span style="color: #111111;">&#40;</span>ldapUser<span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LdapUser testUser = ldapUserDaoImpl.<span style="color: #537799;font-weight: bold;">getLdapUserBySamAccountName</span><span style="color: #111111;">&#40;</span>id<span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #222222; font-weight: bold;">Assert</span>.<span style="color: #537799;font-weight: bold;">assertNotNull</span><span style="color: #111111;">&#40;</span><span style="color: #CF6F35;">&quot;user should now exist in ldap.&quot;</span>, testUser<span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// test more</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #111111;">&#125;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #111111;">&#125;</span></div></li></ol></div>
</div>
<p><strong>Vorteile:</strong></p>
<ul>
<li>Das konkrete Verhalten eines Fremdsystems (z.B. Active Directory, oder einer MSSQL) kann abgeprüft werden.</li>
<li>Fremde Webservices können automatisiert auf ihre Konsistenz geprüft werden.</li>
</ul>
<p><strong>Mögliche Stolperfallen:</strong></p>
<ul>
<li>Integrationstests laufen nicht offline. Bei Mavenprojekten sollten sie für die Offline-Entwicklung abgeschaltet werden, da sonst der Build scheitert. Dies kann durch ein eigenes &#8220;mobile&#8221;-Profil in Kombination mit dem <a href="http://maven.apache.org/plugins/maven-surefire-plugin/">maven-sunfire-plugin</a> sichergestellt werden.</li>
<li>Die Testausführung dauert bei Integrationstest im Vergleich zu &#8220;normalen&#8221; JUnit-Tests wesentlich länger. Bei steigender Anzahl von länger laufenden Tests ist ein kompletter Durchlauf der Tests auf den Entwicklungsmaschinen nicht mehr sinnvoll.</li>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2009/04/16/unit-tests-teil-2-integrationstests/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Phonak eStore nominiert zum &#8220;Master of Swiss Web 2009&#8243;</title>
		<link>http://www.javablog.ch/2009/03/14/phonak-estore-nominiert-zum-master-of-swiss-web-2009/</link>
		<comments>http://www.javablog.ch/2009/03/14/phonak-estore-nominiert-zum-master-of-swiss-web-2009/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 13:15:04 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2009/03/14/phonak-estore-nominiert-zum-master-of-swiss-web-2009/</guid>
		<description><![CDATA[Fantastisch: Das &#8220;eStore&#8221;-Projekt, an dem ich letztes Jahr in allen Projektphasen mitarbeiten durfte, wurde nun für den &#8220;Master of Swiss Web Award 2009&#8243; nominiert. 

Der nominierte eStore setzt auf der java-basierten Hybris PIM (Product Information Management) Platform auf, in der die Produktdaten aus mehreren Systemen (SAP, iPFG, Celum) zusammengefasst werden. Das Frontend haben wir mit [...]]]></description>
			<content:encoded><![CDATA[<p>Fantastisch: Das &#8220;eStore&#8221;-Projekt, an dem ich letztes Jahr in allen Projektphasen mitarbeiten durfte, wurde nun für den &#8220;Master of Swiss Web Award 2009&#8243; <a href="http://blog.namics.com/2009/03/jede_stimme_zahlt_best_of_swiss_award_2009.html">nominiert</a>. </p>
<p><img src="http://www.javablog.ch/wp-content/uploads/2009/estore.png" alt="Phonak eStore" /></p>
<p>Der nominierte eStore setzt auf der java-basierten <a href="http://www.hybris.de">Hybris PIM (Product Information Management) Platform</a> auf, in der die Produktdaten aus mehreren Systemen (<a href="http://www.sap.com">SAP</a>, <a href="http://www.phonak.ch/ccch/professional-2/productsp_ch/fitting/fittingsoftware-ipfg-1-7.htm">iPFG</a>, <a href="http://celum.com/de/">Celum</a>) zusammengefasst werden. Das Frontend haben wir mit Spring MVC umgesetzt. Viel Arbeit steckte auch in der Entwicklung des Carts und dem anschliessenden Bestellprozess. Zum Projekt gehörte ebenfalls das Aufsetzen der Infrastruktur: Vom Microsoft ISA 2006 als Webproxy bis hin zum eigenen Active Directory für die Kundenlogins war alles dabei.</p>
<p>Sowohl aus technischer als auch aus fachlicher Sicht ein absolut spannendes Projekt. An der Stelle ein dickes Dankeschön an alle Beteiligten !</p>
<p>Ach ja: Wer für unser Projekt abstimmen möchte muss sich erst <a href="http://netzwoche.ch/User/RegisterUser.aspx">hier</a> registrieren.</p>
<p><strong>Update 05.04.2009: Leider hats nicht zum Master gereicht. Allerdings können wir uns über Silber in der Kategorie Technology Quality und Bronze in der Kategorie Usability <a href="http://www.namics.com/presse/namics-kunde-phonak-gewinnt-best-of-swiss-web-award/">freuen</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2009/03/14/phonak-estore-nominiert-zum-master-of-swiss-web-2009/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
