<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:planet="http://planet.intertwingly.net/" xmlns:indexing="urn:atom-extension:indexing" indexing:index="no"><access:restriction xmlns:access="http://www.bloglines.com/about/specs/fac-1.0" relationship="deny"/>
  <title>PlanetDay</title>
  <updated>2008-08-29T04:30:15Z</updated>
  <generator uri="http://intertwingly.net/code/venus/">Venus</generator>
  <author>
    <name>Lars Trieloff</name>
    <email>lars.trieloff@day.com</email>
  </author>
  <id>http://dev.day.com/planetday/atom.xml</id>
  <link href="http://dev.day.com/planetday/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://dev.day.com/planetday/" rel="alternate"/>

  <entry xml:lang="en">
    <id>http://michid.wordpress.com/?p=71</id>
    <link href="http://michid.wordpress.com/2008/08/27/meta-programming-with-scala-part-iii-partial-function-application/" rel="alternate" type="text/html"/>
    <title>Meta-Programming with Scala Part III: Partial function application</title>
    <summary>In my previous post about Meta-Programming with Scala I suspected that there was no way to express partial function application in Scala’s type system. However Matt Hellige proofed me wrong in his comment.


His solution uses a trait for partially applying a function to some of its arguments. An abstract type exposed by the trait represents [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>
In my <a href="http://michid.wordpress.com/2008/07/30/meta-programming-with-scala-part-ii-multiplication/">previous post</a> about <a href="http://en.wikipedia.org/wiki/Metaprogramming">Meta-Programming</a> with <a href="http://www.scala-lang.org/">Scala</a> I suspected that there was no way to express partial function application in Scala’s type system. However <a href="http://matt.immute.net/">Matt Hellige</a> proofed me wrong in his <a href="http://michid.wordpress.com/2008/07/30/meta-programming-with-scala-part-ii-multiplication/#comment-69">comment</a>.
</p>
<p>
His solution uses a <a href="http://www.scala-lang.org/node/126">trait</a> for partially applying a function to some of its arguments. An <a href="http://www.scala-lang.org/node/105">abstract type</a> exposed by the trait represents the resulting function which takes the remaining arguments.
</p>
<pre class="java" name="code">
object Partial {
  // Partial application of f2 to x
  trait papply[f2[_, _], x] {
    type f1[y] = f2[x, y]
  }

  // apply f to x
  type apply[f[_], x] = f[x]

  trait X
  trait Y
  trait F[A1, A2]

  // Test whether applying the partial application of
  // F to X to Y equals in the type F[X, Y]
  case class Equals[A &gt;: B &lt;: B, B]
  Equals[apply[papply[F, X]#f1, Y], F[X, Y]]
}
</pre>
<p>
Having this solved we can define a type which encodes <a href="http://michid.wordpress.com/2008/07/30/meta-programming-with-scala-part-ii-multiplication/">multiplication on the Church Numerals</a>.
</p>
<pre class="java" name="code">
    trait curry[n[_[_], _], s[_]] {
      type f[z] = n[s, z]
    }

    // Multiplication for this encoding
    type mult[m[_[_], _], n[_[_], _], s[_], z] = m[curry[n, s]#f, z]
</pre>
<p>
A full working example is available from my <a href="http://michid.wordpress.com/code/meta-programming-with-scala-multiplication/">code page</a>. Note, the code takes forever (i.e. some minutes) to compile. Matt also noted an <a href="http://www.nabble.com/compiler-weirdness-with-crazy-types-td18781474.html">issue with squares</a>. With my version of the compiler (Ecipse plugin 2.7.2.r15874-b20080821120313) the issue does not show up however.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/michid.wordpress.com/71/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/michid.wordpress.com/71/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/michid.wordpress.com/71/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michid.wordpress.com/71/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/michid.wordpress.com/71/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michid.wordpress.com/71/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/michid.wordpress.com/71/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michid.wordpress.com/71/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/michid.wordpress.com/71/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michid.wordpress.com/71/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/michid.wordpress.com/71/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michid.wordpress.com/71/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michid.wordpress.com&amp;blog=2538862&amp;post=71&amp;subd=michid&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-08-27T22:35:06Z</updated>
    <category term="Uncategorized"/>
    <category term="Generics"/>
    <category term="Meta-Programming"/>
    <category term="Scala"/>
    <author>
      <name>michid</name>
    </author>
    <source>
      <id>http://michid.wordpress.com</id>
      <link href="http://michid.wordpress.com/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://michid.wordpress.com" rel="alternate" type="text/html"/>
      <subtitle>Hacking Scala</subtitle>
      <title>Michid's Weblog</title>
      <updated>2008-08-27T22:38:01Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-31254910.post-8782857559351394509</id>
    <link href="http://feeds.feedburner.com/~r/CoffeeGems/~3/375152454/flex-open-source-right.html" rel="alternate" type="text/html"/>
    <link href="http://www.blogger.com/comment.g?blogID=31254910&amp;postID=8782857559351394509" rel="replies" type="text/html"/>
    <link href="http://michaelmarth.blogspot.com/feeds/8782857559351394509/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/8782857559351394509?v=2" rel="self" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/8782857559351394509?v=2" rel="edit" type="application/atom+xml"/>
    <title>Flex Open Source? Right...</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">There is <a href="http://bugs.adobe.com/jira/browse/SDK-11841">a bug</a> in the Flash player that makes it impossible to implement a RESTful architecture with a Flex or Flash backend. In essence, it is a buggy implementation of an http client - the client cannot get to the response body unless the reponse code is 200.. This is really bad. But what is an embarrassment for Adobe is that:<br/><ol><li>That bug was opened more than a year ago</li><li>It is marked as priority C only</li><li>It was closed and had to be reopened <a href="http://bugs.adobe.com/jira/browse/SDK-11841#action_165337">after the community complained</a></li><li>Adobe engineers suggested as a workaround <a href="http://bugs.adobe.com/jira/browse/SDK-13765#action_168409">to purchase LCDS Server</a></li></ol>So, lessons learned (actually: lessons that proof in practice <a href="http://developers.slashdot.org/comments.pl?sid=232327&amp;cid=18884663">what was clear beforehand</a>):<br/><ol><li>It does not matter too much if Flex is open-sourced as long as the Flash player is not</li><li>It does not matter <span style="font-weight: bold;">at all</span> if Flex or Flash are open-sourced if the community cannot apply patches and get them into the deployed player</li></ol>Flex being open source is completely irrelevant.</div>
    </content>
    <updated>2008-08-26T11:50:13Z</updated>
    <published>2008-08-26T11:35:00Z</published><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://michaelmarth.blogspot.com/2008/08/flex-open-source-right.html</feedburner:origlink>
    <author>
      <name>Michael Marth</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/03925861261744910154</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-31254910</id>
      <author>
        <name>Michael Marth</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/03925861261744910154</uri>
      </author>
      <link href="http://michaelmarth.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://www.blogger.com/feeds/31254910/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" rel="next" type="application/atom+xml"/>
      <link href="http://michaelmarth.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://feeds.feedburner.com/CoffeeGems" rel="self" type="application/atom+xml"/>
      <subtitle>Random thoughts on software development (mostly about Java and Ruby, but also Flex and .net)</subtitle>
      <title>Coffee &amp; Gems</title>
      <updated>2008-08-28T11:18:50Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/lotd20080825.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/lotd20080825.html" rel="alternate" type="text/html"/>
    <title>[LOTD] JCR in the sky</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Storing data within <a href="http://en.wikipedia.org/wiki/Cloud_computing">the cloud</a> (<a href="http://www.trackvia.com/blog/?p=45">formerly known as SaaS, the elderly might even remember ASP</a>) is the latest craze. If you want to jump on that bandwaggon or simply have a lot of files check out Scott Dietrich's Jackrabbit DataStore for <a href="http://www.amazon.com/gp/browse.html?node=16427261">Amazon S3</a>. Scott has <a href="http://markmail.org/message/iny24qxsieutfzeq">posted a link to the sources</a> on the Jackrabbit user list.</p></div>
    </summary>
    <updated>2008-08-25T14:00:06Z</updated>
    <category term="link of the day"/>
    <category term="jackrabbit"/>
    <category term="jcr"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/evolution.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/evolution.html" rel="alternate" type="text/html"/>
    <title>Sling is an evolutionary step for WCMSs</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
<a href="http://dev.day.com/microsling/content/blogs/main/cq5beta2.html">Communique 5</a> is currently being built on top of Apache Sling. I believe this is a step forward in the overall architectural evolution of web content management systems because it exposes a new type of interface to developers of content centric applications: the web infrastructure layer. Let me explain this idea in the context of CMS history:
</p>

<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">1. The Big Blob</h6>

<p>
Seen from a developer's perspective early CMSs came along as one big piece of software . If you wanted to develop custom applications with them you usually had to develop on top of the CMS API. This API for WCMS would contain abstractions like "paragraph", "user" or "workflow" and expose actions like "publish a page", i.e. the abstraction level was the level of the WCMS business logic (I use the term "business logic" as in "the business of managing content"). For the purpose of this argument, let's call these APIs the "business level API".
</p>

<p><img src="http://dev.day.com/microsling/content/blogs/main/evolution/docroot/cq51.png"/></p>

<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">2. Splitting off the repository</h6>

<p>
It was obvious that the content had to be also accessible for developers outside of the context of the business-layer API. Thus, the repository layer was abstracted: a number of CMSs created an API that allowed direct access to the content, either through JCR/JSR-170 or some proprietary API. This gave developers two choices how to access the content: either in the context of the business API or the "raw" access through, say, JCR.
</p>
<p>
Introducing the repository-level API can be seen as a clean architectural cut for a CMS in order to improve <a href="http://en.wikipedia.org/wiki/Separation_of_concerns">separation of concerns</a>.
</p>

<p><img src="http://dev.day.com/microsling/content/blogs/main/evolution/docroot/cq52.png"/></p>


<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">3. Splitting off the web infrastructure</h6>

<p>
In this next evolutionary step we take what is left of the WCMS after the repository is split off and separate off another layer: the web infrastrucure (Sling). This layer contains the basic plumbing required to build web apps, e.g. request handling, selecting content, script execution, authentication, filters etc. This leaves the business layer with the business logic only.
</p>

<p><img src="http://dev.day.com/microsling/content/blogs/main/evolution/docroot/cq53.png"/></p>


<p>
One effect of splitting off the web infrastructure is that developers can write web applications that sit "next to" the WCMS application rather than running on top of the WCMS. This means that these developers do not need to be concerned with (and learn about) the particular CMS business logic because they have <em>access to the web application infrastructure</em> provided by the CMS.
</p>

<p><img src="http://dev.day.com/microsling/content/blogs/main/evolution/docroot/cq54.png"/></p>


<p>
This is a second architectural cut and separation of concerns that acknowledges that there are different types of content centric applications and WCMS is only one of them (consider forums, blogs, media asset management, wikis, etc). These different content-centric apps share requirements for repositories and web infrastructure, though.
</p>
<p>
It should be noted that compared to the second step above this additional separation of concerns does not really allow you to do anything that was not possible before. However, it is such a big advancement in terms of developer productivity that I consider it to be a qualitative change. (If  you disagree: Try building a web app starting with just a connection to your repository and another one on top of Sling. You will understand.)
</p>

<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">Some clarifications</h6>

<p>
There are of course myriads of WCMSs already that let developers write extensions or modules or similar. That approach is different though because these applications run "within" the CMS context, i.e. the developer is still interfacing the business layer. On top of Sling, your app is a  <b>first-class</b> citizen just like CQ5.
</p>
<p>
This CMS-oriented view of the world and its history might seem strange if you look from an application server angle: in the app server world the persistence layer, the application framework (Struts, PHP, ...) and the application were always neatly separated - so Sling would be nothing new. However, this is not quite the same situation as step 3 in the CMS world because in the classical web infrastructure world the application framework knows nothing about the underlying repository - usually it just handles database connection pooling or similar. Sling does know about the repository and thus it can provide additional functionality. Therefore, if you want to stay in the classical web infrastructure picture you could regard Sling as a very specialized application framework (specialized for content-centric applications). AFAIK this is a new piece of infrastructure that did not exist before.</p></div>
    </summary>
    <updated>2008-08-18T08:00:10Z</updated>
    <category term="cms"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://www.osoco.org/blog/?p=36</id>
    <link href="http://www.osoco.org/blog/?p=36" rel="alternate" type="text/html"/>
    <title>Happy Birthday Madonna</title>
    <summary>Today is a great day to celebrate a birthday…</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Today is a great day to celebrate a birthday…</p></div>
    </content>
    <updated>2008-08-16T07:06:00Z</updated>
    <category term="Allgemein"/>
    <author>
      <name>cziegeler</name>
    </author>
    <source>
      <id>http://www.osoco.org/blog</id>
      <link href="http://www.osoco.org/blog/?feed=rss2" rel="self" type="application/atom+xml"/>
      <link href="http://www.osoco.org/blog" rel="alternate" type="text/html"/>
      <subtitle>Every Day is a Good Day</subtitle>
      <title>A Matter of Unimportance</title>
      <updated>2008-08-16T07:06:00Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/javamagazin.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/javamagazin.html" rel="alternate" type="text/html"/>
    <title>Javamagazin</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>If you happen to live in Germany, Switzerland or Austria (and speak German) make sure you do not miss <a href="http://it-republik.de/jaxenter/java-magazin-ausgaben/Was-ist-Content%3F-000265.html">this month's Javamagazin</a>. The title story is "Was ist Content?" ("what is content?") and there is also an introductory article about JCR and Apache Jackrabbit.
</p>

<p><a href="http://it-republik.de/jaxenter/java-magazin-ausgaben/Was-ist-Content%3F-000265.html"><img src="http://dev.day.com/microsling/content/blogs/main/javamagazin/docroot/JM.jpg"/></a></p>

<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">The abstracts:</h6>

<p>
<b>Was ist Content?</b><br/><br/>

Bilder, Videos, Texte – man erkennt Content, wenn man ihn sieht. Aber hat Content charakteristische Eigenschaften, die ihn von reinen Daten unterscheiden? In Gesprächen über Content und Content-Management ist gelegentlich festzustellen, dass Content mit relationalen Datenbanken oder Dateisystemen gleich gesetzt wird. Obwohl Content letzten Endes oft im Dateisystem oder einer Datenbank gespeichert wird, wird eine Reduktion auf diese Low-Level-Sicht der Thematik nicht gerecht. Content ist eine spezielle Form von Daten, denen eine eigene Qualität innewohnt. Insofern ist auch Content-Management mehr als nur eine Datenbankmaske.<br/>
<i>David Nüscheler, Michael Marth</i>
</p>
<p>
<b>JCR und Apache Jackrabbit</b><br/><br/>

Der JCR-Standard (Content Repository API for Java) beschreibt eine klare Schnittstelle zwischen Anwendung und Content-Ablage. Das hierdurch definierte Content Repository stellt die dem Content typischen Eigenschaften und Funktionalitäten in standardisierter Weise zur Verfügung. Dies erleichtert erheblich die systemübergreifende Nutzung von Content und erschließt damit ein bisher nur mit viel Mühen auszuschöpfendes Potenzial.<br/>
<i>Michael Marth, Gerd Handke, David Nüscheler, Carsten Ziegeler</i>
</p></div>
    </summary>
    <updated>2008-08-14T08:30:13Z</updated>
    <category term="everything is content"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://michid.wordpress.com/?p=64</id>
    <link href="http://michid.wordpress.com/2008/08/13/type-safe-builder-pattern-in-java/" rel="alternate" type="text/html"/>
    <title>Type-safe Builder Pattern in Java</title>
    <summary>In this post I deviate a bit from the topic of my recent posts about Meta-Programming with Scala. I will have more to say about the latter topic in upcoming posts however. 
Recently I read this rather fascinating post about a Type-safe Builder Pattern in Scala. When Heinz Kabutz mentioned the builder pattern in his [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>In this post I deviate a bit from the topic of my <a href="http://michid.wordpress.com/2008/04/18/meta-programming-with-scala-part-i-addition/">recent</a> <a href="http://michid.wordpress.com/2008/07/30/meta-programming-with-scala-part-ii-multiplication/">posts</a> about Meta-Programming with <a href="http://www.scala-lang.org/">Scala</a>. I will have more to say about the latter topic in upcoming posts however. </p>
<p>Recently I read this rather fascinating post about a <a href="http://blog.rafaelferreira.net/2008/07/type-safe-builder-pattern-in-scala.html">Type-safe Builder Pattern in Scala</a>. When <a href="http://www.javaspecialists.eu/index.jsp">Heinz Kabutz</a> mentioned the <a href="http://en.wikipedia.org/wiki/Builder_pattern">builder pattern</a> in his <a href="http://www.javaspecialists.eu/archive/Issue163.html">latest issues</a> of the <a href="http://www.javaspecialists.eu/archive/archive.jsp">The Java Specialists’ Newsletter</a> I decided to try to come up with a type safe version for Java. </p>
<p>What I finally came up with is not strictly a builder but something I rather call an initializer. The initializer contains the initial state required by the target object. The state is accumulated within the initializer. Only when the state is complete can it be passed to the targets object’s constructor. Java’s type system prevents passing a initializer with an incomplete state to the target class’s constructor.</p>
<pre class="java" name="code">
public class Foo {
  private final int a;
  private final int b;

  public Foo(Initializer&lt;TRUE, TRUE&gt; initializer) {
    this(initializer.a, initializer.b);
  }

  private Foo(int a, int b) {
    super();
    this.a = a;
    this.b = b;
  }

  public String toString() {
    return "a = " + a + ", b = " + b;
  }

  public static class Initializer&lt;HA, HB&gt; {
    private int a;
    private int b;

    private Initializer() {
      super();
    }

    private Initializer(int a, int b) {
      super();
      this.a = a;
      this.b = b;
    }

    public static Initializer&lt;FALSE, FALSE&gt;create() {
      return new Initializer&lt;FALSE, FALSE&gt;();
    }

    public Initializer&lt;TRUE, HB&gt; setA(int a) {
      this.a = a;
      return new Initializer&lt;TRUE, HB&gt;(a, this.b);
    }

    public Initializer&lt;HA, TRUE&gt; setB(int b) {
      this.b = b;
      return new Initializer&lt;HA, TRUE&gt;(this.a, b);
    }

    static abstract class TRUE {}
    static abstract class FALSE {}
  }

}
</pre>
<p>The basic technique is the same as for the <a href="http://blog.rafaelferreira.net/2008/07/type-safe-builder-pattern-in-scala.html">Type-safe Builder Pattern in Scala</a>: the phantom types <em>TRUE</em> and <em>FALSE</em> are used to keep track of the state. Only a complete state will result in a <em>Initialiter</em> instance which subsequently can be passed to <em>Foo</em>’s constructor.</p>
<p>Here is how this is used:</p>
<pre class="java" name="code">
public class Main {
  public static void main(String[] args) {
    Initializer&lt;?, ?&gt; initializer = Initializer.create();

    // Foo.create(initializer);           // won't compile
    // Foo.create(initializer.setB(1));   // won't compile
    // Foo.create(initializer.setA(1));   // won't compile

    Foo foo = new Foo(initializer.setA(1).setB(2));
    System.out.println(foo);
  }
}
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/michid.wordpress.com/64/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/michid.wordpress.com/64/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/michid.wordpress.com/64/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michid.wordpress.com/64/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/michid.wordpress.com/64/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michid.wordpress.com/64/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/michid.wordpress.com/64/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michid.wordpress.com/64/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/michid.wordpress.com/64/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michid.wordpress.com/64/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/michid.wordpress.com/64/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michid.wordpress.com/64/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michid.wordpress.com&amp;blog=2538862&amp;post=64&amp;subd=michid&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-08-13T21:00:26Z</updated>
    <category term="Uncategorized"/>
    <category term="Java"/>
    <category term="Generics"/>
    <category term="Pattern"/>
    <author>
      <name>michid</name>
    </author>
    <source>
      <id>http://michid.wordpress.com</id>
      <link href="http://michid.wordpress.com/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://michid.wordpress.com" rel="alternate" type="text/html"/>
      <subtitle>Hacking Scala</subtitle>
      <title>Michid's Weblog</title>
      <updated>2008-08-27T22:38:01Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/opensearch.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/opensearch.html" rel="alternate" type="text/html"/>
    <title>Implementing OpenSearch in 10 Minutes</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
One of the productivity-boosting features of <a href="http://en.wikipedia.org/wiki/Content_repository_API_for_Java">JCR</a> is the included search engine (which is <a href="http://lucene.apache.org/">Apache Lucene</a> in case of <a href="http://jackrabbit.apache.org/">Jackrabbit</a> and <a href="http://www.day.com/content/site/en/index/solutions/content-centric_infrastructure/content_repository.html">CRX</a>). This feature can be used to very quickly develop an <a href="http://www.opensearch.org/Home">OpenSearch</a> interface for a <a href="http://incubator.apache.org/sling/site/index.html">Sling</a>-based application.
</p>
<p>
I have recently <a href="http://dev.day.com/microsling/content/blogs/main/anothersampleapp.html">provided a Sling example application called Notes</a> which I want to use to demonstrate the implementation of OpenSearch. Import the Notes application into your CRX Quickstart (<a href="http://dev.day.com/microsling/content/blogs/cup/downloads.c.html">download Quickstart</a> if you do not have it, yet). For importing navigate to http://localhost:7402/crx/index.jsp and start the Package Manager.
</p>
<p>
In OpenSearch search results can be in different formats. Let's start with producing results in XHTML. Add a new file at /apps/notes/opensearch.jsp. It shall contain:
</p>

<div class="codesnippet scrollablecodesnippet">
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;%@page import="javax.jcr.query.*, javax.jcr.*"%&gt;
&lt;%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%&gt;
&lt;sling:defineObjects/&gt;
&lt;%@ include file="/apps/notes/util.jsp" %&gt;
&lt;%
String q = "/jcr:root/content/notes//*["+ SearchUtils.parameterToQuery(request.getParameter("qt")) +"]";
Query query = currentNode.getSession().getWorkspace().getQueryManager().createQuery(q, "xpath");
NodeIterator result = query.execute().getNodes();
%&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
  &lt;head profile="http://a9.com/-/spec/opensearch/1.1/" &gt;
    &lt;title&gt;Notes app search results&lt;/title&gt;
    &lt;link rel="search" type="application/opensearchdescription+xml" href="http://localhost:7402/apps/notes/opensearch" title="Notes Search" /&gt;
    &lt;meta name="&lt;%=result.getSize()%&gt;" content="4230000"/&gt;
    &lt;link rel="stylesheet" href="/apps/notes/static/blue.css"&gt;
  &lt;/head&gt;&lt;body&gt;
    &lt;div id="Header"&gt;&lt;a href="/content/notes.html"&gt;&lt; back to thread overview&lt;/a&gt;&lt;/div&gt;&lt;div id="Content"&gt;
    &lt;h1&gt;search results for query &lt;%=request.getParameter("qt") %&gt;, hits: &lt;%=result.getSize()%&gt;&lt;/h1&gt;&lt;ul&gt;&lt;%@ include file="/apps/notes/searchBox.jsp" %&gt;&lt;ul&gt;
&lt;%
while(result.hasNext()) {
  Node n = result.nextNode();
  String t = n.getProperty("body").getValue().getString();
%&gt;		
    &lt;li&gt;
    &lt;a href="http://localhost:7402&lt;%=n.getPath()%&gt;.thread.html"&gt;&lt;%=t.length() &gt; 50 ? t.substring(0,50) + "..." : t%&gt;&lt;/a&gt;
    &lt;div&gt;&lt;p&gt;&lt;%=t%&gt;&lt;/p&gt;&lt;/div&gt;
    &lt;/li&gt;
&lt;%}%&gt;		
&lt;/ul&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
</pre></div>
<p>
There is only a few OpenSearch-related lines like the link to the OpenSearch descriptor file (explained further below)
</p>
<div class="codesnippet scrollablecodesnippet">
<pre>&lt;link rel="search" type="application/opensearchdescription+xml" href="http://localhost:7402/apps/notes/opensearch" title="Notes Search" /&gt;
</pre></div>
<p>
and the META tag that describes the result set:
</p>
<div class="codesnippet scrollablecodesnippet">
<pre>&lt;meta name="&lt;%=result.getSize()%&gt;" content="4230000"/&gt;
</pre></div>
<p>
The rest of this jsp is just using the standard JCR-provided query functionality to produce standard XHTML. That's it. This is your shiny new OpenSearch interface (I need to stress this once more because it's really cool: no search engine crawling or or other setup was needed. Neither was there any JCR-JSP-wiring or other web app configuration). Point your browser to: http://localhost:7402/content/notes.opensearch.html?qt=JCR to have a look (the request parameter qt denotes the query term).
</p>
<p><img src="http://dev.day.com/microsling/content/blogs/main/opensearch/docroot/xhtml.jpg"/></p>
<p>
The above mentioned descriptor file describes the app's search capabilities to external parties. Given the link element from above it needs to be in /apps/notes/opensearch and shall contain:
</p>
<div class="codesnippet scrollablecodesnippet">
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"&gt;
  &lt;ShortName&gt;Notes app&lt;/ShortName&gt;
  &lt;Description&gt;Notes app search interface&lt;/Description&gt;
  &lt;Url type="text/html" template="http://localhost:7402/content/notes.opensearch.html?qt={searchTerms}"/&gt;
  &lt;Url type="application/rss+xml" template="http://localhost:7402/content/notes.opensearchrss.xml?qt={searchTerms}"/&gt;
  &lt;Url type="application/x-suggestions+json" template="http://localhost:7402/content/notes.opensearchsuggestions.json?qt={searchTerms}"/&gt;
&lt;/OpenSearchDescription&gt;
</pre></div>
<p>
The first URL element describes the XHTML-based output implemented discussed above. OpenSearch also allows RSS-based output which is described in the second URL-element. The implementation of RSS-based OpenSearch results is even more succinct because there is less boiler-plate code. Create the renderer file /apps/notes/opensearchrss.xml.jsp and let it contain:
</p>
<div class="codesnippet scrollablecodesnippet">
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;rss version="2.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"&gt;
&lt;%@page import="javax.jcr.query.*, javax.jcr.*"%&gt;
&lt;%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%&gt;
&lt;sling:defineObjects/&gt;
&lt;%@ include file="/apps/notes/util.jsp" %&gt;
&lt;%
String q = "/jcr:root/content/notes//*["+ SearchUtils.parameterToQuery(request.getParameter("qt")) +"]";
Query query = currentNode.getSession().getWorkspace().getQueryManager().createQuery(q, "xpath");
NodeIterator result = query.execute().getNodes();
%&gt;
&lt;channel&gt;
  &lt;title&gt;Local Notes app&lt;/title&gt;
  &lt;link&gt;http://localhost:7402/content/notes.html&lt;/link&gt;
  &lt;description&gt;Search results for "&lt;%=request.getParameter("qt") %&gt;" at the local Notes app&lt;/description&gt;
  &lt;opensearch:totalResults&gt;&lt;%=result.getSize()%&gt;&lt;/opensearch:totalResults&gt;
&lt;%
while(result.hasNext()) {
	Node n = result.nextNode();
%&gt;
  &lt;item&gt;
    &lt;% String t = n.getProperty("body").getValue().getString(); %&gt;
    &lt;title&gt;&lt;%=t.length() &gt; 50 ? t.substring(0,50) + "..." : t%&gt;&lt;/title&gt;
    &lt;link&gt;http://localhost:7402&lt;%=n.getPath()%&gt;.thread.html&lt;/link&gt;
    &lt;description&gt;&lt;%=t%&gt;&lt;/description&gt;
  &lt;/item&gt;
&lt;%}%&gt;
&lt;/channel&gt;&lt;/rss&gt;
</pre></div>
<p>
Hit http://localhost:7402/content/notes.opensearchrss.xml?qt=JCR with your browser or any other RSS viewer to retrieve the search results in RSS format.
</p>

<p><img src="http://dev.day.com/microsling/content/blogs/main/opensearch/docroot/rss.jpg"/></p>

<p>
OK, this is simple to implement, but what is it good for? For example, <a href="http://www.opensearch.org/Community/OpenSearch_search_clients">recent browsers</a> support autodiscovery of OpenSearch engines and allow users to add them to the browser's upper right search box. Simply add a link in the HTML page's header:
</p>
<div class="codesnippet scrollablecodesnippet">
<pre>&lt;link rel="search" type="application/opensearchdescription+xml" title="Notes" href="http://localhost:7402/apps/notes/opensearch"&gt;
</pre></div>
<p>
I have tested this in IE7 and FF2:
</p>

<p><img src="http://dev.day.com/microsling/content/blogs/main/opensearch/docroot/ie.jpg"/></p>
<p><img src="http://dev.day.com/microsling/content/blogs/main/opensearch/docroot/ff.jpg"/></p>

<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">Search Suggestions</h6>


<p>
There is an <a href="http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.0">enhancement suggested for upcoming versions of OpenSearch that would standardize search suggestions</a>. In Firefox, however, a <a href="http://developer.mozilla.org/en/docs/Supporting_search_suggestions_in_search_plugins">similar feature is already implemented</a>. The third URL in the descriptor file describes the interface for search suggestions in FF (i.e. this will not work in IE). The corresponding implementation at /apps/notes/opensearchsuggestions.json.jsp looks like this:
</p>
<div class="codesnippet scrollablecodesnippet">
<pre>&lt;%@page import="javax.jcr.query.*, javax.jcr.*, java.util.*"%&gt;
&lt;%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%&gt;
&lt;sling:defineObjects/&gt;
&lt;%@ include file="/apps/notes/util.jsp" %&gt;
&lt;%
// Hashmap to collect and count full words that contain the query term
TreeSet&lt;String&gt; collector = new TreeSet();

// only accept min 2 char strings and does not end with a blank
if((request.getParameter("qt").length() &gt; 1) &amp;&amp; !(request.getParameter("qt").endsWith(" "))) {

// the actual search
String q = "/jcr:root/content/notes//*[" + SearchUtils.parameterToSuggestionQuery(request.getParameter("qt")) + "]";
Query query = currentNode.getSession().getWorkspace().getQueryManager().createQuery(q, "xpath");
NodeIterator result = query.execute().getNodes();

// the constant part of the suggestions
String constantPart = "";
String[] requestTokens = request.getParameter("qt").split("\\s");  
for (int x=0; x&lt;requestTokens.length - 1; x++) constantPart += requestTokens[x] + " ";

// we need to see what the actual word was where the search result occurred
while(result.hasNext()) {
  Node n = result.nextNode();
  String[] tokens = n.getProperty("body").getValue().getString().split("\\s");  
  for (int i=0; i&lt;tokens.length; i++) if(tokens[i].toLowerCase().contains(requestTokens[requestTokens.length-1].toLowerCase())) collector.add(tokens[i]);
}

// print result
// format is e.g. ["fi", ["firefox", "first", "fist"]]
%&gt;["&lt;%=request.getParameter("qt")%&gt;", [&lt;%
boolean first = true;
Iterator results = collector.iterator();
while(results.hasNext()) { %&gt;
  &lt;%=!first?", ":""%&gt;"&lt;%=constantPart + results.next()%&gt;"
  &lt;% first = false; }%&gt; ]]
&lt;%} else { // if the query term is only 1 char long%&gt;
["&lt;%=request.getParameter("qt")%&gt;",[]]
&lt;%}%&gt;
</pre></div>
<p>
As the jsp's file name suggests the jsp returns json-formatted data. The returned data is a collection of suggestions based on the actual content (i.e. suggesting words that would produce hits). The format for a query "fi" must be of the form ["fi", ["firefox", "first", "fist"]]. Most of the code deals with String manipulation which is a bit verbose in Java. Also, I wanted to have multi-word queries like "jcr re" return suggestions for the last word only (i.e. ["jcr re", ["jcr repository", "jcr renderer"]]) which requires a couple of additional lines of code.
</p>
<p><img src="http://dev.day.com/microsling/content/blogs/main/opensearch/docroot/ffs.jpg"/></p>
<p>
As usual, the full application including the complete sources is attached to this post in CRX Package Manager format.
</p></div>
    </summary>
    <updated>2008-08-12T13:30:08Z</updated>
    <category term="sling"/>
    <category term="tutorial"/>
    <category term="open"/>
    <category term="rad"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-31254910.post-2545810500165718835</id>
    <link href="http://feeds.feedburner.com/~r/CoffeeGems/~3/362829950/disappointed-with-scriptaculous.html" rel="alternate" type="text/html"/>
    <link href="http://www.blogger.com/comment.g?blogID=31254910&amp;postID=2545810500165718835" rel="replies" type="text/html"/>
    <link href="http://michaelmarth.blogspot.com/feeds/2545810500165718835/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/2545810500165718835?v=2" rel="self" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/2545810500165718835?v=2" rel="edit" type="application/atom+xml"/>
    <title>Disappointed with Scriptaculous</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">The <a href="http://github.com/madrobby/scriptaculous/wikis/ajax-autocompleter">Autocompleter</a> <span style="font-style: italic;">looks </span>nice, but why the heck does it send a POST to retrieve suggestions? I had to walk away from it.</div>
    </content>
    <updated>2008-08-12T10:57:03Z</updated>
    <published>2008-08-12T10:42:00Z</published><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://michaelmarth.blogspot.com/2008/08/disappointed-with-scriptaculous.html</feedburner:origlink>
    <author>
      <name>Michael Marth</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/03925861261744910154</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-31254910</id>
      <author>
        <name>Michael Marth</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/03925861261744910154</uri>
      </author>
      <link href="http://michaelmarth.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://www.blogger.com/feeds/31254910/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" rel="next" type="application/atom+xml"/>
      <link href="http://michaelmarth.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://feeds.feedburner.com/CoffeeGems" rel="self" type="application/atom+xml"/>
      <subtitle>Random thoughts on software development (mostly about Java and Ruby, but also Flex and .net)</subtitle>
      <title>Coffee &amp; Gems</title>
      <updated>2008-08-28T11:18:50Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://weblogs.goshaky.com/weblogs/lars/entry/better_specified_than_sorry</id>
    <link href="http://feeds.feedburner.com/~r/LarsTrieloff/~3/358705832/better_specified_than_sorry" rel="alternate" type="text/html"/>
    <title>Better specified than sorry</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Long time no posts here, thanks to <a class="external" href="http://www.mento.info">Mento</a> I have switched very much to link blogging, but if you happen to be interested in the stuff I write, feel free to follow me at <a class="external" href="http://www.friendfeed.com/trieloff|">FriendFeed</a>.
<p>Today I learnt an interesting fact about interaction with developers: if you as a product manager want a feature implemented, do not talk to the developer first, write a specification and a mockup first. If you skip writing the specification first (which can and will be changed afterwards) things can turn against you.
</p>
<p>In our new web content management product we will have quite powerful support for tagging (that can be used in a folksonomy-like way, as categories, as a taxonomy and even as a thesaurus, as I said, quite powerful). I did specify the conceptual model, the content model, created some mockups (for another product that will use the tagging feature) and discussed with the developer how to implement the tagging user interface.
</p>
<p>Together we refined the original idea I had for the user interface, given my general experience what works in AJAX web UI, and his more recent experience with the particular widget framework we are using, examined a set of model application that already implemented some of the metaphors used and came up with a simple, but powerful (and extensible) solution. I knew what the developer would do, the developer knew what he should do, everything was fine and I rushed to the next item in my busy schedule.
</p>
<p>Then the unpredictable happened: Schedules were rearranged, priorities shifted, the developer switched to another task, went to vacation, schedules were rearranged again, priorities shifted again, another developer picked up - and knew nothing about our previous discussion and our common mental specification, so he started coming up with his own solution, because he could not use the specification I skipped writing, ran into problems and I had to troubleshoot.
</p>
<p>Needless to say, the troubleshooting took more time than writing a helpful specification would have taken, and a written specification would have helped our initial concept discussion as I had to explain less and we could work in a more well-structured way.
</p>
<p>Lesson learnt: better specify than sorry!</p>
<img height="1" src="http://feeds.feedburner.com/~r/LarsTrieloff/~4/358705832" width="1"/></div>
    </content>
    <updated>2008-08-07T19:29:02Z</updated>
    <published>2008-08-07T19:29:02Z</published>
    <category label="General" term="/General"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="productmanagement"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="softwaredevelopment"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="specification"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="usability"/><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://weblogs.goshaky.com/weblogs/lars/entry/better_specified_than_sorry</feedburner:origlink>
    <author>
      <name>Lars Trieloff</name>
    </author>
    <source>
      <id>http://weblogs.goshaky.com/weblogs/lars/feed/entries/atom</id>
      <link href="http://weblogs.goshaky.com/weblogs/lars/" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/LarsTrieloff" rel="self" type="application/atom+xml"/>
      <subtitle>Lars Trieloff's Weblog on Collaboration, Open Source and Software Documentation</subtitle>
      <title>Lars Trieloff's Collaboration Weblog</title>
      <updated>2008-08-12T19:55:50Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-31254910.post-3950877125591810920</id>
    <link href="http://feeds.feedburner.com/~r/CoffeeGems/~3/356109659/germanys-most-anticipated-web-20-sites.html" rel="alternate" type="text/html"/>
    <link href="http://www.blogger.com/comment.g?blogID=31254910&amp;postID=3950877125591810920" rel="replies" type="text/html"/>
    <link href="http://michaelmarth.blogspot.com/feeds/3950877125591810920/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/3950877125591810920?v=2" rel="self" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/3950877125591810920?v=2" rel="edit" type="application/atom+xml"/>
    <title>Germany’s most anticipated Web 2.0 sites - one year later</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I just came across a post about <a href="http://de.blognation.com/2007/08/27/germanys-most-anticipated-web-20-sites">Germany's most anticipated Web2.0 sites</a> that dates back to last August. Since this is almost exactly one year ago I decided to spend half an hour of my life and conduct a completely unscientific survey to see how many of these startups are still around. For this reason I simply looked at the web sites to see if they are still here and checked if there are recent posts in the company blog to check if the site is a zombie (if there is no blog I checked the press releases). The result is: 51% are still around, 36% are gone (or not started one year later). The rest seems shaky (last blog post 6 months ago) or unknown (state cannot be determined by looking at the blog).<br/><br/><a href="http://bp1.blogger.com/_UDN4j-Aji_4/SJf_vArAjlI/AAAAAAAATAQ/ZBrQAT3FKdc/s1600-h/startups.PNG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5230930675313446482" src="http://bp1.blogger.com/_UDN4j-Aji_4/SJf_vArAjlI/AAAAAAAATAQ/ZBrQAT3FKdc/s320/startups.PNG" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;"/></a><br/><br/>If you consider that these startups were above the rest ("highly anticipated") and that checking if there are even online one year later is a very low barrier I was surprised by the low survival ratio. But one can regard this as positive: "quick failure" is a good strategy for testing ideas.</div>
    </content>
    <updated>2008-08-06T08:49:11Z</updated>
    <published>2008-08-05T07:16:00Z</published><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://michaelmarth.blogspot.com/2008/08/germanys-most-anticipated-web-20-sites.html</feedburner:origlink>
    <author>
      <name>Michael Marth</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/03925861261744910154</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-31254910</id>
      <author>
        <name>Michael Marth</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/03925861261744910154</uri>
      </author>
      <link href="http://michaelmarth.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://www.blogger.com/feeds/31254910/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" rel="next" type="application/atom+xml"/>
      <link href="http://michaelmarth.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://feeds.feedburner.com/CoffeeGems" rel="self" type="application/atom+xml"/>
      <subtitle>Random thoughts on software development (mostly about Java and Ruby, but also Flex and .net)</subtitle>
      <title>Coffee &amp; Gems</title>
      <updated>2008-08-28T11:18:50Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-31254910.post-1491018550602781653</id>
    <link href="http://feeds.feedburner.com/~r/CoffeeGems/~3/356418582/hindsight-is-2020.html" rel="alternate" type="text/html"/>
    <link href="http://www.blogger.com/comment.g?blogID=31254910&amp;postID=1491018550602781653" rel="replies" type="text/html"/>
    <link href="http://michaelmarth.blogspot.com/feeds/1491018550602781653/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/1491018550602781653?v=2" rel="self" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/31254910/posts/default/1491018550602781653?v=2" rel="edit" type="application/atom+xml"/>
    <title>Hindsight is 20/20</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I have a fondness for retro computers, history of computing and famous discussions (like the <a href="http://en.wikipedia.org/wiki/Tanenbaum-Torvalds_debate">Torvalds/Tanenbaum debate</a>) . In this context I just came across <a href="http://lists.w3.org/Archives/Public/www-tag/2002Apr/0235.html">this W3C mailing list debate</a> regarding REST and SOAP. Nice read.</div>
    </content>
    <updated>2008-08-05T14:46:02Z</updated>
    <published>2008-08-05T14:33:00Z</published><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://michaelmarth.blogspot.com/2008/08/hindsight-is-2020.html</feedburner:origlink>
    <author>
      <name>Michael Marth</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/03925861261744910154</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-31254910</id>
      <author>
        <name>Michael Marth</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/03925861261744910154</uri>
      </author>
      <link href="http://michaelmarth.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://www.blogger.com/feeds/31254910/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" rel="next" type="application/atom+xml"/>
      <link href="http://michaelmarth.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://feeds.feedburner.com/CoffeeGems" rel="self" type="application/atom+xml"/>
      <subtitle>Random thoughts on software development (mostly about Java and Ruby, but also Flex and .net)</subtitle>
      <title>Coffee &amp; Gems</title>
      <updated>2008-08-28T11:18:50Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/royoscon.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/royoscon.html" rel="alternate" type="text/html"/>
    <title>Roy Fielding's OSCON talk about Open Architecture</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
<a href="http://www.day.com/site/en/index/company/company_overview/management.html">Day's Chief Scientist Roy Fielding</a> gave a talk about <a href="http://roy.gbiv.com/talks/200807_OpenArch_OSCON.pdf">Open Architecture</a> at this year's <a href="http://en.oreilly.com/oscon2008/public/content/home">OSCON</a>. Roy specifically looks at Peyman Oreizy's thesis titled "<a href="http://www.ics.uci.edu/~peymano/">Open Architecture Software: A Flexible Approach to Decentralized Software Evolution</a>". Find the slides below:
</p>

<div style="text-align: center;">
<a href="http://roy.gbiv.com/talks/200807_OpenArch_OSCON.pdf">
<img src="http://dev.day.com/microsling/content/blogs/main/royoscon/docroot/r.png"/>
</a>
</div>
<br/></div>
    </summary>
    <updated>2008-08-05T13:00:11Z</updated>
    <category term="open"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jukkaz.wordpress.com/?p=92</id>
    <link href="http://jukkaz.wordpress.com/2008/07/31/git-clones-of-apache-codebases/" rel="alternate" type="text/html"/>
    <title>git clones of Apache codebases</title>
    <summary>In the past few months we’ve been discussing on the infrastructure-dev mailing list about various ways of extending or improving the version control functionality available to Apache projects. One of the main themes of the discussion has been making it easier to access Apache codebases using git or other distributed SCM tools.
The new svn.eu.apache.org mirror [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>In the past few months we’ve been discussing on the <a href="http://apache.markmail.org/search/?q=list:infrastructure-dev">infrastructure-dev</a> mailing list about various ways of extending or improving the version control functionality available to Apache projects. One of the main themes of the discussion has been making it easier to access Apache codebases using <a href="http://git.or.cz/">git</a> or other distributed SCM tools.</p>
<p>The new <a href="http://svn.eu.apache.org/repos/asf/">svn.eu.apache.org</a> mirror that was <a href="http://markmail.org/message/g3gcfgginrxnx5c5">recently announced</a> supports <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn</a> use when accessed as an authenticated user over https. Unfortunately that access is limited to Apache committers and git-svn can be notoriously slow when making initial clones of complex codebases in svn.</p>
<p>To work around these issues I set up a collection of git mirrors of selected Apache codebases on my server. You can find these unofficial mirrors at <a href="http://jukka.zitting.name/git/">http://jukka.zitting.name/git/</a>. The mirrors are automatically updated daily.</p>
<p>The mirrors work pretty much like normal git repositories in that you don’t need git-svn or any other svn tools to work with them. The only significant difference to normal git repositories is that svn tags are mapped to branches named “tags/…” in the mirrors due to the different way git and svn handle tags. Also, settings like svn:ignore, svn:eol-style, etc. are not replicated in these git mirrors.</p>
<p>Let me know if you’re interested in seeing other Apache codebases mirrored. I’m also interested in other feedback or ideas related to these git mirrors.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jukkaz.wordpress.com/92/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jukkaz.wordpress.com/92/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/jukkaz.wordpress.com/92/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jukkaz.wordpress.com/92/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/jukkaz.wordpress.com/92/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jukkaz.wordpress.com/92/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/jukkaz.wordpress.com/92/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jukkaz.wordpress.com/92/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/jukkaz.wordpress.com/92/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jukkaz.wordpress.com/92/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/jukkaz.wordpress.com/92/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jukkaz.wordpress.com/92/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jukkaz.wordpress.com&amp;blog=52630&amp;post=92&amp;subd=jukkaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-31T10:33:05Z</updated>
    <category term="General"/>
    <category term="apache"/>
    <category term="git"/>
    <category term="svn"/>
    <author>
      <name>Jukka Zitting</name>
    </author>
    <source>
      <id>http://jukkaz.wordpress.com</id>
      <link href="http://jukkaz.wordpress.com/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://jukkaz.wordpress.com" rel="alternate" type="text/html"/>
      <subtitle>Software craftmanship</subtitle>
      <title>Jukka Zitting</title>
      <updated>2008-07-31T10:33:05Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jukkaz.wordpress.com/?p=89</id>
    <link href="http://jukkaz.wordpress.com/2008/07/31/locales-vs-consistent-builds/" rel="alternate" type="text/html"/>
    <title>Locales vs. consistent builds</title>
    <summary>[MOJO-1193] Locale support for formatting dates and times
I wanted to use the Maven buildnumber plugin to generate a date string like “31-Jul-2008″ for inclusion in an automatically generated release notes document. This way I could minimize the amount of manual tweaking I need to do when publishing the release.
This was easy enough (though quite verbose) [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>[<a href="http://jira.codehaus.org/browse/MOJO-1193">MOJO-1193</a>] Locale support for formatting dates and times</p>
<p>I wanted to use the Maven <a href="http://mojo.codehaus.org/buildnumber-maven-plugin/">buildnumber plugin</a> to generate a date string like “31-Jul-2008″ for inclusion in an automatically generated release notes document. This way I could minimize the amount of manual tweaking I need to do when publishing the release.</p>
<p>This was easy enough (though quite verbose) to achieve:</p>
<pre>    &lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;buildnumber-maven-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
        &lt;format&gt;{0,date,dd-MMM-yyyy}&lt;/format&gt;
        &lt;items&gt;
          &lt;item&gt;timestamp&lt;/item&gt;
        &lt;/items&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;phase&gt;validate&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;create&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
    &lt;/plugin&gt;</pre>
<p>Unfortunately, the resulting date string would be the expected “31-Jul-2008″ on one computer, but “31-heinä-2008″ (in Finnish) on my laptop. Instead of changing the settings of my laptop I wanted to explicitly set the locale that the buildnumber plugin should use when formatting the date. I wasn’t too surprised that the required functionality didn’t yet exist (it’s quite common for people to forget about locales), but luckily it wasn’t too hard to add. Thus <a href="http://jira.codehaus.org/browse/MOJO-1193">MOJO-1193</a>.</p>
<p>With my patch the required configuration becomes:</p>
<pre>      &lt;configuration&gt;
        &lt;format&gt;{0,date,dd-MMM-yyyy}&lt;/format&gt;
        &lt;locale&gt;en_US&lt;/locale&gt;
        &lt;items&gt;
          &lt;item&gt;timestamp&lt;/item&gt;
        &lt;/items&gt;
      &lt;/configuration&gt;</pre>
<p>Consistency is good.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jukkaz.wordpress.com/89/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jukkaz.wordpress.com/89/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/jukkaz.wordpress.com/89/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jukkaz.wordpress.com/89/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/jukkaz.wordpress.com/89/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jukkaz.wordpress.com/89/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/jukkaz.wordpress.com/89/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jukkaz.wordpress.com/89/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/jukkaz.wordpress.com/89/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jukkaz.wordpress.com/89/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/jukkaz.wordpress.com/89/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jukkaz.wordpress.com/89/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jukkaz.wordpress.com&amp;blog=52630&amp;post=89&amp;subd=jukkaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-31T09:11:56Z</updated>
    <category term="General"/>
    <category term="buildnumber"/>
    <category term="locale"/>
    <category term="Maven"/>
    <author>
      <name>Jukka Zitting</name>
    </author>
    <source>
      <id>http://jukkaz.wordpress.com</id>
      <link href="http://jukkaz.wordpress.com/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://jukkaz.wordpress.com" rel="alternate" type="text/html"/>
      <subtitle>Software craftmanship</subtitle>
      <title>Jukka Zitting</title>
      <updated>2008-07-31T10:33:05Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://bdelacretaz.wordpress.com/?p=1001</id>
    <link href="http://grep.codeconsult.ch/2008/07/31/qotd-about-dwarfs/" rel="alternate" type="text/html"/>
    <title>QOTD - about dwarfs</title>
    <summary>Being considered the best speaker in a computer science department is like being known as the tallest of the Seven Dwarfs.
This is from Randy Pausch The Last Lecture book, I got it yesterday and find it really hard to put it down.</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><blockquote><p>Being considered the best speaker in a computer science department is like being known as the tallest of the Seven Dwarfs.</p></blockquote>
<p>This is from Randy Pausch <a>The Last Lecture</a> book, I got it yesterday and find it really hard to put it down.<br/>
<a href="http://www.amazon.com/gp/product/1401323251?ie=UTF8&amp;tag=bertrandswebl-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1401323251"><br/>
<img alt="" border="0" src="http://bdelacretaz.files.wordpress.com/2008/07/51huxzjqapl-sl160.jpg?w=113" width="113"/><br/>
</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bdelacretaz.wordpress.com/1001/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bdelacretaz.wordpress.com/1001/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/bdelacretaz.wordpress.com/1001/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdelacretaz.wordpress.com/1001/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/bdelacretaz.wordpress.com/1001/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdelacretaz.wordpress.com/1001/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/bdelacretaz.wordpress.com/1001/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdelacretaz.wordpress.com/1001/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/bdelacretaz.wordpress.com/1001/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdelacretaz.wordpress.com/1001/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/bdelacretaz.wordpress.com/1001/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdelacretaz.wordpress.com/1001/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grep.codeconsult.ch&amp;blog=2844102&amp;post=1001&amp;subd=bdelacretaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-31T07:45:54Z</updated>
    <category term="Thoughts"/>
    <author>
      <name>bdelacretaz</name>
    </author>
    <source>
      <id>http://grep.codeconsult.ch</id>
      <link href="http://grep.codeconsult.ch/feed" rel="self" type="application/atom+xml"/>
      <link href="http://grep.codeconsult.ch" rel="alternate" type="text/html"/>
      <subtitle>cat /dev/brain | egrep -i 'tech|thoughts|noise'</subtitle>
      <title>bertrand's brain grep</title>
      <updated>2008-07-31T07:48:22Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/cq5beta2.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/cq5beta2.html" rel="alternate" type="text/html"/>
    <title>CQ5 status update: tech preview completed</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
Here's a brief update on Communique 5's delivery: we are in excellent shape and the quality gated approach is paying of for our customers.
</p><p>
As it was laid out in <a href="http://dev.day.com/microsling/content/blogs/main.xml">a previous post</a> there are two iterations we need to go through before we release CQ5: the tech preview phase and the beta program. I am very happy to report that the tech preview has been successfully completed. By now, the beta program has started. I'm excited to see the shine in the developers eyes when they are allowed to take this baby into their hands.
</p><p>
The customer who completed the tech preview with us is now in production with CQ5. There are about 80 editors producing content already. This number is expected to increase into several hundred very soon. This is a fantastic success, but there are also other ("softer") factors that we have experienced during the tech preview project. Both, the editors as well as the developers perceive working with CQ5 to be very pleasant and exciting compared to the competing products they knew. I am extremely happy about this feedback as it goes to show that our efforts on user experience and software architecture were well invested.
</p><p>
There is also another interesting by-product of the beta program: by the time the program is finished most of our service and support team will have real-life experience with CQ5 from real-life customers in production. So from day one of the product launch there will be experienced service and support resources available from Day.
</p></div>
    </summary>
    <updated>2008-07-31T00:00:01Z</updated>
    <category term="communique"/>
    <category term="cms"/>
    <author>
      <name>Jean-Michel Pittet</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/brix2.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/brix2.html" rel="alternate" type="text/html"/>
    <title>Ask the community: Brix</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Recently, I <a href="http://dev.day.com/microsling/content/blogs/main/brix.html">blogged about Brix</a>, which is a new open source cms based on <a href="http://wicket.apache.org/">Apache Wicket</a> and <a href="http://jackrabbit.apache.org/">Jackrabbit</a>. <a href="http://code.google.com/p/brix-cms/">Brix</a> has been developed by the <a href="http://www.inertiabev.com/inertiabev/index.jsp">Inertia Beverage Group</a>. Inertia's Chief Strategy Officer Paul Mabray sat down with the dev team and passed on my questions about JCR and Jackrabbit:
</p>


<p><b>Paul Mabray: So tell me a bit about each of you - your background, hobbies, etc.</b></p>

<p><b>Matej Knopp</b>: Hi, I am Matej. I’m a key independent consultant from Slovakia. My number one project for Inertia is working on Brix and enjoying every minute of it. I’m also an Apache Wicket enthusiast and committer. Obviously I have a severe lack of free time.</p>

<p><b>Paul</b>: Do you do anything else?</p>

<p><b>Matej</b>: Whatever little time I find away from the keyboard I try to read as much as I can.</p>

<p><b>Patrick Angeles</b>: I guess, aside from you Paul, I am the veteran at Inertia.  I am the VP of Technology and lead our SaaS development for a software solution that connects wineries to their customers.  I’ve been in tech for over 10 years working for big companies like Bankers Trust and Acquire Systems.  Food, wine and my family are the only things I have time to do outside of work.</p>

<p><b>Igor Vaynberg</b>: I’m the Principal Software Engineer at Inertia, residing in sunny Sacramento, California.  I’m the guy your brought in to help build the next-generation enterprise web application that help will more easily bridge the gap between wineries and their customers.</p>

<p><b>Paul</b>: Tell me more</p>

<p><b>Igor</b>: Well, my love for writing software was sparked when I received a Sinclair Z80 on my tenth birthday and  I’ve been doing it ever since.  I do have the same hobbies as you such as playing with my kids, taking my beautiful wife to fancy dinners - that should get me points at home - and fragging my friends at Halo.  I also still find time to work on software. My number one  outlet is the Apache Wicket framework - I really believe to be the best way to build web applications.</p>

<p><b>Paul</b>: And I am the founder of Inertia and now Chief Strategy Officer in charge of product development and business development.  Just like Patrick I only have time for the family outside of work.  But I love what I do and when this team brought forth the concept to make Brix open source, I was 200% in support of the initiative.</p>

<p><b>Igor/Patrick</b>: COME ON</p>

<p><b>Paul</b>: OK, I frag a few people on Halo when I get a spare minute.</p>

<p><b>Paul: So Michael asked us a question - Brix uses Apache Jackrabbit as its content repository. Back in the days when you made this decision what potential choices were you considering and what influenced your decision towards Jackrabbit?</b></p>

<p><b>Igor</b>: From the start, one of our major requirements was the ability for our users to edit content using their favorite desktop editor. We picked SVN and JCR as two possible solutions: SVN with its local check-in/check-out, and JCR with its WebDAV support. We started off with SVN because it had more powerful versioning features, such as merging. But we quickly ran into features we needed that were missing and would be too expensive to implement ourselves: referential integrity and ASLv2 java connector library being the two that jump to mind (we were planning to open-source Brix from the start under ASLv2).</p>

<p><b>Patrick</b>: That is why we switched to JCR. Jackrabbit seemed to be the most actively developed and complete JCR implementation, and since it was already released under ASLv2 it was not a very hard choice. A bonus for us is that two of our Brix developers are also Apache committers, and since Inertia is not shy about contributing to open source we saw an opportunity to improve Jackrabbit and give back to its community as we went along.</p>

<p><b>Q: Did your expectations regarding the JCR come true or did you have to overcome some difficulties you did not expect? Were there any pleasant or not so pleasant surprises after working with Jackrabbit for a while?</b></p>

<p><b>Matej</b>: The most pleasant surprise was how much functionality Jackrabbit/JCR brought to the table: indexing, referential integrity, WebDAV, workspaces, versioning, and the list keeps going on. The API is consistent and easy to use.</p>

<p><b>Igor</b>: Don’t forget our experience with Jackrabbit/JCR was not perfect. It seems that the modus operandi of the JCR community is to use a repository with a set small number of workspaces, which did not mesh well with our needs. Brix makes an extensive use of JCR workspaces for multi-site support, site snapshots, and publishing workflow. This means that we needed to create and delete workspaces on the fly as well as have an easy way to search across them via some index.</p>

<p>The first problem we ran into was that workspace creation event was not replicated across the Jackrabbit cluster. We have already patched Jackrabbit to support this feature, the patch is available in Jackrabbit’s issue tracker under <a href="https://issues.apache.org/jira/browse/JCR-1677">JCR-1677</a>.</p>

<p><b>Patrick</b>: The second, and more severe, problem was the way Jackrabbit manages database connections. Currently each Jackrabbit workspace keeps an open connection to the database. We are planning to host over 300 client sites on Brix in the near future. Brix’s publishing workflow requires 3 workspaces per site: development, staging, and production. Without even counting workspaces created for snapshots,  we are up to 900 workspaces and thus 900 open database connections. This simply does not scale. Unfortunately, this does not look like a high priority for the Jackrabbit community, because seeminly the most common usecase is a repository with a small number of workspaces. Nonetheless, we are working on a patch that would allow for connection pooling. A first pass of the patch is available in the Jackrabbit issue tracker under <a href="https://issues.apache.org/jira/browse/JCR-1456">JCR-1456</a>.</p>

<p><b>Q: One often discussed aspect of building content management systems on top of JCRs is the question if object-content-mapping should be used to wrap collections of JCR nodes into application-level objects. What is your view on this question?</b></p>

<p><b>Igor</b>: Brix’s object model is very simple, so using some kind of object-content mapping would have been overkill for us. We do have a wrapper for the JCR api, but that was meant for other things (<em>see below</em>).</p>

<p><b>Q: In Brix you have wrapped JCR nodes and sessions in Brix' own wrapper classes. In the wrappers API calls are intercepted and events are generated. Why was this design decision made rather than using JCRs native Observation mechanisms?</b></p>

<p><b>Patrick</b>: Our JCR API wrapper is two levels deep.</p>

<p>The bottom layer is an event layer. It provides events for before and after a change, as well as an ability to queue the events in a list and batch process them later. We also group and normalize the events so it is possible to know what is about to be changed <b>before</b> the change is applied. JCR’s native observation mechanism is limited to only observing changes that have already happened.</p>

<p><b>Matej</b>: The top wrapper has two basic jobs:</p>

<p>Translate JCR’s checked exception model into unchecked while providing a pluggable and centralized way for exception handling strategies. In OOP JCR code is sprinkled among many classes, the checked exception model becomes extremely viral. Also, since a lot of exceptions are unrecoverable from Brix’s perspective there is very little point of having them be checked.</p>

<p>The second job of this wrapper is to allow node wrapping. Instead of using a full blown and complex object-content-mapping system we provide a simple mechanism for having nodes wrapped based on their brix:nodeType property. This makes it possible to write code like this:</p>

<p>
</p><div class="codesnippet scrollablecodesnippet"><pre>Node n = session.getRootNode().getNode("page.html");
PageNode page = (PageNode) n;
page.setTitle("Page Title");
page.setMarkup("Page Content");
</pre></div>
<p/>

<p><b>Q: Brix' WebDAV server has the nice feature that uploaded resources are automatically converted into Brix artifacts. How does that work?</b></p>

<p><b>Igor</b>: This is done by intercepting node events using the aforementioned wrapper and modifying the nodes before they are saved based on rules defined in Brix. There is also some magic to handle varying WebDAV client behaviors, for example: when a new file is created via Coda it will first create an Untitled file and immediately rename it to its given name.</p>

<p><b>Q:If you had one wish regarding JCR and the JCR community, what would it be?</b></p>

<p><b>Patrick</b>: We would wish the JCR community a very long and productive future.</p>

<p><b>Paul</b>: I hope that the JCR community sees Brix as useful piece of software and contributes to its health and success.</p></div>
    </summary>
    <updated>2008-07-31T00:00:01Z</updated>
    <category term="ask the community"/>
    <category term="jcr"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://michid.wordpress.com/?p=41</id>
    <link href="http://michid.wordpress.com/2008/07/30/meta-programming-with-scala-part-ii-multiplication/" rel="alternate" type="text/html"/>
    <title>Meta-Programming with Scala Part II: Multiplication</title>
    <summary>This was sitting on my desk for quite a while now while I was busy with other things. Finally I came around to write things up.
In my last post I showed how to encode the Church numerals and addition on them with Scala’s type system. I mentioned that this approach does not seem to scale. [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>This was sitting on my desk for quite a while now while I was busy with other things. Finally I came around to write things up.</p>
<p>In my <a href="http://michid.wordpress.com/2008/04/18/meta-programming-with-scala-part-i-addition/">last post</a> I showed how to encode the <a href="http://en.wikipedia.org/wiki/Church_encoding">Church numerals</a> and addition on them with <a href="http://www.scala-lang.org/">Scala’s</a> type system. I mentioned that this approach does not seem to scale. In this post I show the problems I faced while I tried to extend the approach to multiplication. This particular example shows that Scala’s type system does not seem to support partial function application which in general is crucial for defining more complex functions base on simpler ones. But before delving into Scala, let’s review the church numerals in <a href="http://en.wikipedia.org/wiki/Lambda_calculus">lambda calculus</a>. </p>
<p>Define a lambda term for each natural number <i>n</i></p>
<p><img alt="0\equiv\lambda sz.z" class="latex" src="http://l.wordpress.com/latex.php?latex=0%5Cequiv%5Clambda+sz.z&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="0\equiv\lambda sz.z"/><br/>
<img alt="1\equiv\lambda sz.sz" class="latex" src="http://l.wordpress.com/latex.php?latex=1%5Cequiv%5Clambda+sz.sz&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="1\equiv\lambda sz.sz"/><br/>
<img alt="2\equiv\lambda sz.ssz" class="latex" src="http://l.wordpress.com/latex.php?latex=2%5Cequiv%5Clambda+sz.ssz&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="2\equiv\lambda sz.ssz"/><br/>
<img alt="\cdots " class="latex" src="http://l.wordpress.com/latex.php?latex=%5Ccdots+&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="\cdots "/>   <br/>
<img alt="n\equiv\lambda sz.s^nz" class="latex" src="http://l.wordpress.com/latex.php?latex=n%5Cequiv%5Clambda+sz.s%5Enz&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="n\equiv\lambda sz.s^nz"/></p>
<p>where <img alt="s^n " class="latex" src="http://l.wordpress.com/latex.php?latex=s%5En+&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="s^n "/> stands for the <i>n</i>-fold application of <i>s</i>. Think of <i>s</i> standing for successor and <i>z</i> for zero. Then the number <i>n</i> is simply the <i>n</i>-fold successor of zero.</p>
<p>Addition can now be define as </p>
<p><img alt="add \equiv \lambda mnsz.ms(nsz) " class="latex" src="http://l.wordpress.com/latex.php?latex=add+%5Cequiv+%5Clambda+mnsz.ms%28nsz%29+&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="add \equiv \lambda mnsz.ms(nsz) "/>.</p>
<p>Here the <i>n</i>-fold successor of zero is used as zero element for <i>m</i>. Again this can be thought of as the <i>m</i>-fold successor of the <i>n</i>-fold successor of zero.</p>
<p>Multiplications is similar but instead of using <em>a different value for zero</em>, a <em>different successor function</em> is used:</p>
<p><img alt="mul \equiv \lambda mnsz.m(ns) " class="latex" src="http://l.wordpress.com/latex.php?latex=mul+%5Cequiv+%5Clambda+mnsz.m%28ns%29+&amp;bg=ffffff&amp;fg=000000&amp;s=0" title="mul \equiv \lambda mnsz.m(ns) "/></p>
<p>This boils down to the <i>m</i>-fold application of the <i>n</i>-fold successor function.</p>
<p>As in my <a href="http://michid.wordpress.com/2008/04/18/meta-programming-with-scala-part-i-addition/">previous post</a> the Church numerals are encoded in Scala’s type system as follows</p>
<pre class="java" name="code">
type _0[s[_], z] = z
type _1[s[_], z] = s[z]
type _2[s[_], z] = s[s[z]]
type _3[s[_], z] = s[s[s[z]]]
type _4[s[_], z] = s[s[s[s[z]]]]
</pre>
<p>I did not succeed encoding multiplication however. The most straight forward encoding - which closely follows the one for addition - looks like this</p>
<pre class="java" name="code">
type mul[m[s[_], z], n[s[_], z], s[_], z] = m[n[s[_], z], z]
</pre>
<p>However the Scala compiler complains:</p>
<pre>  s[_$1] forSome { type _$1 } takes no type parameters,
  expected: one
</pre>
<p>Unlike addition, we need to pass a partially applied function here - namely the <i>n</i>-fold successor function. Since the above does not work, I’m not sure if there even is a syntax for expressing partial function application in Scala’s type system.</p>
<p>In another approach I tried to introducing a formal parameter for the <i>n</i>-fold successor function:</p>
<pre class="java" name="code">
type mul[m[n[s[_], z], z], n[s[_], z], s[_], z] = m[n, z]
</pre>
<p>The compiler does not complain here which is encouraging. However this breaks on application</p>
<pre class="java" name="code">
abstract class Zero
abstract class Succ[T]

type zero = mul[_0, _0, Succ, Zero]
type one = mul[_1, _3, Succ, Zero] 
</pre>
<p>The first application results in a kind error</p>
<pre>the kinds of the type arguments (Meta._0,Meta._0,Meta.Succ,Meta.Zero) do not conform to
the expected kinds of the type parameters (type m,type n,type s,type z).
Meta._0's type parameters do not match type m's expected parameters:
type s has one type parameter, but type n has two
</pre>
<p>The second application causes an assertion failure of the Scala compiler (see <a href="http://lampsvn.epfl.ch/trac/scala/ticket/742">Ticket #742</a>). </p>
<p>For a better understanding let’s analyze what <i>mul[_1, _3, Succ, Zero]</i> expands to:</p>
<pre class="java" name="code">
mul[_1, _3, Succ, Zero] =
_1[_3, Zero] =
_3[Zero]
</pre>
<p>While this looks somewhat correct, it is certainly not. <i>_3</i> takes two arguments but gets one. This is exactly what the Scala compiler was complaining about. </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/michid.wordpress.com/41/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/michid.wordpress.com/41/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/michid.wordpress.com/41/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michid.wordpress.com/41/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/michid.wordpress.com/41/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michid.wordpress.com/41/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/michid.wordpress.com/41/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michid.wordpress.com/41/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/michid.wordpress.com/41/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michid.wordpress.com/41/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/michid.wordpress.com/41/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michid.wordpress.com/41/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michid.wordpress.com&amp;blog=2538862&amp;post=41&amp;subd=michid&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-30T21:07:57Z</updated>
    <category term="Uncategorized"/>
    <category term="Meta-Programming"/>
    <category term="Scala"/>
    <author>
      <name>michid</name>
    </author>
    <source>
      <id>http://michid.wordpress.com</id>
      <link href="http://michid.wordpress.com/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://michid.wordpress.com" rel="alternate" type="text/html"/>
      <subtitle>Hacking Scala</subtitle>
      <title>Michid's Weblog</title>
      <updated>2008-08-27T22:38:01Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/slinglegacydata.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/slinglegacydata.html" rel="alternate" type="text/html"/>
    <title>Sling Applications and Relational Databases</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
One topic that periodically comes up is how to integrate data that resides relational databases with a Sling application. The use case might be that there is legacy data that cannot be migrated but needs to displayed in a new (Sling-based) web application. In this post I would like to discuss some aspects and possible strategies to accomplish this goal.
</p>
<p>
One essential question for determining a fitting integration strategy is if the db rows shall be exposed as resources (in the REST sense). Let us start with the case that they shall not be exposed as resources. In such a scenario a db row does not have its own URL. A typical Sling application in such a scenario would expose the JCR-based content as resources, but might add data from the db to the presentation of the resources.
</p>
<p>
On a technical level this could be implemented by creating an OSGi bundle that uses JDBC to connect to the database. The bundle would then be called by the rendering script through an OSGi service interface (as described <a href="http://dev.day.com/microsling/content/blogs/main/slingosgi.html">here</a>).
</p>
<p>
However, this approach cannot be used if the db rows shall be exposed as resources and have their own URL.
</p>
<p>
For data that changes on low frequencies one can create a JCR node for each db row. This requires the ability to keep the db and the JCR in sync. The JCR nodes could contain the primary key of the db data. Synching can be achieved by any programm capable of JCR and JDBC.
</p>
<p>
One seemingly obvious way to avoid having to synch is to create a dummy node that represents all of the db data. However, the resulting URLs would not be resource-oriented at all since you need to pass the resource identifier as a request parameter.
</p>
<p>
The full monty and best solution for making your db URLs RESTful is to create a Sling ResourceProvider. This would be an OSGi bundle that claims a part of the URL space in Sling and maps the URLs to resources of whatever kind. In the Sling samples there is an example implementation for file systems. In this example a tree of the local file system is mapped onto the URL space and all files are given Sling resource types. As such, the normal mechanisms for rendering requests are used. The same can be achieved with db rows, of course.
</p>
<p>
It should be noted that there is a generic problem when the relational data needs to be mapped onto the hierarchical URL space. You could go the brute force way of using /content/tablename/id. However, if your data is somehow categorized using many-to-one relationships consider "denormalizing" the data (mentally - you do not need to actually change the tables). This would yield nicer URLs like /content/category1/category2/data (e.g. like /content/wagons/mercedes/e-class).
</p></div>
    </summary>
    <updated>2008-07-30T00:00:01Z</updated>
    <category term="sling"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/brix.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/brix.html" rel="alternate" type="text/html"/>
    <title>Red Red Wine (JCR Edition)</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
David Nuescheler has a slide that compares JCR-based applications to an iceberg (see e.g <a href="http://dev.day.com/microsling/content/blogs/main/jazoon08pres1.html">here</a>, first presentation, slides 18 and 19). No, not in the sense that it will sink the <a href="http://en.wikipedia.org/wiki/RDBMS">Titanic</a>, but in the sense that the visible part is only a small fraction. Well, proving things that are hidden by definition is often a bit tricky. In the case of JCR-based apps one can refer to the <a href="http://jackrabbit.markmail.org/search/?q=list%3Aorg.apache.jackrabbit.users">traffic on the Jackrabbit user list</a> or the <a href="http://people.apache.org/~vgritsenko/stats/projects/jackrabbit.html#Downloads-N1008F">number of Jackrabbit downloads</a>.
</p>
<p>
But once in a while one can actually look at a previously hidden JCR application: a couple of days ago the JCR-based CMS "Brix" has been <a href="http://code.google.com/p/brix-cms/">open-sourced</a>. It is based on <a href="http://wicket.apache.org/">Wicket</a> and <a href="http://jackrabbit.apache.org/">Jackrabbit</a>. From <a href="http://blog.inertiabev.com/index.php/2008/07/23/brix-released-as-an-open-source-project/">what I understand</a> its origins are in online wine sales (note to self: next time ask for a content sample before posting).
</p>
<p>
In their own words:
</p>

<div class="blockquote">
<p>
Using Apache Wicket as the technology to serve the content makes it very easy to embed custom, stateful Wicket components into any CMS page, allowing rich integration with existing Wicket web application. Using Apache Jackrabbit allows Brix to easily integrate full text search, versioning, and WebDav access.
</p>
</div>

<p>Thanks for making this available, guys.</p></div>
    </summary>
    <updated>2008-07-28T00:00:01Z</updated>
    <category term="jcr"/>
    <category term="cms"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://bdelacretaz.wordpress.com/?p=986</id>
    <link href="http://grep.codeconsult.ch/2008/07/26/rip-randy-pausch/" rel="alternate" type="text/html"/>
    <title>R.I.P. Randy Pausch</title>
    <summary>In French we say “the best often leave first”. I’m not teaching in schools anymore these days, but if I was I would watch the last lecture with my students.

Update: here’s another shorter video recorded little more than two months ago at Carnegie Mellon’s Commencement - I guess that one sums it all. Via Tristan [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>In French we say “the best often leave first”. I’m not teaching in schools anymore these days, but if I was I would watch the <em>last lecture</em> with my students.</p>
<p><span style="text-align: center; display: block;"><a href="http://grep.codeconsult.ch/2008/07/26/rip-randy-pausch/"><img alt="" src="http://img.youtube.com/vi/ji5_MqicxSo/2.jpg"/></a></span></p>
<p><em>Update: here’s another shorter video recorded little more than two months ago at Carnegie Mellon’s Commencement - I guess that one sums it all. Via <a href="http://standblog.org/blog/post/2008/07/27/En-vrac">Tristan Nitot</a>.</em></p>
<p><span style="text-align: center; display: block;"><a href="http://grep.codeconsult.ch/2008/07/26/rip-randy-pausch/"><img alt="" src="http://img.youtube.com/vi/RcYv5x6gZTA/2.jpg"/></a></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bdelacretaz.wordpress.com/986/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bdelacretaz.wordpress.com/986/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/bdelacretaz.wordpress.com/986/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdelacretaz.wordpress.com/986/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/bdelacretaz.wordpress.com/986/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdelacretaz.wordpress.com/986/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/bdelacretaz.wordpress.com/986/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdelacretaz.wordpress.com/986/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/bdelacretaz.wordpress.com/986/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdelacretaz.wordpress.com/986/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/bdelacretaz.wordpress.com/986/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdelacretaz.wordpress.com/986/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grep.codeconsult.ch&amp;blog=2844102&amp;post=986&amp;subd=bdelacretaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-26T13:24:55Z</updated>
    <category term="people"/>
    <author>
      <name>bdelacretaz</name>
    </author>
    <source>
      <id>http://grep.codeconsult.ch</id>
      <link href="http://grep.codeconsult.ch/feed" rel="self" type="application/atom+xml"/>
      <link href="http://grep.codeconsult.ch" rel="alternate" type="text/html"/>
      <subtitle>cat /dev/brain | egrep -i 'tech|thoughts|noise'</subtitle>
      <title>bertrand's brain grep</title>
      <updated>2008-07-31T07:48:22Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://bdelacretaz.wordpress.com/?p=979</id>
    <link href="http://grep.codeconsult.ch/2008/07/26/ghop-grand-prize-winners-google/" rel="alternate" type="text/html"/>
    <title>GHOP Grand Prize Winners @google</title>
    <summary>Two weeks ago I was at Google headquarters to represent the ASF for the GHOP Awards Ceremony.

Visiting the Googleplex was very interesting as an example of a modern working environment, free of most or all corporate annoyances that used to be present in too many companies.
The legends about the great free food are not exaggerated, [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>Two weeks ago I was at Google headquarters to represent the <a href="http://www.apache.org">ASF</a> for the <a href="http://google-opensource.blogspot.com/2008/07/grand-prize-winners-visit-googleplex.html">GHOP Awards Ceremony</a>.</p>
<p><span style="text-align: center; display: block;"><a href="http://grep.codeconsult.ch/2008/07/26/ghop-grand-prize-winners-google/"><img alt="" src="http://img.youtube.com/vi/6-oGDjUoU_k/2.jpg"/></a></span></p>
<p>Visiting the Googleplex was very interesting as an example of a modern working environment, free of most or all corporate annoyances that used to be present in too many companies.</p>
<p>The legends about the great free food are not exaggerated, Cafe MOMA and Charlie’s Cafe lived more than lived up to my expectations. To me the Googleplex looks like a environment that would appeal very much to young engineers, as you can more or less live on site, with food, laundry, massage, swimming pool, Friday afternoon music, TGIF and other perks. If you have a family, on the other hand, you might need some discipline to escape the campus at the appropriate time…</p>
<p>In the afternoon of the awards ceremony day, we were treated to great jetlag-proof presentations on AppEngine (by Guido Van Rossum, Mr.Python himself), Android by Romain Guy (nice to see a young French guy make his way there), GFS/BigTable by Jeff Dean (employee #20) and testing by <a href="http://www.nytimes.com/2007/10/21/jobs/21pre.html">Bharat Mediratta</a> and Mike Bland (readers know how passionate I am about testing, and these guys seem to have a similar vision than mine, so /me happy).</p>
<p>Great stuff, and all this for ten students, their parents and mentors! Big thanks to Leslie Hawthorn, Chris DiBona and team for setting this up so nicely.</p>
<p>Here’s the (shortish) interview with the ASF’s Grand Prize winner, Spencer Davis. For me, meeting these bright young folks has been the highlight of all this, and the motivation to continue contributing to these student programs. Seems like there is hope for humanity after all ;-)</p>
<p><span style="text-align: center; display: block;"><a href="http://grep.codeconsult.ch/2008/07/26/ghop-grand-prize-winners-google/"><img alt="" src="http://img.youtube.com/vi/Gr62sY84f_c/2.jpg"/></a></span></p>
<p><a href="http://automorphic.blogspot.com/2008/07/ghop-awards-ceremony.html">Sandy Armstrong</a>, mentor for GNOME, and <a href="http://www.corsix.org/content/once-upon-time-i-visitied-googleplex">Peter Cawley</a>, winner for Drupal, have more details on the awards ceremony day. The “exotic” ASF presentation that I mentioned happened in Kathmandu, Nepal, as mentioned in a <a href="http://grep.codeconsult.ch/2008/01/14/the-asf-live-in-kathmandu-nepal/">previous post</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bdelacretaz.wordpress.com/979/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bdelacretaz.wordpress.com/979/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/bdelacretaz.wordpress.com/979/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdelacretaz.wordpress.com/979/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/bdelacretaz.wordpress.com/979/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdelacretaz.wordpress.com/979/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/bdelacretaz.wordpress.com/979/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdelacretaz.wordpress.com/979/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/bdelacretaz.wordpress.com/979/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdelacretaz.wordpress.com/979/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/bdelacretaz.wordpress.com/979/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdelacretaz.wordpress.com/979/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grep.codeconsult.ch&amp;blog=2844102&amp;post=979&amp;subd=bdelacretaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-26T12:19:17Z</updated>
    <category term="Open Source"/>
    <author>
      <name>bdelacretaz</name>
    </author>
    <source>
      <id>http://grep.codeconsult.ch</id>
      <link href="http://grep.codeconsult.ch/feed" rel="self" type="application/atom+xml"/>
      <link href="http://grep.codeconsult.ch" rel="alternate" type="text/html"/>
      <subtitle>cat /dev/brain | egrep -i 'tech|thoughts|noise'</subtitle>
      <title>bertrand's brain grep</title>
      <updated>2008-07-31T07:48:22Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://bdelacretaz.wordpress.com/?p=972</id>
    <link href="http://grep.codeconsult.ch/2008/07/26/hey-el-reg-microsoft-is-not-becoming-an-asf-member/" rel="alternate" type="text/html"/>
    <title>Hey, El Reg - Microsoft is *not* becoming an ASF member!</title>
    <summary>Contrary to what The Register reports, Microsoft is not paying $100,000 annual membership to the Apache Software Foundation.
ASF membership cannot be bought: people earn their individual membership by merit, and there’s no such thing as ASF member companies.
As with any other sponsor of the ASF, Microsoft’s sponsorship only means that they’re giving money to the [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>Contrary to what <a href="http://www.theregister.co.uk/2008/07/25/microsoft_gpl/">The Register</a> reports, Microsoft is not <em>paying $100,000 annual membership</em> to the <a href="http://www.apache.org">Apache Software Foundation</a>.</p>
<p>ASF membership cannot be bought: <em>people</em> earn their individual membership by <a href="http://www.apache.org/foundation/how-it-works.html">merit</a>, and there’s no such thing as ASF member companies.</p>
<p>As with any other <a href="http://www.apache.org/foundation/sponsorship.html">sponsor of the ASF</a>, Microsoft’s <a href="http://www.apache.org/foundation/thanks.html">sponsorship</a> only means that they’re giving money to the ASF, money that the ASF can use freely, as the ASF does not accept directed donations.</p>
<p>I am very pleased to see <a href="http://port25.technet.com/archive/2008/07/25/oscon2008.aspx">this</a> happening. It won’t make me love Microsoft’s current products much more (although, as my son notes, the XBox is a nifty piece of kit), but it is great to see more and more people inside Microsoft understand the importance of open source in today’s IT landscape.</p>
<p><em>Update: as I write this, the Google Number for <a href="http://www.google.com/search?hl=en&amp;q=%2Bapache+%2Bmicrosoft+%2Bsponsor*&amp;btnG=Search">+apache +microsoft  +sponsor*</a> is 682,000</em></p>
<p><em>Update: it’s been at least 24 hours since I posted a comment to the Register article linked above, indicating their error. Surprisingly, that comment hasn’t been moderated in yet…</em></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bdelacretaz.wordpress.com/972/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bdelacretaz.wordpress.com/972/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/bdelacretaz.wordpress.com/972/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdelacretaz.wordpress.com/972/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/bdelacretaz.wordpress.com/972/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdelacretaz.wordpress.com/972/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/bdelacretaz.wordpress.com/972/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdelacretaz.wordpress.com/972/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/bdelacretaz.wordpress.com/972/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdelacretaz.wordpress.com/972/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/bdelacretaz.wordpress.com/972/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdelacretaz.wordpress.com/972/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grep.codeconsult.ch&amp;blog=2844102&amp;post=972&amp;subd=bdelacretaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-26T08:46:51Z</updated>
    <category term="Open Source"/>
    <category term="asf"/>
    <author>
      <name>bdelacretaz</name>
    </author>
    <source>
      <id>http://grep.codeconsult.ch</id>
      <link href="http://grep.codeconsult.ch/feed" rel="self" type="application/atom+xml"/>
      <link href="http://grep.codeconsult.ch" rel="alternate" type="text/html"/>
      <subtitle>cat /dev/brain | egrep -i 'tech|thoughts|noise'</subtitle>
      <title>bertrand's brain grep</title>
      <updated>2008-07-31T07:48:22Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://bdelacretaz.wordpress.com/?p=968</id>
    <link href="http://grep.codeconsult.ch/2008/07/25/welcome-microsoft/" rel="alternate" type="text/html"/>
    <title>Welcome, Microsoft!</title>
    <summary>Microsoft just announced their platinum level sponsorship of the Apache Software Foundation. 
history.forward(), indeed!</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p>Microsoft just announced their <a href="http://port25.technet.com/archive/2008/07/25/oscon2008.aspx">platinum level sponsorship</a> of the <a href="http://www.apache.org/">Apache Software Foundation</a>. </p>
<p><code>history.forward()</code>, indeed!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bdelacretaz.wordpress.com/968/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bdelacretaz.wordpress.com/968/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/bdelacretaz.wordpress.com/968/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdelacretaz.wordpress.com/968/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/bdelacretaz.wordpress.com/968/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdelacretaz.wordpress.com/968/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/bdelacretaz.wordpress.com/968/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdelacretaz.wordpress.com/968/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/bdelacretaz.wordpress.com/968/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdelacretaz.wordpress.com/968/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/bdelacretaz.wordpress.com/968/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdelacretaz.wordpress.com/968/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grep.codeconsult.ch&amp;blog=2844102&amp;post=968&amp;subd=bdelacretaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-25T19:46:58Z</updated>
    <category term="asf"/>
    <author>
      <name>bdelacretaz</name>
    </author>
    <source>
      <id>http://grep.codeconsult.ch</id>
      <link href="http://grep.codeconsult.ch/feed" rel="self" type="application/atom+xml"/>
      <link href="http://grep.codeconsult.ch" rel="alternate" type="text/html"/>
      <subtitle>cat /dev/brain | egrep -i 'tech|thoughts|noise'</subtitle>
      <title>bertrand's brain grep</title>
      <updated>2008-07-31T07:48:22Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://weblogs.goshaky.com/weblogs/lars/entry/fluid_userstyle_for_friendfeed_take</id>
    <link href="http://feeds.feedburner.com/~r/LarsTrieloff/~3/344613536/fluid_userstyle_for_friendfeed_take" rel="alternate" type="text/html"/>
    <title>Fluid userstyle for FriendFeed take two</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">The topic of <a class="external" href="http://friendfeed.com/e/ac8f78b1-8e80-4fa0-a0da-36697cfad884/Is-it-possible-to-create-Fluid-specific-CSS/">user styles for Fluid</a> came up on <a class="wikipage" href="http://weblogs.goshaky.com/wiki/Wiki.jsp?page=FriendFeed">FriendFeed</a> recently and <a class="external" href="http://friendfeed.com/alexkucera">Alexander Kucera</a> asked me to share my userstyle I am using for <a class="wikipage" href="http://weblogs.goshaky.com/wiki/Wiki.jsp?page=FriendFeed">FriendFeed</a>. Here you are:
<ul>
<li> <a class="external" href="http://weblogs.goshaky.com/weblogs/lars/resource/default.css">Userstyle</a>
</li>
</ul>
The result looks like this:
<p><img alt="http://weblogs.goshaky.com/weblogs/lars/resource/friendfeedblack.png" class="inline" src="http://weblogs.goshaky.com/weblogs/lars/resource/friendfeedblack.png"/>
</p>
<p>The black background is inspired by Twitteriffic and allows for using a semi-transparent window, which does not look as good with a white background. Additionally I stripped everything from the display that is not feed, including the sidebar, the share-dialog, the friendfeed logo and so on. I am using a dark grey logo for the Fluid application that fits the background of the SSB window.
</p>
<p><img alt="http://weblogs.goshaky.com/weblogs/lars/resource/friendfeedicon.png" class="inline" src="http://weblogs.goshaky.com/weblogs/lars/resource/friendfeedicon.png"/></p>
<img height="1" src="http://feeds.feedburner.com/~r/LarsTrieloff/~4/344613536" width="1"/></div>
    </content>
    <updated>2008-07-24T13:32:35Z</updated>
    <published>2008-07-24T13:32:35Z</published>
    <category label="General" term="/General"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="css"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="fluid"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="friendfeed"/>
    <category scheme="http://rollerweblogger.org/ns/tags/" term="userstyle"/><feedburner:origlink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://weblogs.goshaky.com/weblogs/lars/entry/fluid_userstyle_for_friendfeed_take</feedburner:origlink>
    <author>
      <name>Lars Trieloff</name>
    </author>
    <source>
      <id>http://weblogs.goshaky.com/weblogs/lars/feed/entries/atom</id>
      <link href="http://weblogs.goshaky.com/weblogs/lars/" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/LarsTrieloff" rel="self" type="application/atom+xml"/>
      <subtitle>Lars Trieloff's Weblog on Collaboration, Open Source and Software Documentation</subtitle>
      <title>Lars Trieloff's Collaboration Weblog</title>
      <updated>2008-08-12T19:55:50Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/sharepoint.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/sharepoint.html" rel="alternate" type="text/html"/>
    <title>Screencast: JCR Connector for MS Sharepoint</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
Here's a 3 minute screencast about Day's JCR Connector for MS Sharepoint (which makes available Sharepoint servers as JCR-compliant repositories). If you need your Java apps to retrieve content from your corporation's Sharepoint servers: this is for you.
</p>


<div style="text-align: center;">


<a href="http://dev.day.com/microsling/content/blogs/main/sharepoint/docroot/sp.html">
<img src="http://dev.day.com/microsling/content/blogs/main/sharepoint/docroot/sp.png"/></a>


</div>
<br/><br/></div>
    </summary>
    <updated>2008-07-24T00:00:01Z</updated>
    <category term="crx"/>
    <category term="screencast"/>
    <author>
      <name>Michael Marth</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/cheatsheet.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/cheatsheet.html" rel="alternate" type="text/html"/>
    <title>Sling Cheat Sheet</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>
My approach to learning a new technology (or-relearning something that changed several times since I last spend time with it) is writing documentation. As I wanted to write a small Sling application using the newly released <a href="http://incubator.apache.org/sling/site/index.html">Apache Sling</a> 1.0, I decided to create a one-page documentation of the Script-resolution process in Sling. This is the frontside of my cheat sheet. It shows you how to get from HTTP request to content node, from content node to resource type, from resource type to script and what scripting variables are available.
</p>

<div style="text-align: center;">
<a href="http://dev.day.com/microsling/content/blogs/main/cheatsheet/docroot/front.png">
<img src="http://dev.day.com/microsling/content/blogs/main/cheatsheet/docroot/front-small.png"/>
</a>
</div>

<p>
On the flipside of the cheat sheet I documented all the hidden, but powerful request parameters you can use when dealing with the SlingPostServlet, the default handler for all POST requests that gives you endless options for creating, modifying, deleting, copying and moving nodes in your repository.
</p>

<div style="text-align: center;">
<a href="http://dev.day.com/microsling/content/blogs/main/cheatsheet/docroot/back.png">
<img src="http://dev.day.com/microsling/content/blogs/main/cheatsheet/docroot/back-small.png"/>
</a>
</div>

<p>
Click on the thumbnails to get a high-resolution PDF version of either side (3,7 and 1,7 MB) or download the PDF version (300 KB) <a href="http://dev.day.com/microsling/content/blogs/main/cheatsheet/cheatsheet.pdf">
here</a>.

</p></div>
    </summary>
    <updated>2008-07-22T00:00:01Z</updated>
    <category term="tutorial"/>
    <category term="sling"/>
    <author>
      <name>Lars Trieloff</name>
      <email>dev@day.com</email>
    </author>
    <source>
      <id>http://dev.day.com/microsling/content/blogs/main.html</id>
      <link href="http://dev.day.com/microsling/content/blogs/main.xml" rel="self" type="application/atom+xml"/>
      <link href="http://dev.day.com/microsling/content/blogs/main.html" rel="alternate" type="text/html"/>
      <subtitle>(content goes here) blog</subtitle>
      <title>(content goes here) blog</title>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://bdelacretaz.wordpress.com/?p=966</id>
    <link href="http://grep.codeconsult.ch/2008/07/16/gmail-superstars/" rel="alternate" type="text/html"/>
    <title>Gmail superstars</title>
    <summary>From the very useful department: the Gmail superstars option augments the message starring feature with different colors and shapes.
Very useful if like me you keep your (small of course) to-do list in your inbox.</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p><a href="http://googlesystem.blogspot.com/2008/07/gmail-superstars.html"><img align="right" alt="superstars.jpg" border="0" height="97" src="http://bdelacretaz.files.wordpress.com/2008/07/superstars.jpg?w=195&amp;h=97" width="195"/></a>From the <em>very useful</em> department: the <a href="http://googlesystem.blogspot.com/2008/07/gmail-superstars.html">Gmail superstars</a> option augments the message starring feature with different colors and shapes.</p>
<p>Very useful if like me you keep your (small of course) to-do list in your inbox.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bdelacretaz.wordpress.com/966/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bdelacretaz.wordpress.com/966/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/bdelacretaz.wordpress.com/966/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdelacretaz.wordpress.com/966/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/bdelacretaz.wordpress.com/966/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdelacretaz.wordpress.com/966/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/bdelacretaz.wordpress.com/966/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdelacretaz.wordpress.com/966/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/bdelacretaz.wordpress.com/966/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdelacretaz.wordpress.com/966/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/bdelacretaz.wordpress.com/966/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdelacretaz.wordpress.com/966/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grep.codeconsult.ch&amp;blog=2844102&amp;post=966&amp;subd=bdelacretaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-16T13:31:44Z</updated>
    <category term="tools"/>
    <author>
      <name>bdelacretaz</name>
    </author>
    <source>
      <id>http://grep.codeconsult.ch</id>
      <link href="http://grep.codeconsult.ch/feed" rel="self" type="application/atom+xml"/>
      <link href="http://grep.codeconsult.ch" rel="alternate" type="text/html"/>
      <subtitle>cat /dev/brain | egrep -i 'tech|thoughts|noise'</subtitle>
      <title>bertrand's brain grep</title>
      <updated>2008-07-31T07:48:22Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://bdelacretaz.wordpress.com/?p=963</id>
    <link href="http://grep.codeconsult.ch/2008/07/16/craviotto-drums-wow/" rel="alternate" type="text/html"/>
    <title>Craviotto drums - wow</title>
    <summary>In my quest for a new snare drum last week in Silicon Valley, I ended up at Gelb Music, where Don suggested that I try his favorite one, the Craviotto one-ply snare (nice store by the way, friendly staff and lots of instruments and accessories to try out).
What a drum - I couldn’t afford it [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="snap_preview"><br/><p><a href="http://www.craviottodrums.com/snares.php"><img align="right" alt="unlimited_red_small.jpg" border="0" height="126" src="http://bdelacretaz.files.wordpress.com/2008/07/unlimited-red-small.jpg?w=184&amp;h=126" width="184"/></a>In my quest for a new snare drum last week in Silicon Valley, I ended up at <a href="http://www.gelbmusic.com/">Gelb Music</a>, where Don suggested that I try his favorite one, the <a href="http://www.craviottodrums.com">Craviotto</a> one-ply snare (nice store by the way, friendly staff and lots of instruments and accessories to try out).</p>
<p>What a drum - I couldn’t afford it as I had other stuff to buy as well, but the sound quality and dynamics of this snare are absolutely amazing. It was not that expensive, about $700 if I remember correctly, which is much less than I would pay here in Switzerland for anything similar. Craviotto also makes complete drumsets, but the only price indication that I could find by browsing around is $8000 for a four-piece kit, which is not exactly in my price range at this time.</p>
<p>In the end I got a nice sounding Yamaha maple snare, it’s miles better than my current 20-years old brass one and was only a bit over the budget that I had initially set. I guess life has to be made of compromises, and this is a more than decent one.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bdelacretaz.wordpress.com/963/"/> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bdelacretaz.wordpress.com/963/"/> <a href="http://feeds.wordpress.com/1.0/gocomments/bdelacretaz.wordpress.com/963/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bdelacretaz.wordpress.com/963/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/bdelacretaz.wordpress.com/963/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bdelacretaz.wordpress.com/963/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/bdelacretaz.wordpress.com/963/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bdelacretaz.wordpress.com/963/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/bdelacretaz.wordpress.com/963/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bdelacretaz.wordpress.com/963/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/bdelacretaz.wordpress.com/963/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bdelacretaz.wordpress.com/963/"/></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grep.codeconsult.ch&amp;blog=2844102&amp;post=963&amp;subd=bdelacretaz&amp;ref=&amp;feed=1"/></div></div>
    </content>
    <updated>2008-07-16T09:01:46Z</updated>
    <category term="music"/>
    <author>
      <name>bdelacretaz</name>
    </author>
    <source>
      <id>http://grep.codeconsult.ch</id>
      <link href="http://grep.codeconsult.ch/feed" rel="self" type="application/atom+xml"/>
      <link href="http://grep.codeconsult.ch" rel="alternate" type="text/html"/>
      <subtitle>cat /dev/brain | egrep -i 'tech|thoughts|noise'</subtitle>
      <title>bertrand's brain grep</title>
      <updated>2008-07-31T07:48:22Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://dev.day.com/microsling/content/blogs/main/rubycr.html</id>
    <link href="http://dev.day.com/microsling/content/blogs/main/rubycr.html" rel="alternate" type="text/html"/>
    <title>Sling's RESTful API for Content Repositories</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://incubator.apache.org/sling/site/index.html">Apache Sling</a> is a game changer for <a href="http://en.wikipedia.org/wiki/Content_repository_API_for_Java">Java Content Repositories</a> in two different ways:</p>

<ol><li><p>It allows developers to build web applications on top of JCRs (and thus exploiting the benefits of JCRs) much much more efficiently than it was possible before. Proof for this claim is given e.g. in the screencast "<a href="http://dev.day.com/microsling/content/blogs/main/firststeps2.html">TheServerSide.com in 15 minutes</a>" or by looking at the little amount of code needed for the <a href="http://dev.day.com/microsling/content/blogs/main/anothersampleapp.html">Notes example application</a>.</p></li>
<li><p>Sling exposes a RESTful API for the underlying JCR. As a consequence, the content repository can easily be used from outside of the JVM. In fact, Sling really takes the J out of JCR.</p></li></ol>
<p>I would like to discuss the second point in a bit more depth. At the moment we are seeing the arrival of a bunch of new (logical) storage technologies that aim to replace or complement the relational model. I discussed a number of them in the post "<a href="http://dev.day.com/microsling/content/blogs/main/yourdataisyourserver.html">Your Data is Your Web Server</a>", but there are two dominant aspects in my view:</p>
<ul><li><p>For connecting RESTful APIs are used instead of ODBC, JDBC or similar. REST is the new JDBC.</p>
</li><li><p>There is no need for creating big upfront data structure. Instead, unstructured data can be stored ad hoc.</p></li></ul>
<p>The Sling/JCR combo nicely fits into this and also adds some more (see bottom (*)). In this post I show hands-on how to use Sling's REST APIs from Ruby - mind you, that's <a href="http://en.wikipedia.org/wiki/Ruby_MRI">MRI</a>, not <a href="http://en.wikipedia.org/wiki/JRuby">JRuby</a>. If you have not done so, yet, <a href="http://dev.day.com/microsling/content/blogs/cup/downloads.c.html">install CRX Quickstart</a> (which bundles <a href="http://jackrabbit.apache.org/">Apache Jackrabbit</a> and Sling). Just start it by double-clicking, no further customization is needed.</p>

<p>In order to make this a fun exercise I installed three Ruby gems: the brilliant <a href="http://faker.rubyforge.org/">Faker</a> for producing fake data, a <a href="http://rubyforge.org/projects/flickr/">Flickr gem</a> and the <a href="http://json.rubyforge.org/">Ruby-JSON</a> gem. Get them as well for following the examples (the usual "sudo gem install ..." will do). Due to Ruby's disappointing file upload capabilities please also install <a href="http://curl.haxx.se/">curl</a> and put it on the path.</p>

<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">Writing and Reading</h6>

<p>Writing to the repository is very simple. Just post the node properties. The URL where the POST goes to determines the path of the node (a * in the end denotes that a new node). Each node can be retrieved in JSON format by sending a GET request. For example a GET for /path/to/node.2.json will return /path/to/node and its sub trees two levels deep in JSON format. Using -1 instead of 2 will return the whole sub tree.</p>

<p>Let's put this together: the Ruby script below creates two nodes at /content/cr/hello and /content/cr/ruby, respectively (it also writes some node properties that get send along with the POST).  In the next step, the tree at /content/cr is retrieved and parsed into native Ruby objects. In the last step we use these objects to produce some more child nodes like in the first step. So, here we are: no Java, all Ruby.</p>


<div class="codesnippet scrollablecodesnippet"><pre>require 'net/http'
require 'uri'
require 'json/pure'
require 'faker'

Net::HTTP.post_form(URI.parse("http://localhost:7402/content/cr/hello"), {'name'=&gt;'yay', 'body'=&gt;Faker::Lorem.paragraphs(5)})
Net::HTTP.post_form(URI.parse("http://localhost:7402/content/cr/ruby"), {'body'=&gt;Faker::Lorem.paragraphs(5)})

data = Net::HTTP.get_response(URI.parse("http://localhost:7402/content/cr.-1.json")).body
# we convert the returned JSON data to native Ruby data structure - a hash
notes = JSON.parse(data)

# iterate over nodes and produce some more fun data
notes.keys.each do |node_name|   
    5.times {Net::HTTP.post_form(URI.parse("http://localhost:7402/content/cr/#{node_name}/*"), {'name'=&gt;Faker::Name.name , 'body'=&gt;Faker::Company.catch_phrase()})}
end
</pre></div>



<p><img src="http://dev.day.com/microsling/content/blogs/main/rubycr/docroot/s1.jpg"/></p>

<h6 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">Binary Data</h6>

<p>One excellent property of JCRs is that they handle binary data as well as non-binary data (ahm, "<a href="http://www.theserverside.com/news/thread.tss?thread_id=45763">everything is content</a>"). This is demonstrated by the simple script below. It downloads images from Flickr and posts them into the repository at /content/cr/pixxi.</p>
<p>All mechanisms are the same as with the non-binary data above. You will need to supply a Flickr API key to run the script (get it <a href="http://www.flickr.com/services/api/keys/apply/">here</a>.). As mentioned I use the command line tool curl for the file upload.(**)</p>


<div class="codesnippet scrollablecodesnippet"><pre>require 'net/http'
require 'uri'
require 'flickr'

flickr = Flickr.new(YOUR_API_KEY)

# get the last 100 public photos...
flickr.photos.each do |photo|  
  uri = URI.parse(photo.source)
  Net::HTTP.start(uri.host) { |http|
    resp = http.get(uri.path)
    open("test/"+photo.filename, "wb") { |file|
      file.write(resp.body)
    }
  }
  # post the file to the repository
  system("curl -F "+photo.filename+"=@test/"+photo.filename+" localhost:7402/content/cr/pixxi/*")
  # clean up
  File.delete("test/"+photo.filename)
end
</pre></div>



<p>After uploading the files each one h