<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Julien Viet's blog</title>
 <link href="http://username.github.com/atom.xml" rel="self"/>
 <link href="http://username.github.com"/>
 <updated>2013-09-02T02:05:45-07:00</updated>
 <id>http://username.github.com</id>
 <author>
   <name>Julien Viet</name>
   <email>blah@email.test</email>
 </author>

 
 <entry>
   <title>CRaSH 1.3 beta3</title>
   <link href="http://username.github.com/2013/09/02/crash-13-beta3"/>
   <updated>2013-09-02T00:00:00-07:00</updated>
   <id>http://username.github.com/2013/09/02/crash-13-beta3</id>
   <content type="html">&lt;p&gt;The development of CRaSH 1.3 has been started a few months ago. The &lt;a href=&quot;http://www.crashub.org&quot;&gt;website&lt;/a&gt; now provides a &lt;em&gt;1.3&lt;/em&gt; section for people that want to play with the 1.3 betas.&lt;/p&gt;

&lt;p&gt;I haven't talked much about it so far but I think it's time to unveil what will be in this new version.&lt;/p&gt;

&lt;h2&gt;Polyglot&lt;/h2&gt;

&lt;p&gt;It makes a lot of sense to widen the scope of CRaSH and provide support for more JVM languages. Integrating a dynamic language is not hard, however creating an API for the interactions between the target language and the CRaSH runtime requires more work.&lt;/p&gt;

&lt;p&gt;Surprisingly the first supported languages in this new beta is ... Java! With our experience we have now the possiblity to easily dynamically compile Java at runtime (using the Tool API). You can see that as a proof of concept of decoupling CRaSH from Groovy (it was actually less coupled than I originally thought). Simply put now you can have &lt;code&gt;.java&lt;/code&gt; commands and they will just be compiled fine by CRaSH (&lt;a href=&quot;https://github.com/crashub/crash/blob/master/shell/src/main/resources/crash/commands/base/jmx.java&quot;&gt;jmx command&lt;/a&gt;  written in Java).&lt;/p&gt;

&lt;p&gt;In the next iteration (beta4) we will focus with the integration of the Ruby language. I have been learning Ruby for the past few weeks and the language does not seem hard to learn, however I am lacking of experience for defining a decent Ruby API. So we are looking for someone with Ruby experience that could help us to define such API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating a command in Ruby&lt;/li&gt;
&lt;li&gt;Invoking a command from Ruby&lt;/li&gt;
&lt;li&gt;etc...&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For Groovy I have the chance to know pretty well Guillaume Laforge and he often provided a lot of guidance for providing a great Groovy API. We are looking for anyone that could help us doing the same for Ruby. If you know such great guy, ask him to poke us on the &lt;a href=&quot;http://groups.google.com/group/crash-users&quot;&gt;crash-users&lt;/a&gt; list.&lt;/p&gt;

&lt;h2&gt;Improved Groovy support&lt;/h2&gt;

&lt;p&gt;Until CRaSH 1.2 we focused on the Groovy language because it is the best dynamic language for Java developers on the JVM. It took several iterations to provide the best Groovy support and this version covers the part for invoking commands from Groovy and how to assemble them in a command pipe line, here is an overview of the API:&lt;/p&gt;

&lt;h4&gt;Evaluating a command&lt;/h4&gt;

&lt;p&gt;A command name evalutes to a Groovy closure, allowing to call the command just like a function:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;help()
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Evaluating a compound command&lt;/h4&gt;

&lt;p&gt;Sub commands can be invoked by resolving a new closure from the initial command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;thread.ls()
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Passing options and arguments&lt;/h4&gt;

&lt;p&gt;Command options and command arguments are passed as invocation parameters, options are used as a map or named parameters
and arguments are the other invocation parameters:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;thread.ls(h:true)
system.propget(&quot;file.encoding&quot;)
log.send(m:&quot;hello&quot;, &quot;the.category&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Command pipeline&lt;/h4&gt;

&lt;p&gt;Pipelines can be assembled with the &lt;code&gt;|&lt;/code&gt; (pipe) operator. When a command closure is combined with a pipe, it returns a new closure that will invoke the pipeline:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system.propls | egrep { &quot;java.*&quot; })()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A pipeline can also contain Groovy closures in addition of the existing commands:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(thread.ls | { Thread thread -&amp;gt; [id:thread.id, name:thread.name] })()
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Extended REPL&lt;/h2&gt;

&lt;p&gt;REPL stands &lt;em&gt;for Read–eval–print loop&lt;/em&gt;, which is what you have when you have an interactive session with CRaSH. Until version 1.2, the only REPL is a language close to bash shell for invoking commands or creating command pipelines.&lt;/p&gt;

&lt;p&gt;Since CRaSH 1.3 will be polyglot, this new version provides polyglot support for the REPL. The new &lt;code&gt;repl&lt;/code&gt; directive allow you to switch to other REPL implementation and we provide in this beta a Groovy REPL:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;% repl groovy
Using repl groovy
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this mode you can type plain Groovy (it is similar to Groovy Shell) and most importantly you can use the improved Groovy support seen above, for instance:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;% (thread.ls | { Thread thread -&amp;gt; [id:thread.id, name:thread.name] })()
id name
------------------------------------
2  Reference Handler
3  Finalizer
...
% cmd = thread.ls | { Thread thread -&amp;gt; [id:thread.id, name:thread.name] }
thread.ls | Script14$_run_closure1@47da4d19
% cmd()
...
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Asciidoc documentation&lt;/h2&gt;

&lt;p&gt;The documentation is now written in Asciidoc, it is in many ways similar to the previous documentation. Asciidoc has gained a lot of traction in the past months thanks to the great job of Dan Allen on &lt;a href=&quot;http://asciidoctor.org&quot;&gt;Asciidoctor&lt;/a&gt; and GitHub provides a native support for Asciidoc providing a decent doc preview. The 1.3 doc is also deployed live on the &lt;a href=&quot;http://www.crashub.org/beta/reference.html&quot;&gt;site&lt;/a&gt; as a preview.&lt;/p&gt;

&lt;h1&gt;Wrap up&lt;/h1&gt;

&lt;p&gt;CRaSH 1.3 will provide polyglot support with additional languages such as Ruby as main theme. The Groovy language support has been strenghtened providing the best Groovy support so far. You can download the 1.3 beta or read the documentation from the &lt;a href=&quot;http://www.crashub.org&quot;&gt;website&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Devoxx University</title>
   <link href="http://username.github.com/2012/11/14/devoxx-university"/>
   <updated>2012-11-14T00:00:00-08:00</updated>
   <id>http://username.github.com/2012/11/14/devoxx-university</id>
   <content type="html">&lt;h1&gt;CRaSH session&lt;/h1&gt;

&lt;p&gt;Alain Defrance and myself arrived in Anterwerpen Sunday evening with a train from Paris with the main goal of finishing the preps for the CRaSH Tools In Action. We've have been working on CRaSH to finish the features for the demo we wanted to show but we did not have time to reharse together since I was in vacation for a week until this day. However we did prepare it carefully for a long time by creating a precise storyboard of the presentation and focusing on the structure, the flow and the interactions between us. Until the last hour we worked on improving those stories and fine tuning them until it became obvious for us and for the audience. I was a bit scared as we did not reharse them before, but it turns out that the impact on the presentation was almost none and everything went fine.&lt;/p&gt;

&lt;p&gt;We had 4 demos packed in half and hour, each demo showing a couple of aspects of CRaSH. This choice was good because it gives a natural structure to the talk, minimizes the demo failure risks. One key point is to have a good flow between the demos, so the transitions are easy for the audience.&lt;/p&gt;

&lt;h2&gt;Out Of The Box&lt;/h2&gt;

&lt;p&gt;We show how to download and install CRaSH, the directory layout and the base configuration., After that we run the standalone mode and show basic commands that are immediatly available. At the end of the demo, we show the new &lt;a href=&quot;http://www.crashub.org/&quot;&gt;crashub.org&lt;/a&gt; site and the &lt;a href=&quot;http://crash.vietj.cloudbees.net&quot;&gt;web demo&lt;/a&gt;, allowing the audience could use CRaSH from their laptop during the talk!!!&lt;/p&gt;

&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;/wp-content/uploads/2012/11/ootb.png&quot; class=&quot;img-polaroid&quot;&gt;&lt;/img&gt;&lt;/div&gt;


&lt;h2&gt;The Swiss Knife&lt;/h2&gt;

&lt;p&gt;We explain the concept of attaching CRaSH to a running JVM and in this part we connect to JBoss AS. Thanks to the &lt;em&gt;log&lt;/em&gt; command we print a message on AS7 console to show that the JVM running CRaSH in JBoss AS. Then we showed what CRaSH brings to the EE developer with commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JNDI : a jndi viewer, for instance &lt;strong&gt;jndi find&lt;/strong&gt; list the content of the naming tree.&lt;/li&gt;
&lt;li&gt;JDBC : open an existing an JDBC connection from a JNDI datasource and use it out of the box&lt;/li&gt;
&lt;li&gt;JPA : the new companion of the JDBC command that provides access to your entity beans, allowing to perform live JPA QL queries&lt;/li&gt;
&lt;/ul&gt;


&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;/wp-content/uploads/2012/11/knife.png&quot; class=&quot;img-polaroid&quot;&gt;&lt;/img&gt;&lt;/div&gt;


&lt;h2&gt;Extend your runtime&lt;/h2&gt;

&lt;p&gt;This time the goal is to show we can embed CRaSH in a runtime and create commands interactively. CRaSH is started and configured by a context, in this case CRaSH is started as a Spring bean. Then we code a live command: the Twitter commands which retrieves twits from a Twitter service Spring bean. The command is accessed via an SSH connection.&lt;/p&gt;

&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;/wp-content/uploads/2012/11/twitter.png&quot; class=&quot;img-polaroid&quot;&gt;&lt;/img&gt;&lt;/div&gt;


&lt;h2&gt;Monitoring&lt;/h2&gt;

&lt;p&gt;The last part attaches CRaSH to a Tomcat server. The new jmx commands allows to retrive statistics from the Tomcat MBeans, we combine this command with the sort command and make a command pipe to process an object stream that gets data from the Tomcat MBeans, sort them and display tabular data. We conclude the demo by showing the new CRaSH dashboard feature and put the JMX pipe we previously code in the dashboard.&lt;/p&gt;

&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;/wp-content/uploads/2012/11/dashboard.png&quot; class=&quot;img-polaroid&quot;&gt;&lt;/img&gt;&lt;/div&gt;


&lt;p&gt;Although most of the talk is about demoing CRaSH, we had a &lt;a href=&quot;http://www.slideshare.net/jviet/crash-the-shell-for-the-jvm&quot;&gt;few slides&lt;/a&gt; we used to drive the presentation. We had a very good attendance, considering the time the talk was given and the hard competition against other slots, we had a great feedback on Twitter about the demo that people loved.&lt;/p&gt;

&lt;p&gt;Finally, it was a long time since I wasn't on stage, I was a bit anxious until the last minute given how large the stage is and how small we are (&lt;a href=&quot;/wp-content/uploads/2012/11/stage.png&quot;&gt;you can look here&lt;/a&gt;). But once it started I felt very comfortable and was very proud to show our stuff.&lt;/p&gt;

&lt;h1&gt;Hackergarten&lt;/h1&gt;

&lt;p&gt;On day 2 we participated in the Hackergarten the whole day. Many open source developers showed up and the competition was hard to get people involved. It looks like at the end, not many external people contributed to the Hackergarten and the present open source developers end up contributing on their own project. It was a great social experience though I think, as open source guys from different projects could discuss, share ideas and create bridges between projects.&lt;/p&gt;

&lt;p&gt;On our side, Stefan stepped up and was interested in creating a synergy between Grails and CRaSH. He spent the whole day to create a Grails plugin that embeds CRaSH in Grails. The code will be contributed to the crashub organization as a new project and that's a great win for CRaSH :-)&lt;/p&gt;

&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;/wp-content/uploads/2012/11/img_0036.jpg&quot; class=&quot;img-polaroid&quot;&gt;&lt;/img&gt;&lt;/div&gt;


&lt;p&gt;Alain Defrance started to reuse most of the Swing VisualVM plugin to create an Intellij plugin. You can expect to see this soon.&lt;/p&gt;

&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;/wp-content/uploads/2012/11/img_0032.jpg&quot; class=&quot;img-polaroid&quot;&gt;&lt;/img&gt;&lt;/div&gt;


&lt;p&gt;On my side, I fixed a couple of bugs in CRaSH and spend lot of time talking with other people. I had an long and fruitfull discussion with Dan Allen about Arquillian, testing and open source. I also had the opportunity to show Juzu, the web framework I've been working on for a year to a few JBoss folks that seemed to like it.&lt;/p&gt;

&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;/wp-content/uploads/2012/11/img_0049.jpg&quot; class=&quot;img-polaroid&quot;&gt;&lt;/img&gt;&lt;/div&gt;


&lt;p&gt;Now we will to enjoy the rest of the conference and spend time in the conference!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>CRaSH at Devoxx 2012</title>
   <link href="http://username.github.com/2012/11/01/crash-at-devoxx-2012"/>
   <updated>2012-11-01T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/11/01/crash-at-devoxx-2012</id>
   <content type="html">&lt;p&gt;The main CRaSH team, i.e &lt;a href=&quot;http://www.alain-defrance.com&quot;&gt;Alain Defrance&lt;/a&gt; and myself will be present at Devoxx 2012 for from Monday to Thursday evening.&lt;/p&gt;

&lt;p&gt;On Monday 12th we will present a &lt;a href=&quot;http://www.devoxx.com/display/DV12/CRaSH+an+extensible+command+line+for+the+JVM&quot;&gt;Tools in Action  session&lt;/a&gt;. The Tools in Action format is a perfect fit for showing how you can use CRaSH in your daily work. It does not require any particular knowledge except being familliar with Java :-) .&lt;/p&gt;

&lt;p&gt;During the session we will show you three use cases that CRaSH can solve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CRaSH the developer's swiss knife&lt;/li&gt;
&lt;li&gt;Create custom dashboards for aggregating statistics and metrics of the JVM&lt;/li&gt;
&lt;li&gt;Add a Command Line Interface to your project&lt;/li&gt;
&lt;li&gt;How to write a shell command&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;During the talk you will learn how to use CRaSH, the new features of the upcoming 1.2 release and &lt;em&gt;more&lt;/em&gt;, here is a teaser video!&lt;/p&gt;

&lt;p align=&quot;center&quot; style=&quot;padding: 40px 0px 40px 0px&quot;&gt;&lt;iframe src=&quot;http://player.vimeo.com/video/52547184?badge=0&quot; width=&quot;600&quot; height=&quot;336&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;/p&gt;


&lt;p&gt;On Tuesday 13th we will be present at the &lt;a href=&quot;http://www.devoxx.com/display/DV12/Hackergarten+Hands-On+Coding+Event&quot;&gt;Devoxx Hackergarten&lt;/a&gt;. The Hackergarten a great opportunity for being involved in CRaSH development, there are many ways for being a contributor, we have some ideas, but the best is that you come with your own :-)&lt;/p&gt;

&lt;p&gt;The other days we will enjoy the conference and have a great time!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.1 release</title>
   <link href="http://username.github.com/2012/08/06/crash-1-1-release/"/>
   <updated>2012-08-06T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/08/06/crash-1-1-release</id>
   <content type="html">&lt;p&gt;Released today after a 2 months of work, featuring:&lt;/p&gt;
&lt;h3&gt;Color and styles&lt;/h3&gt;
&lt;p&gt;CRaSH now supports shell color and styles for increasing the readability of your commands, for example:&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/wp-content/uploads/2012/08/crash-01.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-343&quot; title=&quot;crash-01&quot; src=&quot;/wp-content/uploads/2012/08/crash-01.png&quot; alt=&quot;&quot; width=&quot;500&quot; height=&quot;198&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The same command in CRaSH 1.1 with better color and formatting:&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/wp-content/uploads/2012/08/crash-11.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-344&quot; title=&quot;crash-11&quot; src=&quot;/wp-content/uploads/2012/08/crash-11.png&quot; alt=&quot;&quot; width=&quot;500&quot; height=&quot;196&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Spring support&lt;/h3&gt;
&lt;p&gt;CRaSH can be embedded and configured as a Spring bean providing automatic access to your Spring beans. Writing CRaSH commands that leverage Spring beans is now trivial, now you can extend your Spring applications with CRaSH!&lt;/p&gt;
&lt;h3&gt;Standalone mode improvements&lt;/h3&gt;
&lt;p&gt;The standalone mode has a few improvements:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;a conf/crash.properties has been added for configuring the shell&lt;/li&gt;
	&lt;li&gt;the &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; connector has been added&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Download&lt;/h3&gt;
&lt;p&gt;CRaSH can now be fully downloaded and we also provide smaller archives depending on the bundle you like:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/crsh/downloads/detail?name=crsh-all-1.1.0.tar.gz&amp;can=2&amp;q=&quot;&gt;CRaSH All&lt;/a&gt; : all the available bundles&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/crsh/downloads/detail?name=crsh-standalone-1.1.0.tar.gz&amp;can=2&amp;q=&quot;&gt;CRaSH Standalone&lt;/a&gt; : starts a &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt; or attach to it a running &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/crsh/downloads/detail?name=crsh-web-1.1.0.tar.gz&amp;can=2&amp;q=&quot;&gt;CRaSH Web&lt;/a&gt; : the classic web application bundle&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/crsh/downloads/detail?name=crsh-spring-1.1.0.tar.gz&amp;can=2&amp;q=&quot;&gt;CRaSH Spring&lt;/a&gt; : embedded as a Spring bean in a web application&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/crsh/downloads/detail?name=crsh-gatein-1.1.0.tar.gz&amp;can=2&amp;q=&quot;&gt;CRaSH GateIn&lt;/a&gt; : extends the web bundle and adds specific GateIn features like Java Content Repository support&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Finally&lt;/h3&gt;
&lt;p&gt;If you want to learn more about those features, they have been explained in this nice screen cast:&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;iframe src=&quot;http://player.vimeo.com/video/47014671&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.1-cr1 released</title>
   <link href="http://username.github.com/2012/07/10/crash-1-1-cr1-released/"/>
   <updated>2012-07-10T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/07/10/crash-1-1-cr1-released</id>
   <content type="html">&lt;p&gt;We just released 1.1-cr1 with the following noticeable changes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The most &lt;em&gt;visible&lt;/em&gt; feature is the support of text styling with colors and decorations, a few commands already use it such as &amp;#8220;thread ls&amp;#8221; or the jdbc command, it is also quite easy to use when writing a command.&lt;/li&gt;
	&lt;li&gt;Spring embedding allows to embed CRaSH in Spring and its plugins as Spring beans. In this mode, CRaSH commands can access the Spring beans registered in the Spring bean factory allowing to extend easily Spring applications.&lt;/li&gt;
	&lt;li&gt;There is now a crash.properties file in the standalone crash configuration directory providing a default configuration.&lt;/li&gt;
	&lt;li&gt;The &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; connector is now deployed in standalone mode.&lt;/li&gt;
	&lt;li&gt;Enhanced documentation for the developer section.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can get the links as usual from the &lt;a href=&quot;http://julienviet.com/crash&quot; target=&quot;_blank&quot;&gt;project page&lt;/a&gt; and the release notes from the &lt;a href=&quot;https://jira.exoplatform.org/secure/ReleaseNote.jspa?projectId=10412&amp;version=18710&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;caps&quot;&gt;JIRA&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Juzu 0.5 released!</title>
   <link href="http://username.github.com/2012/06/27/juzu-05-released/"/>
   <updated>2012-06-27T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/06/27/juzu-05-released</id>
   <content type="html">&lt;p&gt;After a few months of hard work, &lt;a href=&quot;https://github.com/juzu/juzu&quot;&gt;Juzu&lt;/a&gt; 0.5 is released with many improvements:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;First of all, the documentation has been improved with two new chapters in the &lt;a href=&quot;http://juzuweb.org/#tutorial&quot;&gt;tutorial&lt;/a&gt; and a new &lt;a href=&quot;http://juzuweb.org/#reference&quot;&gt;reference guide&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;The plugin architecture has been improved and provides new plugins&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://juzuweb.org/#assets&quot;&gt;Asset plugin&lt;/a&gt;: now you can declare the scripts and stylesheets&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://juzuweb.org/#ajax&quot;&gt;Ajax plugin&lt;/a&gt; for easing the creation of Ajax requests&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;LESS&lt;/span&gt; plugin to transform .less stylesheet to .css stylesheet at compile phase&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://juzuweb.org/#plugins_portlet&quot;&gt;Portlet plugin&lt;/a&gt;&lt;a&gt; to generate a Portlet class and inject portlet preferences at runtime&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a&gt;&lt;/a&gt;&lt;a href=&quot;http://juzuweb.org/#templatespi&quot;&gt;Templating Service Provider Interface&lt;/a&gt; for supporting additional template engines in Juzu such as the integration of the &lt;a href=&quot;http://juzuweb.org/#d5e711&quot;&gt;Mustache template engine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are a couple of features we have added to Juzu as screencats:&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;p&gt;&lt;iframe src=&quot;http://player.vimeo.com/video/44737191&quot; width=&quot;284&quot; height=&quot;160&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;a href=&quot;http://vimeo.com/44737191&quot;&gt;Juzu &lt;span class=&quot;caps&quot;&gt;LESS&lt;/span&gt; plugin&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;p&gt;&lt;iframe src=&quot;http://player.vimeo.com/video/44722647&quot; width=&quot;284&quot; height=&quot;160&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;a href=&quot;http://vimeo.com/44722647&quot;&gt;Juzu application with Eclipse and Maven&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;We are now going to work on the Juzu 0.6 release focusing on:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Standalone mode: take Juzu outside of the portal world and create standalone applications&lt;/li&gt;
	&lt;li&gt;Bean validation integration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We will provide milestones for those features as 0.5.x releases so you will be able to use them and give us feedback. If you are interested in following the development of Juzu or want to be involved you can join the &lt;a href=&quot;juzu@googlegroups.com&quot;&gt;Juzu Google Group&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can &lt;a href=&quot;https://github.com/juzu/juzu/downloads&quot;&gt;download Juzu&lt;/a&gt; or use it from Maven.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Juzu has Mustache!</title>
   <link href="http://username.github.com/2012/06/08/juzu-has-mustache/"/>
   <updated>2012-06-08T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/06/08/juzu-has-mustache</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://juzuweb.org&quot;&gt;Juzu&lt;/a&gt; 0.5 will be released soon and will provide many new great features. Among them now the &lt;a href=&quot;http://mustache.github.com/mustache.5.html&quot;&gt;Mustache&lt;/a&gt; templating engine is supported. Mustache is a logic-less templating engine that is language agnostic:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/2893951.js?file=gistfile1.txt&quot;&gt;&lt;/script&gt;&lt;p&gt;It was important for me to support a second templating language and Mustache is a great choice because:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;it demonstrate that Juzu can use different templating engine&lt;/li&gt;
	&lt;li&gt;some people wants logic-less languages and try to avoid code in templates&lt;/li&gt;
	&lt;li&gt;it provides that Juzu core is not coupled to the current templating engine&lt;/li&gt;
	&lt;li&gt;Mustache.java implementation has a good architecture and is easy to embed / integrate&lt;/li&gt;
	&lt;li&gt;Mustache is easy to use and understand&lt;/li&gt;
	&lt;li&gt;Mustache can also be used on the client side and later an application could use the same template both on the server and the client&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The integration relies on &lt;a href=&quot;https://github.com/spullara/mustache.java&quot;&gt;Mustache.java&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;mustaches (that&amp;#8217;s the name of a mustache file) are also in the &amp;#8220;templates&amp;#8221; package and ends with &amp;#8220;.mustache&amp;#8221;&lt;/li&gt;
	&lt;li&gt;mustache are used and declared exactly the same way than .gtmpl templates (i.e @Inject Path(&amp;#8220;index.mustache&amp;#8221;) Template&lt;/li&gt;
	&lt;li&gt;Mustache can also have type safe parameters using the pragma notion which is an extension of Mustache.java :  anywhere in the template&lt;/li&gt;
	&lt;li&gt;At the moment taglibs are coupled to the native groovy template engine and cannot be used. I don&amp;#8217;t know if it&amp;#8217;s feasible to be able to integrate a tag lib with a .mustache&lt;/li&gt;
	&lt;li&gt;5/ Mustache is not embedded in Juzu core and instead is provided as an independent jar : juzu-templating-mustache . The main reason is that Mustache.java relies on the Mustache.java library but also on Google Guava. I want to keep juzu-core the less coupled to third party library.&lt;/li&gt;
&lt;/ol&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH feedback after Devoxx FR 2012</title>
   <link href="http://username.github.com/2012/05/18/crash-feedback-after-devoxx-fr-2012/"/>
   <updated>2012-05-18T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/05/18/crash-feedback-after-devoxx-fr-2012</id>
   <content type="html">&lt;p&gt;My CRaSH quickie had a good attendance at Devoxx and it was great to see many folks interested in the project.&lt;br /&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;/wp-content/uploads/2012/05/img_7831.jpeg&quot;&gt;&lt;img class=&quot;size-medium wp-image-306 aligncenter&quot; title=&quot;img_7831&quot; src=&quot;/wp-content/uploads/2012/05/img_7831-300x199.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;199&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://linsolas.free.fr/wordpress/index.php/2012/04/devoxx-france-dernier-jour/&quot;&gt;Romain&lt;/a&gt; and &lt;a href=&quot;http://www.duminy.fr/blog/?p=1655&quot;&gt;Fabien&lt;/a&gt; blogged about CRaSH and the feedback is good (although short but it was at 15mn quickie after all :-) ). The blog are written in french language though.&lt;/p&gt;
&lt;p&gt;The 1.0 release was done also during Devoxx and now the project&amp;#8217;s follower on GitHub has increased to more than &lt;a href=&quot;https://github.com/vietj/crash/watchers&quot;&gt;60 persons&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Devoxx FR 2012 was a great moment and a fantastic opportunity to evangelize CRaSH. We are now actively working on the forth coming CRaSH 1.1, stay tuned and follow the project!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0 released</title>
   <link href="http://username.github.com/2012/04/23/crash-1_0-released/"/>
   <updated>2012-04-23T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/04/23/crash-1_0-released</id>
   <content type="html">&lt;p&gt;After two years of development, I&amp;#8217;m proud to release &lt;a href=&quot;http://vietj.github.com/crash/&quot;&gt;CRaSH&lt;/a&gt; 1.0:&lt;/p&gt;
&lt;p&gt;CRaSH started as an experiment during my Christmas vacations late 2009 and evolved to become the extensible shell for the Java Virtual Machine offering many exclusive features like:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; and Telnet connectivity&lt;/li&gt;
	&lt;li&gt;Standalone and attach mode&lt;/li&gt;
	&lt;li&gt;Extensible with hot reloading commands&lt;/li&gt;
	&lt;li&gt;Ready to use: &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt; management, &lt;span class=&quot;caps&quot;&gt;JDBC&lt;/span&gt; access, etc&amp;#8230;&lt;/li&gt;
	&lt;li&gt;Powerful contextual completion&lt;/li&gt;
	&lt;li&gt;Pluggable authentication&lt;/li&gt;
	&lt;li&gt;Easy to embed&lt;/li&gt;
	&lt;li&gt;Java Content Repository plugin for eXo &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; and Jackrabbit servers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I want to thank the people that make this possible since the inception: &lt;a href=&quot;http://blog.aheritier.net/&quot;&gt;Arnaud Héritier&lt;/a&gt;, &lt;a href=&quot;http://www.alain-defrance.com&quot;&gt;Alain Defrance&lt;/a&gt;, &lt;a href=&quot;http://glaforge.free.fr/weblog/&quot;&gt;Guillaume Laforge&lt;/a&gt;, &lt;a href=&quot;http://www.ehsavoie.com/&quot;&gt;Emmanuel Hugonnet&lt;/a&gt;, &lt;a href=&quot;http://blog.hgomez.net/&quot;&gt;Henri Gomez&lt;/a&gt;, folks that helped in some kind at some point and of course my company &lt;a href=&quot;http://www.exoplatform.com&quot;&gt;eXo Platform&lt;/a&gt; for letting me spend a significant amount of time at my free will on this great project.&lt;/p&gt;
&lt;p&gt;The release was done last Thursday during the Devoxx France conference where I had the opportunity to &lt;a href=&quot;http://www.devoxx.com/display/FR12/CRaSH+un+shell+pour+etendre+la+plateforme+Java&quot;&gt;present&lt;/a&gt; CRaSH during 15 too short minutes: thank you Devoxx France for believing in CRaSH and giving me the opportunity to demonstrate the interest of the project. I&amp;#8217;m sure that now many people will find an interest in CRaSH because it fill real and growing needs on top the &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt;:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Extend any kind project with a professional Command Line Interface&lt;/li&gt;
	&lt;li&gt;Take control of a &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt; in a couple of seconds and make it transparent&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Although 1.0 is released the project, I have plenty of crazy ideas for CRaSH&amp;#8217;s future although I don&amp;#8217;t have a formal roadmap yet (I never have actually&amp;#8230;), so expect the project to evolve and provide even greater features.&lt;/p&gt;
&lt;p&gt;CRaSH is open source and minded, if you can improve CRaSH with a crazy idea, we are open to your contributed features!&lt;/p&gt;
&lt;p&gt;Last but not least, we have setup of group for CRaSH users, our community is growing fast: don&amp;#8217;t hesitate to &lt;a href=&quot;http://groups.google.com/group/crash-users?hl=fr&quot;&gt;join us&lt;/a&gt;!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH Standalone</title>
   <link href="http://username.github.com/2012/04/13/crash-standalone/"/>
   <updated>2012-04-13T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/04/13/crash-standalone</id>
   <content type="html">&lt;p&gt;I&amp;#8217;m very glad to announce the availability of standalone version of CRaSH. CRaSH standalone is an alternative way to use CRaSH, designed to be usable out of the box from the command line.&lt;/p&gt;
&lt;p&gt;And there is more! A few months ago when I was looking at the jvisualvm source code I found the attach &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;. The attach &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; allows to plug an agent in an existing and running &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt; (that&amp;#8217;s what jvisualvm uses natively) and I thought it would be a great feature for CRaSH. I quickly got a prototype running but it took a while to make it usable out of the box.&lt;/p&gt;
&lt;p&gt;The standalone version comes with the &lt;a href=&quot;http://vietj.github.com/crash/&quot;&gt;1.0.0-cr2&lt;/a&gt; we just released, for this matter I have recorded a screencast to show how easy and powerful CRaSH standalone can be:&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;object width=&quot;284&quot; height=&quot;160&quot;&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;movie&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=40290434&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0&quot; /&gt;&lt;embed src=&quot;http://vimeo.com/moogaloop.swf?clip_id=40290434&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; width=&quot;284&quot; height=&quot;160&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0 CR1</title>
   <link href="http://username.github.com/2012/04/04/crash-1_0-cr-1/"/>
   <updated>2012-04-04T00:00:00-07:00</updated>
   <id>http://username.github.com/2012/04/04/crash-1_0-cr-1</id>
   <content type="html">&lt;p&gt;After a bit more than two years of development CRaSH is about to reach the 1.0 status, the candidate release 1 was just released with a few achievements:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The CRaSH &lt;a href=&quot;http://vietj.github.com/crash/&quot;&gt;website&lt;/a&gt; was launched a few days ago to give a better face to the project&lt;/li&gt;
	&lt;li&gt;Many improvements were done to finish the work (standalone &amp;amp; attach mode, jackrabbit support, etc&amp;#8230;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Last but not least I will give a &lt;a href=&quot;http://www.devoxx.com/display/FR12/CRaSH+un+shell+pour+etendre+la+plateforme+Java&quot;&gt;quickie&lt;/a&gt; at Devoxx France on CRaSH to show what CRaSH is able to do and what it can do for you.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>JSON to Java with JDK6</title>
   <link href="http://username.github.com/2011/12/26/json-to-java-with-jdk6/"/>
   <updated>2011-12-26T00:00:00-08:00</updated>
   <id>http://username.github.com/2011/12/26/json-to-java-with-jdk6</id>
   <content type="html">&lt;p&gt;There are multiple frameworks for transforming a &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; expression to a Java object tree, but the Java Platform does not come out of the box with some &lt;code&gt;javax.json&lt;/code&gt; package (I heard there are plans for that).&lt;/p&gt;
&lt;p&gt;Today I will show that you can easily transform a &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; expression to a simple Java object tree (map, arrays, primitive wrappers and string) with Java 6 and no additional framework.&lt;/p&gt;
&lt;p&gt;Obviously, it may not be the best way to proceed, specially when it comes to speed, security or java mapping. However this solution is appropriate if those are not a concern and you don&amp;#8217;t want to add a dependency to an external library for parsing &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; expressions.&lt;/p&gt;
&lt;p&gt;The solution relies on the &lt;code&gt;javax.script&lt;/code&gt; package and its Javascript binding. Indeed what&amp;#8217;s best than Javascript to parse JavaScript Object Notation ?&lt;/p&gt;
&lt;p&gt;The scripting &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; provides evaluation of any Javascript which is nice, unfortunately native Javascript objects are not usable from Java, but the magic of Javascript will come to the rescue!&lt;/p&gt;
&lt;p&gt;Javascript is a dynamic language which allows to modify its meta object protocol (&lt;span class=&quot;caps&quot;&gt;MOP&lt;/span&gt;) to add new functions on native Javascript objects, through the concept of prototypes. We can modify each of the base Javascript type&amp;#8217;s prototypes to add a &lt;code&gt;toJava&lt;/code&gt; function that will return a Java version of the object:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/1521692.js?file=json2java.js&quot;&gt;&lt;/script&gt;&lt;p&gt;Now you probably get the idea, each &lt;code&gt;toJava&lt;/code&gt; function returns the Java counterpart of the Javascript object. Initially I wanted to iterate the object tree, but extending the types thanks to the prototype is a much better solution.&lt;/p&gt;
&lt;p&gt;We also need to add the missing Java part that loads this JS and uses it to create our Java objects. This is trivial to do thanks to the scripting &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;, here is how to load the Javascript and setup the engine:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/1521692.js?file=setup&quot;&gt;&lt;/script&gt;&lt;p&gt;Now we need to use the engine to convert &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; expressions:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/1521692.js?file=parse&quot;&gt;&lt;/script&gt;&lt;p&gt;Here there is a little trick: you can remark the usage of &lt;code&gt;AtomicReference&lt;/code&gt; and it may look inappropriate since we are not dealing with concurrent programming. The trick is that if we return a &lt;code&gt;String&lt;/code&gt; from the engine to Java, the engine will wrap it as a Javascript string and we want to avoid that. The &lt;code&gt;AtomicReference&lt;/code&gt; makes the value opaque to Javascript and the Java code will unwrap it.&lt;/p&gt;
&lt;p&gt;Those three pieces together makes a lightweight solution to transform &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; expressions to Java objects. There are certainly corner case not handled in this code, but it&amp;#8217;s a solid basis to start with, I saved the code in a GitHub gist &lt;a href=&quot;https://gist.github.com/1521692&quot;&gt;there&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Juzu 0.4.2</title>
   <link href="http://username.github.com/2011/12/12/juzu-042/"/>
   <updated>2011-12-12T00:00:00-08:00</updated>
   <id>http://username.github.com/2011/12/12/juzu-042</id>
   <content type="html">&lt;p&gt;We have been working hard to get this release done with a great set of new features!!!&lt;/p&gt;
&lt;p&gt;First and foremost, I&amp;#8217;m very proud of the level support we have now reached for Eclipse. As you may know, Juzu relies much on Annotation Processing Tools (&lt;span class=&quot;caps&quot;&gt;APT&lt;/span&gt;) since the beginning to bring exclusive features. Making Juzu work with Eclipse incremental compiler was very challenging because &lt;span class=&quot;caps&quot;&gt;APT&lt;/span&gt; simply works differently. Among those features, the type safe template parameters with Eclipse is showed in this screencast&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;&lt;iframe src=&quot;http://player.vimeo.com/video/33370178?title=0&amp;byline=0&amp;portrait=0&quot; width=&quot;284&quot; height=&quot;160&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen align=&quot;center&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;p&gt;The dev mode feature has been improved a lot, specially now the error reporting is more accurate and sexy, this screencast will teach you everything about switching an application to dev mode in Liferay&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;&lt;iframe src=&quot;http://player.vimeo.com/video/33519963?title=0&amp;byline=0&amp;portrait=0&quot; width=&quot;284&quot; height=&quot;160&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;p&gt;Juzu comes as a package to download on this &lt;a href=&quot;https://github.com/juzu/juzu/downloads&quot;&gt;page&lt;/a&gt;. Alternatively you can also use the maven archetype to bootstrap an application&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/1468864.js&quot;&gt; &lt;/script&gt;&lt;p&gt;Finally, the Dependency Injection has been improved in order to allow the injection of external providers, in particular this is useful if you are using Juzu in the GateIn server and you want to inject GateIn services in a Juzu application, this is now trivial to do and is explained in the &lt;a href=&quot;https://github.com/juzu/juzu/wiki/GateInServiceInjection&quot;&gt;wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the future we plan to develop new features and improve step by step the project, on top of my mind the integration with &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=303&quot;&gt;Bean Validation&lt;/a&gt; would be a good thing to do. If you are interested to follow the Juzu project development you can join our &lt;a href=&quot;http://groups.google.com/group/juzu&quot;&gt;Juzu group&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Juzu Web Framework</title>
   <link href="http://username.github.com/2011/10/31/juzu-web-framework/"/>
   <updated>2011-10-31T00:00:00-07:00</updated>
   <id>http://username.github.com/2011/10/31/juzu-web-framework</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/juzu/juzu&quot;&gt;Juzu&lt;/a&gt;&lt;/strong&gt; is an open source web framework I started to work on recently, for several reasons, the most important one is that there is no decent framework for developing portlet application in a &lt;em&gt;simple&lt;/em&gt; &lt;strong&gt;and&lt;/strong&gt; &lt;em&gt;productive&lt;/em&gt; manner. There are other good and valid reasons.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/juzu/juzu&quot;&gt;Juzu&lt;/a&gt;&lt;/strong&gt; deploys on the GateIn Portal and on the Liferay Portal. Perhaps it also deploys on other portals, there aren&amp;#8217;t any good reason why Juzu would not work on other portal (except bugs).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/juzu/juzu&quot;&gt;Juzu&lt;/a&gt;&lt;/strong&gt; integrates with dependency injection frameworks such as &lt;a href=&quot;http://www.google.fr/url?sa=t&amp;rct=j&amp;q=jboss%20weld&amp;source=web&amp;cd=1&amp;ved=0CCAQFjAA&amp;url=http%3A%2F%2Fseamframework.org%2FWeld&amp;ei=IciuTvmQJsaAOrCIrNMP&amp;usg=AFQjCNEQoFkEjcTyI6SqdVfeGyzU45hBcw&quot;&gt;Weld&lt;/a&gt; (&lt;span class=&quot;caps&quot;&gt;CDI&lt;/span&gt;) and &lt;a href=&quot;http://www.springsource.org/&quot;&gt;Spring&lt;/a&gt;, theoretically it should work with any injection framework providing a good support of the &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=330&quot;&gt;&lt;span class=&quot;caps&quot;&gt;JSR&lt;/span&gt;-330&lt;/a&gt; specification (however it requires some custom integration work, as &lt;span class=&quot;caps&quot;&gt;JSR&lt;/span&gt;-330 is really lightweight&amp;#8230;)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/juzu/juzu&quot;&gt;Juzu&lt;/a&gt;&lt;/strong&gt; is a &lt;em&gt;work in progress&lt;/em&gt;, however it is advanced enough to deliver the infamous Booking application.&lt;/p&gt;
&lt;p&gt;If you are interested in &lt;a href=&quot;https://github.com/juzu/juzu&quot;&gt;Juzu&lt;/a&gt; (using or helping), you can start to read this &lt;a href=&quot;https://github.com/juzu/juzu/blob/master/README.md&quot;&gt;page&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH gets an installer!</title>
   <link href="http://username.github.com/2011/08/16/crash-gets-an-installer/"/>
   <updated>2011-08-16T00:00:00-07:00</updated>
   <id>http://username.github.com/2011/08/16/crash-gets-an-installer</id>
   <content type="html">&lt;p&gt;CRaSH 1.0.0-beta22 release features an &lt;a href=&quot;http://izpack.org/&quot;&gt;IZPack&lt;/a&gt; installer that will let you configure a CRaSH runtime throughout a serie of screens, here is a short video showing an installation:&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;iframe src=&quot;http://player.vimeo.com/video/27783926?title=0&amp;byline=0&amp;portrait=0&quot; width=&quot;400&quot; height=&quot;225&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;You can download them from the usual &lt;a href=&quot;http://code.google.com/p/crsh/downloads/list&quot;&gt;page&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>GateIn 3.2 M1</title>
   <link href="http://username.github.com/2011/06/27/gatein-32-m1/"/>
   <updated>2011-06-27T00:00:00-07:00</updated>
   <id>http://username.github.com/2011/06/27/gatein-32-m1</id>
   <content type="html">&lt;p&gt;We released last week the first milestone of GateIn 3.2, it was a long time since the 3.1 release and both Red Hat and eXo teams were quite busy working on the product and project side of GateIn.&lt;/p&gt;
&lt;p&gt;Among the noticeable changes, you will find now a support for Jetty 6.1/Tomcat 7/JBoss AS 6 web containers, a improved Maven build compatible with Maven 3, a few UI improvements and many bug fixes. You can read more about it &lt;a href=&quot;http://www.dzone.com/links/gatein_32_m1_reached.html&quot;&gt;there&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m proud now to work with Bolek that will replace Thomas Heute as GateIn technical lead. Bolek was involved in the effort since the JBoss Portal projects and earned his credits by providing an Hibernate implementation of the now dead Slide project (&lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; ancestor) and implementing much of the Portlet 1 &lt;span class=&quot;caps&quot;&gt;TCK&lt;/span&gt; assertions in our testsuite (that proved to be invaluable when &lt;span class=&quot;caps&quot;&gt;JSR&lt;/span&gt; 286 was implemented). He blogged about his new role in the project &lt;a href=&quot;http://community.jboss.org/en/gatein/blog/2011/06/23/new-blog-new-project-lead-and-new-release&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you are a fan of GateIn, the &lt;a href=&quot;http://crsh.googlecode.com/&quot;&gt;CRaSH&lt;/a&gt; shell is a must have companion for GateIn. CRaSH is a shell that provides a &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; access and allows to do stuff and hack GateIn. Use it at your own risks of course ;-) . Download of the latest beta-21 is &lt;a href=&quot;http://code.google.com/p/crsh/downloads/list&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally it&amp;#8217;s time of a few words about GateIn &lt;a href=&quot;https://github.com/exoplatform/gatein-stuff&quot;&gt;stuff&lt;/a&gt; that is another GateIn companion I started a few months ago on GitHub. It&amp;#8217;s something more informal than a real project, it&amp;#8217;s like a bunch of stuff that could be useful if you&amp;#8217;re a GateIn user, at least it&amp;#8217;s useful to me, it contains so far:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;a &lt;a href=&quot;https://github.com/exoplatform/gatein-stuff/tree/master/CRaSH&quot;&gt;CRaSH&lt;/a&gt; folder with command for adding users to GateIn&lt;/li&gt;
	&lt;li style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://github.com/exoplatform/gatein-stuff/tree/master/gen&quot;&gt;gen&lt;/a&gt; : an &lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt; generator for generating large navigations&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/exoplatform/gatein-stuff/tree/master/sqlman&quot;&gt;sqlman&lt;/a&gt; : a tool based on the great JBoss Byteman project that measures the access to resources, very valuable for monitoring database activity. Note that this tool is generic and does not depend on GateIn itself. We could extract it and find a better name (containing &amp;#8220;spy&amp;#8221;)&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Yet another CRaSH beta (21)</title>
   <link href="http://username.github.com/2011/06/08/yet-another-crash-beta-21/"/>
   <updated>2011-06-08T00:00:00-07:00</updated>
   <id>http://username.github.com/2011/06/08/yet-another-crash-beta-21</id>
   <content type="html">&lt;p&gt;Nothing fancy, in it, mostly bug fixes (in particular for &lt;span class=&quot;caps&quot;&gt;SCP&lt;/span&gt; &lt;a href=&quot;https://jira.exoplatform.org/browse/CRASH-23&quot;&gt;&lt;span class=&quot;caps&quot;&gt;CRASH&lt;/span&gt;-23&lt;/a&gt; and &lt;a href=&quot;https://jira.exoplatform.org/browse/CRASH-24&quot;&gt;&lt;span class=&quot;caps&quot;&gt;CRASH&lt;/span&gt;-24&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;I updated also the Google Code page to add links to GitHub where the project is now hosted and the online docs now have the &lt;a href=&quot;http://crsh.googlecode.com/svn/doc/pdf.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;PDF&lt;/span&gt;&lt;/a&gt; and the &lt;a href=&quot;http://crsh.googlecode.com/svn/doc/javadoc.html&quot;&gt;Javadoc&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally the project CI is now Jenkins hosted by my friends at &lt;a href=&quot;https://vietj.ci.cloudbees.com/job/CRaSH/&quot;&gt;Cloudbees&lt;/a&gt;. A special thanks to &lt;a href=&quot;http://blog.aheritier.net/&quot;&gt;Arnaud&lt;/a&gt; for helping me setting this up.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://code.google.com/p/crsh/downloads/detail?name=crsh-1.0.0-beta21.tar.gz&amp;can=2&amp;q=&quot;&gt;release&lt;/a&gt; is available on Google Code as usual.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH update</title>
   <link href="http://username.github.com/2011/04/29/crash-update/"/>
   <updated>2011-04-29T00:00:00-07:00</updated>
   <id>http://username.github.com/2011/04/29/crash-update</id>
   <content type="html">&lt;p&gt;A long time since I haven&amp;#8217;t blogged and released a CRaSH version (beta15), here are the the new stuff in CRaSH since the beta15 release.&lt;/p&gt;
&lt;p&gt;First and foremost, the beta 20 was just released, so &lt;a href=&quot;http://code.google.com/p/crsh/downloads/detail?name=crsh-1.0.0-beta20.tar.gz&quot;&gt;grab it&lt;/a&gt;, it&amp;#8217;s very hot!&lt;/p&gt;
&lt;p&gt;One of the most important feature is a new set of annotations for writing commands, that provides *contextual completion*! I think it was one of the most awaited CRaSH feature and now it is there, allowing for instance &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; path auto completion, but it works also based on the context and is able to provide completion for various part of the command line:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;command&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&amp;quot;sy&amp;quot;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;system&amp;quot;&lt;/span&gt;
option names: &lt;span class=&quot;s2&quot;&gt;&amp;quot;--fo&amp;quot;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;--force&amp;quot;&lt;/span&gt;
enumerated values: &lt;span class=&quot;s2&quot;&gt;&amp;quot;deb&amp;quot;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;debug&amp;quot;&lt;/span&gt;
custom handlers, &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;instance JCR path: &lt;span class=&quot;s2&quot;&gt;&amp;quot;/fo&amp;quot;&lt;/span&gt; -&amp;gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/foo&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Sub command&lt;/strong&gt; is another neat new feature that allows to group several commands inside the same class, inspired from git:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;log ls: list all loggers
log send: send a message to a logger
etc...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here is an overview of how now CRaSh commands are written&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/948608.js?file=gistfile1.groovy&quot;&gt;&lt;/script&gt;&lt;p&gt;New documentation system to provide &lt;strong&gt;usage&lt;/strong&gt; and &lt;strong&gt;man&lt;/strong&gt; for a command, further more now the command reference is included in the documentation&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/wp-content/uploads/2011/04/screen-shot-2011-04-29-at-62903-pm1.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-234&quot; title=&quot;Man&quot; src=&quot;/wp-content/uploads/2011/04/screen-shot-2011-04-29-at-62903-pm1.png&quot; alt=&quot;&quot; width=&quot;500&quot; height=&quot;170&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A few new based commands were addeddd&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;log: hot configure or send message to the logging system&lt;/li&gt;
	&lt;li&gt;jdbc: an out of the box &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; console for &lt;span class=&quot;caps&quot;&gt;JNDI&lt;/span&gt; based datasources&lt;/li&gt;
	&lt;li&gt;system: interact with the VM properties&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally we relocated &lt;a href=&quot;https://github.com/vietj/crash&quot;&gt;CRaSH code on GitHub&lt;/a&gt;, the project page remains for now on Google Code along with the hosted documentation and downloads. It will allow to better follow the project status and contribute.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Uploading a file on Cloudreader iPad application from shell</title>
   <link href="http://username.github.com/2010/11/22/uploading-a-file-on-cloudreader-ipad-application-from-shell/"/>
   <updated>2010-11-22T00:00:00-08:00</updated>
   <id>http://username.github.com/2010/11/22/uploading-a-file-on-cloudreader-ipad-application-from-shell</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve discovered the great &lt;a href=&quot;http://itunes.apple.com/fr/app/cloudreaders-pdf-cbz-cbr/id363484920?mt=8&quot;&gt;Cloudreader&lt;/a&gt; application for iPad. Since I don&amp;#8217;t have my books on the same computer than synchronize with my iPad, I&amp;#8217;ve been using Cloudreader builtin capabilities for uploading my books. Unfortunately the web interface is rather poor and each file needs to be added separately.&lt;/p&gt;
&lt;p&gt;So I went to write a shell script based on the curl command to perform a bulk upload to the Cloudreader server and I wanted to share it with other, here is the script:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;#Usage&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$# &lt;/span&gt;-lt 2 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Usage: $0 server_adress file1 ... fileN&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;#Save server and shift&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;UPLOAD_SERVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;shift&lt;/span&gt;;

&lt;span class=&quot;c&quot;&gt;#Upload each file&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;((&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;$#&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; ! -f &lt;span class=&quot;s2&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;The file $1 does not exist&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Uploading $1 on $UPLOAD_SERVER&amp;quot;&lt;/span&gt;
curl --form &lt;span class=&quot;nv&quot;&gt;datafile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;@&lt;span class=&quot;s2&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; --form &lt;span class=&quot;nv&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; --form &lt;span class=&quot;nv&quot;&gt;author&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; http://&lt;span class=&quot;nv&quot;&gt;$UPLOAD_SERVER&lt;/span&gt;/post &amp;gt;/dev/null
&lt;span class=&quot;nb&quot;&gt;shift&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH beta gets flexible command composition</title>
   <link href="http://username.github.com/2010/11/09/crash-beta-gets-flexible-command-composition/"/>
   <updated>2010-11-09T00:00:00-08:00</updated>
   <id>http://username.github.com/2010/11/09/crash-beta-gets-flexible-command-composition</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://crsh.googlecode.com/files/crsh-1.0.0-beta15.tar.gz&quot;&gt;CRaSH 1.0.0-beta15&lt;/a&gt; is just fresh out of the mill and gets an important new feature inspired from shell pipes.&lt;/p&gt;
&lt;p&gt;We have added the capability to compose commands through the pipe (|) and the distribution (+) operators (if you find a more appropriate name, don&amp;#8217;t hesitate to tell me).&lt;/p&gt;
&lt;p&gt;I won&amp;#8217;t detail the whole thing but instead give a few explanations, the whole thing is described in the &lt;a href=&quot;http://crsh.googlecode.com/svn/doc/1.0.0-beta15/html/index.html#d0e105&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Each command is able to consume and produce a stream of node and this capability is described by a Java generic like notation : &amp;lt;C,P&amp;gt; with &lt;C&gt; for consumed and &lt;P&gt; for produced. By default a command that does not specify anything is considered as &amp;lt;Void,Void&amp;gt;, i.e it does not consume and produce anything.&lt;/p&gt;
&lt;p&gt;The pipe operator (|) allows to take the stream produced by a command and pipe it to a command that will consume it (&amp;lt;Void, X&amp;gt; | &amp;lt;X, Void&amp;gt;).&lt;/p&gt;
&lt;p&gt;The distribution operator (+) is useful with the pipe operator and it allows to distribute a stream to two commands (&amp;lt;Void, X&amp;gt; | &amp;lt;X, Void&amp;gt; + &amp;lt;X, Void&amp;gt;) or to take the output stream of two commands and combine it in a single output stream (&amp;lt;Void, X&amp;gt; + &amp;lt;Void, X&amp;gt; | &amp;lt;X, Void&amp;gt;).&lt;/p&gt;
&lt;p&gt;So after the nice theory, let&amp;#8217;s see a few examples:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;// delete all nt:file nodes
&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; * from nt:file | rm

// add the &lt;span class=&quot;nb&quot;&gt;read &lt;/span&gt;permission to anyone on all nt:file or nt:resource nodes
&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; * from nt:file + &lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; * from nt:resource | setperm -i any -a &lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt;

// change the mime &lt;span class=&quot;nb&quot;&gt;type &lt;/span&gt;and encoding of all nt:resource nodes
&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; * from nt:resource | &lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; jcr:mimeType text/html + &lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; jcr:encoding UTF-8
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In addition of this very nice feature, the war file packaging has been reworked to include less jar than before, those that were already bundled by the server runtime.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0.0-beta12 released</title>
   <link href="http://username.github.com/2010/10/06/crash-100-beta12-released/"/>
   <updated>2010-10-06T00:00:00-07:00</updated>
   <id>http://username.github.com/2010/10/06/crash-100-beta12-released</id>
   <content type="html">&lt;p&gt;We just release the &lt;a href=&quot;http://crsh.googlecode.com/files/crsh-1.0.0-beta12.tar.gz&quot;&gt;1.0.0-beta12&lt;/a&gt; of CRaSH that add two new commands:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The addnode command adds one or several &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; nodes&lt;/li&gt;
	&lt;li&gt;The setperm command provides security configuration of &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; nodes&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The rm command has also be improved and provides the capability to remove several nodes at the same time.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Aptvir the Java Compiler virus</title>
   <link href="http://username.github.com/2010/10/04/aptvir-the-java-compiler-virus/"/>
   <updated>2010-10-04T00:00:00-07:00</updated>
   <id>http://username.github.com/2010/10/04/aptvir-the-java-compiler-virus</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve been using Annotation Processing Tools (&lt;span class=&quot;caps&quot;&gt;APT&lt;/span&gt;) for a few months now, and I like it. It opens new capabilities for the Java platform, I exploited them to create an &lt;span class=&quot;caps&quot;&gt;APT&lt;/span&gt; virus, called APTVir.&lt;/p&gt;
&lt;p&gt;APTVir is a single class and a single file that replicate when it is available on the classpath n the compiled code. It relies on &lt;span class=&quot;caps&quot;&gt;APT&lt;/span&gt; to execute itself and copy itself in the output produced by the compiler.&lt;/p&gt;
&lt;p&gt;Instead of long explanations, I created a &lt;a href=&quot;http://www.youtube.com/watch?v=JPlX8zneFuw&quot;&gt;screencast&lt;/a&gt; that explains it :-) and the code is available as a GitHub &lt;a href=&quot;http://github.com/vietj/aptvir&quot;&gt;repository&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Configuring easily a database for a JBoss AS cluster</title>
   <link href="http://username.github.com/2010/09/08/configuring-easily-a-database-for-a-jboss-as-cluster/"/>
   <updated>2010-09-08T00:00:00-07:00</updated>
   <id>http://username.github.com/2010/09/08/configuring-easily-a-database-for-a-jboss-as-cluster</id>
   <content type="html">&lt;p&gt;In GateIn project we sometime have to deal with the setup of a JBoss cluster. While JBoss clustering is quite easy to configure there are things you need to configure such as a shared database. In addition when doing tests you need to start from a fresh database. I will give you a tip I&amp;#8217;m using when I&amp;#8217;m setting up a GateIn cluster that can help you to save time for setting up a database.&lt;/p&gt;
&lt;p&gt;By default GateIn uses the famous embedded database &lt;span class=&quot;caps&quot;&gt;HSQLDB&lt;/span&gt; and it is very convenient because&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Deployed with GateIn, no need for extra setup&lt;/li&gt;
	&lt;li&gt;Sufficient for doing development&lt;/li&gt;
	&lt;li&gt;Fast&lt;/li&gt;
	&lt;li&gt;Easy to erase the database and start from fresh&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When dealing with a GateIn cluster (or any other application that requires a database), ultimately you need a database that will be used by the cluster nodes. Does it mean I have to give up &lt;span class=&quot;caps&quot;&gt;HSQLSDB&lt;/span&gt;? the answer is no with an extra configuration step.&lt;/p&gt;
&lt;p&gt;By default &lt;span class=&quot;caps&quot;&gt;HSQLDB&lt;/span&gt; comes as an in process database, but it is possible to use other configuration modes:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Make the database open a port to accept remote connection&lt;/li&gt;
	&lt;li&gt;Connect to a remote database&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We can use those two setup an asymmetric configuration of two nodes. The first node &lt;a href=&quot;http://cooper.free.fr/ports-01-ds.xml&quot;&gt;datasource&lt;/a&gt; owns the database and the second node &lt;a href=&quot;http://cooper.free.fr/ports-01-ds.xml&quot;&gt;datasource&lt;/a&gt; uses the database setup by the first node remotely.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0.0-beta10 release</title>
   <link href="http://username.github.com/2010/08/23/crash-100-beta10-release/"/>
   <updated>2010-08-23T00:00:00-07:00</updated>
   <id>http://username.github.com/2010/08/23/crash-100-beta10-release</id>
   <content type="html">&lt;p&gt;CRaSh &lt;a href=&quot;http://crsh.googlecode.com/files/crsh-1.0.0-beta10.tar.gz&quot;&gt;1.0.0-beta10&lt;/a&gt; supports now line edition and cursor navigation for the telnet connector as its first contribution!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0.0-beta9 release</title>
   <link href="http://username.github.com/2010/07/08/crash-100-beta9-release/"/>
   <updated>2010-07-08T00:00:00-07:00</updated>
   <id>http://username.github.com/2010/07/08/crash-100-beta9-release</id>
   <content type="html">&lt;p&gt;CRaSh &lt;a href=&quot;http://code.google.com/p/crsh/downloads/detail?name=crsh-1.0.0-beta9.tar.gz&amp;can=2&amp;q=&quot;&gt;1.0.0-beta9&lt;/a&gt; minor feature and fix a few issues with GateIn 3.1:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;export/import uses now the &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; username and password for accessing &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; for GateIn 3.1&lt;/li&gt;
	&lt;li&gt;connect now always require a password for GateIn 3.1&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://crsh.googlecode.com/svn/doc/1.0.0-beta9/index.pdf&quot;&gt;documentation&lt;/a&gt; now has a front cover page&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;enjoy!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Reflext improves its annotation introspection</title>
   <link href="http://username.github.com/2010/06/03/reflext-improves-its-annotation-introspection/"/>
   <updated>2010-06-03T00:00:00-07:00</updated>
   <id>http://username.github.com/2010/06/03/reflext-improves-its-annotation-introspection</id>
   <content type="html">&lt;p&gt;So far the annotation &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; in Reflext was using the runtime &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; to provide annotation access. What I call the runtime &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; is what most of developers are used to when dealing with annotations.&lt;/p&gt;
&lt;p&gt;When using the java.lang.reflect runtime, this works perfectly as the runtime provides obviously runtime annotation. Nothing special here. However at compile time, this runtime access is emulated by the compiler. The real &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; to access an annotation is the java.lang.model.element.AnnotationMirror interface that is a totally detyped access to an annotation. But the &lt;span class=&quot;caps&quot;&gt;APT&lt;/span&gt; tries to be nice and provides an emulation of runtime annotation that works well until&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the introspected annotation is being compiled and it is not yet available under its class form&lt;/li&gt;
	&lt;li&gt;the annotation is already compiled (coming likely from &lt;span class=&quot;caps&quot;&gt;JDK&lt;/span&gt; or a dependency) but it has a Class parameter and that class is being compiled. In that situation the Class object is not yet available, consequently it fails.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For that matter there is now in Reflext an &lt;a href=&quot;http://reflext.googlecode.com/svn/trunk/api/src/main/java/org/reflext/api/annotation/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;&lt;/a&gt; that provides a detyped access to an annotation that works equally with runtime and compile time implementations (runtime annotation access is still possible of course) .Using such &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; is obviously less intuitive than using the annotation directly but when you don&amp;#8217;t have the guarantee that you are the annotation type is already compiled it&amp;#8217;s the only way to go.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0.0 Beta 8 released</title>
   <link href="http://username.github.com/2010/05/27/crash-100-beta-8-released/"/>
   <updated>2010-05-27T00:00:00-07:00</updated>
   <id>http://username.github.com/2010/05/27/crash-100-beta-8-released</id>
   <content type="html">&lt;p&gt;We have just released &lt;a href=&quot;http://code.google.com/p/crsh/downloads/list&quot;&gt;CRaSH 1.0.0 Beta 8&lt;/a&gt; on Google Code forge, in that release we have worked on two usability aspects of the shell:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The capability for a command to prompt a value with or without echo of the value entered by the user. It is mainly used by the connect command to prompt the password when it is not entered via the -p option.&lt;/li&gt;
	&lt;li&gt;The second feature is the up/down arrow associated to recalling previously entered commands.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The prompt command implementation required a refactor of the CRaSH architecture, the main challenge coming from the following facts:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the shell is invoked by a term and the term has blocking IO&lt;/li&gt;
	&lt;li&gt;the execution of a command needs to be interruptible&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The refactoring was quite fun to do, and lead to a few improvements in the architecture that consisted mostly in decoupling the various systems, now we can distinguish:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The Shell that executes the commands and returns a result. The current implementation is connected to &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; to execute Groovy commands.&lt;/li&gt;
	&lt;li&gt;The Shell Connector, a state machine executing commands in a synchronous or asynchronous manner, it depends on its configuration. The execution of a command can be cancelled.&lt;/li&gt;
	&lt;li&gt;The Term: a state machine that translates IO into actions, managing also the command history.&lt;/li&gt;
	&lt;li&gt;The TermIO: the input/output of the Term, that is implemented using &lt;a href=&quot;http://mina.apache.org/sshd/&quot;&gt;Apache &lt;span class=&quot;caps&quot;&gt;SSHD&lt;/span&gt;&lt;/a&gt; and &lt;a href=&quot;http://code.google.com/p/telnetd-x/&quot;&gt;Wimpi TelnetD&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At the moment I am quite satisfied by the current features. I think it is still missing the command completion and I don&amp;#8217;t have a clue if it is easy or complex to do and which system should manage it, I&amp;#8217;ll leave it for later fun. Maybe it will be easy to do, or it could require some new important refactor to make it possible to happen, who knows?&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0.0-beta3 release</title>
   <link href="http://username.github.com/2010/02/16/crash-100-beta3-release/"/>
   <updated>2010-02-16T00:00:00-08:00</updated>
   <id>http://username.github.com/2010/02/16/crash-100-beta3-release</id>
   <content type="html">&lt;p&gt;Just released the 1.0.0-beta3 release of CRaSH, you can get it &lt;a href=&quot;http://code.google.com/p/crsh/downloads/detail?name=crsh-1.0.0-beta3.tar.gz&amp;can=2&amp;q=#makechanges&quot;&gt;there&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The first and foremost new features in that release are contributed by &lt;a href=&quot;http://twitter.com/plamarque&quot;&gt;Patrice Lamarque&lt;/a&gt; that gave us very important commands such as cp to copy a &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; node, mv to move a &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; node and xpath to perform an xpath query in a similar way you can perform a &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; query.&lt;/p&gt;
&lt;p&gt;Beside that, the pwd command was bugged in beta2 and is fixed in beta3.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Chromattic support for embedded types</title>
   <link href="http://username.github.com/2010/02/08/chromattic-support-for-embedded-types/"/>
   <updated>2010-02-08T00:00:00-08:00</updated>
   <id>http://username.github.com/2010/02/08/chromattic-support-for-embedded-types</id>
   <content type="html">&lt;p&gt;The embbeded type support for Chromattic brings much power to object modeling on top of Java Content Repository that allows to fully take advantage of how &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; models node types. &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; type model provides two features that don&amp;#8217;t match the Java type mode.&lt;/p&gt;
&lt;p&gt;The first feature is multiple inheritance that is supported natively by &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; which allows a type to extend several super types. The other feature is the mixin support which is pretty much similar to multiple inheritance except that it can be dynamic, meaning that a node can be assigned with a mixin type. Conversely a mixin type can be removed from a node.&lt;/p&gt;
&lt;p&gt;Both features are difficult with classic Java inheritance and the most appropriate way for modeling those is to leverage &lt;strong&gt;object delegation&lt;/strong&gt;. Actually often object delegation is preferable over inheritance as it decouples the object types and provides support for dynamicity.&lt;/p&gt;
&lt;h2&gt;Mixin type support&lt;/h2&gt;
&lt;p&gt;The following example is taken from GateIn and it shows how several java type can support templatization with the embedded support. The Templatized class is a delegate object that provides a relationship to a Template type.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@MixinType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;templatized&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Templatized&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

  &lt;span class=&quot;nd&quot;&gt;@OneToMany&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RelationshipType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nd&quot;&gt;@MappedBy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;template&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Template&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getTemplate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setTemplate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Template&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The Page class has an embedded relationship with a Templatized type.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@PrimaryType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;page&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Page&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// Returns null if the mixin is not present&lt;/span&gt;
  &lt;span class=&quot;nd&quot;&gt;@OneToOne&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RelationshipType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;EMBEDDED&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Templatized&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getTemplatized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// Controls the life cycle of the mixin&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setTemplatized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Templatized&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;templatized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At runtime this would likely be used in the following manner:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;Page&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;page&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;findByPath&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Page&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;page&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Templatized&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;templatized&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Templatized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setTemplatized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;templatized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Template&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;template&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;findByPath&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;template&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;templatized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setTemplate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2&gt;Primary type support&lt;/h2&gt;
&lt;p&gt;Likewise Chromattic supports primary type, the only difference is that the dynamicity aspect does not occur therefore the relationship always exists between the types and it is obviously not possible to destroy it. This feature provides to my opinion a very good alternative for reusability.&lt;/p&gt;
&lt;h2&gt;Supports in GateIn&lt;/h2&gt;
&lt;p&gt;The embedded type feature has been added for GateIn in order to allow the Model Object for Portal (&lt;span class=&quot;caps&quot;&gt;MOP&lt;/span&gt;). Indeed the model itself does not care about certain aspects and the portal needs to be able to make the base model richer than it is. With the embedded type we have the opportunity to keep the base model simple and have GateIn add its own mixins such as security, templatization, etc&amp;#8230; Likewise eXo &lt;span class=&quot;caps&quot;&gt;WCM&lt;/span&gt; that is built on top of GateIn will be able to add its own mixins for the purpose of web content management.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0.0 Beta 2 release</title>
   <link href="http://username.github.com/2010/01/08/crash-100-beta-2-release/"/>
   <updated>2010-01-08T00:00:00-08:00</updated>
   <id>http://username.github.com/2010/01/08/crash-100-beta-2-release</id>
   <content type="html">&lt;p&gt;The CRaSH 1.0.0 Beta 2 has been released, you can download it &lt;a href=&quot;http://crsh.googlecode.com/files/crsh-1.0.0-beta2.tar.gz&quot;&gt;there&lt;/a&gt; and the &lt;a href=&quot;http://code.google.com/p/crsh/wiki/Documentation&quot;&gt;documentation&lt;/a&gt; has been updated with the new features.&lt;/p&gt;
&lt;p&gt;The most important feature brought by that release is the brand new support for &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; thanks to the Apache &lt;span class=&quot;caps&quot;&gt;SSHD&lt;/span&gt; project. &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; access is more suitable for remote access on public networks and &lt;span class=&quot;caps&quot;&gt;SCP&lt;/span&gt; can be used to import or export content from the repository.&lt;/p&gt;
&lt;p&gt;Configuration is now possible via the web.xml file and the following can be configured:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; username, password, port and key file&lt;/li&gt;&lt;br /&gt;
	&lt;li&gt;Telnet port&lt;/li&gt;&lt;/p&gt;
&lt;/ul&gt;
&lt;p&gt;Finally good work has been made on the release process by creating an archive containing the shell war file, the project sources and the javadocs.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Self-bounding Visitor</title>
   <link href="http://username.github.com/2010/01/05/self-bounding-visitor/"/>
   <updated>2010-01-05T00:00:00-08:00</updated>
   <id>http://username.github.com/2010/01/05/self-bounding-visitor</id>
   <content type="html">&lt;p&gt;I came across the generics self-bounding pattern, thanks to &lt;a href=&quot;http://thecodersbreakfast.net/index.php?post/2009/12/17/Des-interfaces-fluides-extensibles-avec-les-Self-Bounded-Generics&quot;&gt;Olivier&amp;#8217;s blog&lt;/a&gt; [in french] that uses it to describe fluent extensible interfaces. After a bit of research I found a very interesting &lt;a href=&quot;http://www.artima.com/forums/flat.jsp?forum=106&amp;thread=136394&quot;&gt;forum thread&lt;/a&gt; that was talking about that pattern more in depth, in particular how it is possible to extend the pattern to a couple of classes.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s just start with a simple example, a binary tree class:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;E&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;E&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;FooNode&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FooNode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;BarNode&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FooNode&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;JuuNode&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Node&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;JuuNode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With that design, we constraint the Node class to be subclasses and have its children to be a subclass of its own subclass, and now we can write:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;FooNode&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FooNode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FooNode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;right&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BarNode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But that is not possible:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;FooNode&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FooNode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;JuuNode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you have carefully read the forum thread, someone posted an interesting extension of the pattern that uses two classes.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://reflext.googlecode.com/&quot;&gt;Reflext framework&lt;/a&gt; I started to write a few months ago was using a visitor pattern to visit  a set of types. There are several ways to visit a set of types, one of them is to visit the class hierarchy of super classes and implemented interfaces. There are many ways to implement the visitor pattern, one of them relies on decoupling the visitor from the code (or strategy) that takes care of doing the visit. The main interest is to reuse the visiting strategy many times and avoid the visitor to care about how visit is done, the visitor only cares about the overall strategy.&lt;/p&gt;
&lt;p&gt;Based on this assumption, we can define two interfaces named Visitor and VisitorStrategy that will vary together, as it makes sense to use a hierarchy visitor with the hierarchy visitor strategy. Let&amp;#8217;s start with the base interfaces. We use it a Type object as visited object, in the reflext framework it&amp;#8217;s a TypeInfo interface that represents a type (which can be either runtime reflection or &lt;span class=&quot;caps&quot;&gt;APT&lt;/span&gt; compile time reflection).&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Visitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Visitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Strategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// The interface is empty as the base visitor does not provide an API&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Strategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Visitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Strategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;visit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;V&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;visitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we can define the hierarchy visitor and its strategy&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;HierarchyVisitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyVisitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;Visitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// The API for hierarchy visit&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;enter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;leave&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;HierarchyStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyVisitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;Strategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;visit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;visitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// We only accept type which are java classes&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;instanceof&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;accept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Visitor callback&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;enter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Now visit the super class if we have one&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clazz&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;superClazz&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clazz&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getSuperClass&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;superClazz&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;visit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;superClazz&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;visitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// And now visit the interfaces&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;itf&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clazz&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getInterfaces&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;visit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;itf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Visitor callback&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;leave&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  
  &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;accept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We can see that the hierarchy visitor and its strategy vary together because they are constrained by design. The last piece missing is the to make vary the strategy (otherwise we would make the visitor and its strategy the same class&amp;#8230;). We do it via an enum that provides several strategies&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;enum&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyScope&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;ALL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;err&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyVisitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;accept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;},&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;ANCESTORS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;err&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyVisitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;VisitorStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;accept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;instanceof&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;isInterface&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;};&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyVisitor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HierarchyStrategy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Et voilà, now we can use safely the visitor. I&amp;#8217;m not convinced that is a great piece of software, I&amp;#8217;m just sure that it was very fun to write and research. Without the mentioned blogs and my favorite &lt;span class=&quot;caps&quot;&gt;IDE&lt;/span&gt; (Intellij &lt;span class=&quot;caps&quot;&gt;IDEA&lt;/span&gt;) it would have been nearly impossible to write correctly :-).&lt;/p&gt;
&lt;p&gt;Self-bounding generics is a curious beast, it&amp;#8217;s even called &lt;a href=&quot;http://www.acooke.org/cute/ThatRecurs0.html&quot;&gt;there&lt;/a&gt; &amp;#8220;That Recursive Java Generics Thing&amp;#8221;. Have fun!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>GateIn management</title>
   <link href="http://username.github.com/2009/12/30/gatein-management/"/>
   <updated>2009-12-30T00:00:00-08:00</updated>
   <id>http://username.github.com/2009/12/30/gatein-management</id>
   <content type="html">&lt;p&gt;At the beginning of the year I started to write management capabilities in eXo Portal. It already had some management features but it was not really in a usable shape, it was indeed exposing every service of the kernel on the &lt;span class=&quot;caps&quot;&gt;JMX&lt;/span&gt; registry, which was very confusing because it was exposing too much information and not the right information, it was just not usable.&lt;/p&gt;
&lt;p&gt;Usability is word that matter, even in management, so my idea was, let&amp;#8217;s expose management in a usable way. So I went on designing a way to expose management information based on Java annotations (well it&amp;#8217;s pretty obvious to do that isn&amp;#8217;t it?).&lt;/p&gt;
&lt;p&gt;An important point was also to not tie the management to &lt;span class=&quot;caps&quot;&gt;JMX&lt;/span&gt;. Indeed even if &lt;span class=&quot;caps&quot;&gt;JMX&lt;/span&gt; is the kind of standard for exposing management in Java, I wanted to be able to expose the same management interface using Rest. The idea is to leverage the gadget server of GateIn and provide management information to gadgets.&lt;/p&gt;
&lt;p&gt;So I went on designing the management contract (Java 5 annotations) that are agnostic of the management layer. Of course this is not enough for exposing the management in &lt;span class=&quot;caps&quot;&gt;JMX&lt;/span&gt; nor in Rest. So we do have custom &lt;span class=&quot;caps&quot;&gt;JMX&lt;/span&gt; annotations that describe how a management interface should be exposed in the &lt;span class=&quot;caps&quot;&gt;JMX&lt;/span&gt; registry.&lt;/p&gt;
&lt;p&gt;Here is an example of a managed service:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@Managed&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@NameTemplate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;@Property&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;service&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;cache&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@Property&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;{Name}&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)})&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@ManagedDescription&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;The Cache&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Cache&lt;/span&gt;

   &lt;span class=&quot;nd&quot;&gt;@Managed&lt;/span&gt;
   &lt;span class=&quot;nd&quot;&gt;@ManagedName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;nd&quot;&gt;@ManagedDescription&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;The cache name&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

   &lt;span class=&quot;nd&quot;&gt;@Managed&lt;/span&gt;
   &lt;span class=&quot;nd&quot;&gt;@ManagedDescription&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Evict all entries of the cache&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;clearCache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

   &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The @Managed, @ManagedName and @ManagedDescription are the agnostic annotations. The @NameTemplate is an annotation that has only a sense for the &lt;span class=&quot;caps&quot;&gt;JMX&lt;/span&gt; layer. The @Managed* annotations really focus on giving a clear and non programmatic description of the management interface.&lt;/p&gt;
&lt;p&gt;There a few more features in the framework such an @ManagedBy annotation to specify a delegate for management interface to avoid to clutter the service with management, a ManagementAware interface for programmatically registering new managed object, a management context facility for correctly scoping managed resources (so several instances of the same service can be registered several times with different names in a transparent manner).&lt;/p&gt;
&lt;p&gt;Recently I spent time to develop in the kernel layer the plugability for management provider. It is still in the trunk so nothing is really commited yet in GateIn. This plugability allowed my to write the Rest management provider in GateIn. It was also a good way for me to learn a bit more about &lt;span class=&quot;caps&quot;&gt;JAX&lt;/span&gt;-RS (many thanks to Stephane that came a few weeks ago at the Mars &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; to talk about Rest and also for helping me a bit tonight :-) ). So I&amp;#8217;m still not yet a Rest expert but I have a few bits of management stuff coming to Rest:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@Managed&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@NameTemplate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;@Property&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;service&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;cache&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@Property&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;{Name}&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)})&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@ManagedDescription&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Exo Cache&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@Rest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;cache&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Cache&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The @Rest (it&amp;#8217;s not yet definitive) expose the management interface on the Rest connector. For now I&amp;#8217;m only considering &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; in my experiment. The good news is that we have already plenty of useful management interface in GateIn that were developed a few months ago by our team and all those will be soon available via Rest!!!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CRaSH 1.0.0-beta1 release</title>
   <link href="http://username.github.com/2009/12/22/crash-100-beta1-release/"/>
   <updated>2009-12-22T00:00:00-08:00</updated>
   <id>http://username.github.com/2009/12/22/crash-100-beta1-release</id>
   <content type="html">&lt;p&gt;I&amp;#8217;m glad to announce the release of &lt;a href=&quot;http://crsh.googlecode.com/files/crsh-1.0.0-beta1.zip&quot;&gt;CRaSH 1.0.0-beta1&lt;/a&gt;!!!&lt;/p&gt;
&lt;p&gt;But wait, what is CRaSH?&lt;/p&gt;
&lt;p&gt;CRaSH is a shell for Java Content Repository that allows remote connection to a server and performs various operations such as browsing and interacting with the repository, executing queries, performing import/export operations. You can read a complete introduction &lt;a href=&quot;http://code.google.com/p/crsh/wiki/Introduction&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As a GateIn developer I often use the underlying &lt;span class=&quot;caps&quot;&gt;JCR&lt;/span&gt; engine and I developed CRaSH as a companion for my development tasks.&lt;/p&gt;
&lt;p&gt;The project is written in Java and Groovy and leverages a few good open source projects:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The command system is written in Groovy allowing seamless extension of the shell by adding new commands&lt;/li&gt;
	&lt;li&gt;Netty provides the remote connection capabilities&lt;/li&gt;
	&lt;li&gt;Args4j parses the command line and inject the option and argument in the Groovy commands&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It comes as a war file that setup a telnet daemon on the port 5000.&lt;/p&gt;
&lt;p&gt;The project is developed on &lt;a href=&quot;http://crsh.googlecode.com&quot;&gt;Google Code&lt;/a&gt; under the &lt;span class=&quot;caps&quot;&gt;LGPL&lt;/span&gt; license and contributions are welcome :-) !&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Inauguration du Mars JUG</title>
   <link href="http://username.github.com/2009/10/07/inauguration-du-mars-jug/"/>
   <updated>2009-10-07T00:00:00-07:00</updated>
   <id>http://username.github.com/2009/10/07/inauguration-du-mars-jug</id>
   <content type="html">&lt;p&gt;Le Mars &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; fera son &lt;a href=&quot;http://www.marsjug.org/evenements&quot;&gt;inauguration&lt;/a&gt; le jeudi 15 octobre 2009 lors de l&amp;#8217;Agile Tour.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.emmanuelbernard.com/&quot;&gt;Emmanuel Bernard&lt;/a&gt; a accepté d&amp;#8217;être le parrain du &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; et cela nous fait très plaisir, il sera aussi le premier conférencier du &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; et nous parlera d&amp;#8217;Hibernate Search, un projet qui permet de faire des requetes full-texte tout en utilisant Hibernate. Il explorera entre autre comment les recherches approximatives telles que la recherche phonetique sont implementées.&lt;/p&gt;
&lt;p&gt;Les passionnés d&amp;#8217;Agilité et de Java seront comblés car le &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; s&amp;#8217;est associé à l&amp;#8217;Agile Tour (participation gratuite, inscription &lt;a href=&quot;http://www.agiletour.org/en/at2009_marseille_inscription.html&quot;&gt;ici&lt;/a&gt;) pour l&amp;#8217;inauguration. Le but est de créer une synergie entre les deux évènements qui sont en général assez rare dans la région &lt;span class=&quot;caps&quot;&gt;PACA&lt;/span&gt;. Je tiens à remercier Viaxoft et plus particulièrement Karine pour cette collaboration.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://agileee.org/schedule/DB/&quot;&gt;Dimitri Rodolphe Baeli&lt;/a&gt; un collègue d&amp;#8217;eXo Platform sera lui présent mais durant l&amp;#8217;Agile Tour pour faire un tour des pratiques &lt;span class=&quot;caps&quot;&gt;TDD&lt;/span&gt; en entreprise.&lt;/p&gt;
&lt;p&gt;Le but du Mars &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; est de fédérer autour de Java et de créer une communauté dans notre région, j&amp;#8217;espère que vous répondrez présent à l&amp;#8217;appel le 15 octobre.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Type Safe Enumeration with Java Generics</title>
   <link href="http://username.github.com/2009/07/28/type-safe-enumeration-with-java-generics/"/>
   <updated>2009-07-28T00:00:00-07:00</updated>
   <id>http://username.github.com/2009/07/28/type-safe-enumeration-with-java-generics</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve been working with Java 5 Generics for about one year now and one pattern that emerged from my experience is the use of generics to create enumerations that provide type safety (I don&amp;#8217;t claim to be the inventor of that pattern, actually I don&amp;#8217;t even claim it is a pattern).&lt;/p&gt;
&lt;p&gt;Often type safety can be achieved by using method type variables like&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Number&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;createNumber&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;?&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;N&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numberType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stringValue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The drawback of this solution is that all the classes must belong to the same hierarchy, in that example they all need to be a subclass of java.lang.Number. The most direct workaround is to free the type variable from its upper bound java.lang.Number. That makes the choice very large since any subclass of java.lang.Object can be accepted.&lt;/p&gt;
&lt;p&gt;It is also impossible to prevent some subclass to be used as type argument at compilation time. Failure would have to happen at runtime with an java.lang.IllegalArgumentException thrown for instance.&lt;/p&gt;
&lt;p&gt;Those two limitations makes the method not easy to understand the first time you see it, specially when it is part of an &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;, and it is not possible to make it type safe (actually not as far as I know :-) ) as Java Enums cannot be used as a generic declaration.&lt;/p&gt;
&lt;p&gt;So I had to find a way to express an enumerated type that would be type safe. The solution I found is actually not an enumeration in the old/classic way we use to know it before Java 5 Enums (i.e it is class that has a private constructor with public static fields) and therefore it cannot be used in a switch statement. That probably is the only drawback I found but it is a more acceptable issue than the two problems I had before.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s assume we represent a concept of simple types which are arbitrarily defined by String, Boolean and Integer with&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;STRING&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;INTEGER&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Boolean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BOOLEAN&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Boolean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Boolean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

   &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javaType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

   &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javaType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;javaType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javaType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we can easily use it as a type safe enumeration, for instance here is how I would write a parse method:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/*&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * Note : yeah this is not really OO and it could be&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * possible to have an abstract parse(String s)&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * method on the SimpleType class and have the static&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * method delegate to it. I leave it as an exercise&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * for the reader.&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; */&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;simpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;NullPointerException&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;simpleType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;NullPointerException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;No null simple type is accepted!&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;NullPointerException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;No null string can be parsed!&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;simpleType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;STRING&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;simpleType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;INTEGER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;valueOf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;simpleType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SimpleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;BOOLEAN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Boolean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;valueOf&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;AssertionError&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;impossible&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This way we enforce the set of types that can be passed as arguments in our method and we do it in a manner that will enforce the developer to write type safe code.&lt;/p&gt;
&lt;p&gt;Next time I&amp;#8217;ll show you have it is possible to improve the pattern efficiency and usability by adding methods on the Type Safe Enumeration class.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Advanced Java reflection framework needs a (good enough) name</title>
   <link href="http://username.github.com/2009/07/17/advanced-java-reflection-framework-needs-a-good-enough-name/"/>
   <updated>2009-07-17T00:00:00-07:00</updated>
   <id>http://username.github.com/2009/07/17/advanced-java-reflection-framework-needs-a-good-enough-name</id>
   <content type="html">&lt;p&gt;I have been working during the past few days on a reflection framework for Java. Beside the complexity of the actual reflection layer, the developer is pretty much left to himself to perform advanced operations such as type variable resolution or annotation discovery based on the type inheritance hierarchy.&lt;/p&gt;
&lt;p&gt;Furthermore this reflection framework is implemented with the runtime java reflection &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; (java.lang.reflect.Type and its implementations) and the compile time java reflection &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; (javax.lang.model.type.*). It means you can perform compile time reflection or runtime reflection with the same code. I forgot to mention that the java compile time &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; is awful.&lt;/p&gt;
&lt;p&gt;The first reason I wrote this framework was to perform type variable resolution based on a specific class. I needed to perform such operations for a new project (that I will announce soon, stay tuned).&lt;/p&gt;
&lt;p&gt;Let me give you an example:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;V&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;V&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getValue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;B&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;B&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now if we want to know what is the value of the type variable V at runtime for the class B, the code to perform the resolution is pretty tricky to write and requires a fairly good knowledge of the java type system, although it&amp;#8217;s a very intuitive operation to do. Let me give you another example:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;Event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getSource&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Listener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

  &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;FooListener&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Listener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onEvent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Although we all know that Java type erasure will not give us the type of S at runtime from instances of the Event class, any implementation of the Listener interface will carry the information about the type variable. Note that it may not be possible to resolve it if the subclass does not bind the variable to a type. It is therefore possible for the framework broadcasting events to know if a listener is able to receive events from a particular source.&lt;/p&gt;
&lt;p&gt;Since Java 6 it becomes very easy to process source code at compile time (as exhibited by Gavin King during his researches about the type safe criteria &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; for &lt;span class=&quot;caps&quot;&gt;JPA&lt;/span&gt;). For instance it would be possible to replace the need for CGLib at runtime by a library that would perform a similar work at compile time (actually I wrote pretty much that in the forthcoming project). The advanced Java reflection framework helps to hide the java compile time reflection &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;. The compile time &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; is source code oriented but does expose the same semantics as the runtime &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Another neat feature is the resolution of annotations along a type hierarchy which is very useful if you want to determine the annotation of a type or a method taking in account the type hierarchy. Very useful in the following situation&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;nd&quot;&gt;@Foo&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;A&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nd&quot;&gt;@Bar&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;B&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally the framework has some nice stuff coming in, such as the inclusion of the visitor pattern that allows you to perform an operation along the hierarchy of a type, the obtention of the raw class type of any type which attempts to unify the raw type of a parameterized type and the elimination of the synthetic methods due to the return type covariance.&lt;/p&gt;
&lt;p&gt;I plan to host that reflection framework project soon somewhere (under &lt;span class=&quot;caps&quot;&gt;LGPL&lt;/span&gt;) because I think it will be useful to anyone performing advanced operations with the Java reflection. What is missing for now is a decent name for the project since I haven&amp;#8217;t been able to come up with something nice. If you have a good suggestion, don&amp;#8217;t hesitate to send me an email (go on www.julienviet.com for the @).&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Marseille JUG au BarCamp Marseille 2!</title>
   <link href="http://username.github.com/2009/04/19/marseille-jug-au-barcamp-marseille-2/"/>
   <updated>2009-04-19T00:00:00-07:00</updated>
   <id>http://username.github.com/2009/04/19/marseille-jug-au-barcamp-marseille-2</id>
   <content type="html">&lt;p&gt;Vendredi 7 avril j&amp;#8217;ai participé au &lt;a href=&quot;http://barcamp.org/BarCampMarseille2&quot;&gt;BarCamp Marseille 2&lt;/a&gt; pour promouvoir la création du Marseille &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Les évènements orientés nouvelles technologies sont plutot rares sur Marseille et c&amp;#8217;est ma première participation à un BarCamp. A vrai dire je ne connaissais pas ce concept avant cette occasion dont j&amp;#8217;ai connu l&amp;#8217;existence via le &lt;a href=&quot;http://twitter.com/CharlesNepote/statuses/1485615219&quot;&gt;Twit de Charles&lt;/a&gt;, rencontré de visu justement durant l&amp;#8217;occasion.&lt;/p&gt;
&lt;p&gt;L&amp;#8217;école d&amp;#8217;ingénieur &lt;a href=&quot;http://www.supinfo.fr/fr/Menu5b51372d-a9e8-4325-bd4c-28a4bdac11a5.aspx&quot;&gt;Supinfo Marseille&lt;/a&gt; hébergeait le BarCamp pour l&amp;#8217;occasion ce qui m&amp;#8217;a donné l&amp;#8217;occasion de visiter les docks qui ont été rénovés il y a quelques années. J&amp;#8217;avais déjà visité un peu les docks et j&amp;#8217;ai constaté que l&amp;#8217;intérieur des batiments est aussi beau que l&amp;#8217;aspect extérieur le laisse penser.&lt;/p&gt;
&lt;p&gt;A présent, venons en aux faits! furent présents lors de la réunion:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Alain Defrance formateur Java à Supinfo&lt;/li&gt;
	&lt;li&gt;Yann Vigara revenu de Paris il y a quelques mois et qui démarre une activité &lt;a href=&quot;http://www.hebergement-j2ee.fr/accueil&quot;&gt;d&amp;#8217;hébergeur Java&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Alexandre Terasson et Florien Berton élèves à Supinfo&lt;/li&gt;
	&lt;li&gt;Cyril Bourgès étudiant en master &lt;span class=&quot;caps&quot;&gt;SIS&lt;/span&gt; de Luminy&lt;/li&gt;
	&lt;li&gt;Moi même&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;La réunion a d&amp;#8217;abord commencé par les cordialités d&amp;#8217;usage à savoir la présentation de chacun des participants.&lt;/p&gt;
&lt;p&gt;Il faut savoir que notre aventure du Marseille &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; a débuté il y a quelques semaines.  Khaled, Colin, Alain et moi même nous sommes déjà rencontré plusieurs fois avant le BarCamp (malheureusement Khaled et Colin n&amp;#8217;ont pas pu participer au meeting BarCamp). Nous avions donc déjà donné une direction au &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; et cela a été l&amp;#8217;occasion d&amp;#8217;exposer nos décisions. Je rassure tout de même, celles ci sont assez standard et nous n&amp;#8217;auront pas une gouvernance basée sur le totalitarisme, en fait la plupart d&amp;#8217;entre elles émargent de la lecture de la mailing list des &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; leaders français. Voici donc les points que nous avons discutés:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Direction collégiale avec des status basés sur la notion de co présidents. Cela nous est apparu comme le mode idéal et a suggéré par un &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; ayant ce mode de gouvernance&lt;/li&gt;
	&lt;li&gt;Volonté de faire une réunion unique avant fin juin 2009 et mise en place d&amp;#8217;un calendrier de réunions pour la saison 2009/2010&lt;/li&gt;
	&lt;li&gt;Recherche de partenaires et de sponsors financiers pour aider le &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Il apparaît que Supinfo fournira un partenariat afin que le &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; puisse profiter des locaux de l&amp;#8217;école. Ceux ci semblent idéaux car modernes et avec une position géographique très avantageante. Nous souhaiterions effectuer une réunion mensuelle du &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt;, vraisemblablement le mercredi qui est un jour où nous pourrions utiliser la salle aussi bien l&amp;#8217;après midi que le soir (probablement 18h).&lt;/p&gt;
&lt;p&gt;Finalement nous avons conclu qu&amp;#8217;à présent la prochaine action à effectuer est de s&amp;#8217;occuper de tout le travail administratif qui fondera le &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; en tant qu&amp;#8217;assocation 1901. Ceci est un mal plus que nécéssaire pour la création du &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Longue vie au Marseille &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt;!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>SoirÃ©e SOA au Riviera JUG le vendredi 10 avril 2009</title>
   <link href="http://username.github.com/2009/04/03/soiree-soa-au-riviera-jug-le-vendredi-10-avril-2009/"/>
   <updated>2009-04-03T00:00:00-07:00</updated>
   <id>http://username.github.com/2009/04/03/soiree-soa-au-riviera-jug-le-vendredi-10-avril-2009</id>
   <content type="html">&lt;p&gt;Le Riviera &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; organise sa deuxième rencontre le 10 avril sur le theme &lt;span class=&quot;caps&quot;&gt;SOA&lt;/span&gt;, si vous êtes intéressé vous trouverez plus d&amp;#8217;information sur cette &lt;a href=&quot;http://www.rivierajug.org/xwiki/bin/view/Main/20090410-soa&quot;&gt;page&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Marseille JUG</title>
   <link href="http://username.github.com/2009/04/02/marseille-jug/"/>
   <updated>2009-04-02T00:00:00-07:00</updated>
   <id>http://username.github.com/2009/04/02/marseille-jug</id>
   <content type="html">&lt;p&gt;Depuis quelques mois une folie créatrice de groupes d&amp;#8217;utilisateurs Java (&lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt;) envahit la France et un &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt; se monte naturellement dans la région de Marseille. Si vous êtes intéressé de quelque manière que ce soit, vous pouvez prendre contact avec &lt;a href=&quot;http://www.marsjug.org/&quot;&gt;l&amp;#8217;équipe du &lt;span class=&quot;caps&quot;&gt;JUG&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>How to mount a remote AFP drive on AppleTV Take Two</title>
   <link href="http://username.github.com/2009/01/11/how-to-mount-a-remote-afp-drive-on-appletv-take-two/"/>
   <updated>2009-01-11T00:00:00-08:00</updated>
   <id>http://username.github.com/2009/01/11/how-to-mount-a-remote-afp-drive-on-appletv-take-two</id>
   <content type="html">&lt;p&gt;I suppose that you have already installed &lt;a href=&quot;http://wiki.awkwardtv.org/wiki/NitoTV_Take_2&quot;&gt;NitoTV&lt;/a&gt; on your AppleTV as you need it to get remote drive access (note that it&amp;#8217;s probably possible to do without it by doing everything through &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;The AppleTV with a native firmware above 2.0, does not have the &lt;span class=&quot;caps&quot;&gt;AFP&lt;/span&gt; protocol in its recovery partition. So even though you upload the MacOSXUpdCombo10.4.9Intel.dmg on the AppleTV and create the recovery.dmg it will not give you access to the &lt;span class=&quot;caps&quot;&gt;AFP&lt;/span&gt; protocol. The main reason is that the recovery.dmg image does not contain it! But if you would have an AppleTV with a 1.0 firmware it would have worked since it&amp;#8217;s still in the recovery partition (it makes sense, doesn&amp;#8217;t it) ?&lt;/p&gt;
&lt;p&gt;Someone found a solution to workaround this issue, and I think it&amp;#8217;s interesting to blog about it, since it&amp;#8217;s in a forum post on the atvflash forums (it&amp;#8217;s also like a note to myself, in case the post would disappear). So here is verbatim the solution:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Do a factory restore of the &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt;, update the firmware to the latest version and then run the patchstick again. You may be able to uninstall NitoTV but I couldn&amp;#8217;t get this to work after a failed smart installer attempt. A freshly hacked box seems to be the most reliable method.&lt;/li&gt;
	&lt;li&gt;On &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt;: &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; in with terminal and enter @sudo dd if=/dev/disk0s2 of=recovery2.dmg bs=1m@&lt;br /&gt;
This makes a recovery image of your Take 2 recovery partition.&lt;/li&gt;
	&lt;li&gt;On the Mac: sFTP into the &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt;, I used an app called Fugu to do this, and download recovery2.dmg to your desktop.&lt;/li&gt;
	&lt;li&gt;On the Mac: Open recovery2.dmg. Once it&amp;#8217;s mounted you&amp;#8217;ll see a number of files in there but the one we&amp;#8217;re interested in is called &amp;#8220;OS.dmg&amp;#8221;. Rename this to anything you want.&lt;/li&gt;
	&lt;li&gt;On the Mac: Copy in the 1.0 recovery image you have managed to obtain. Mine was called OS-dot-&lt;span class=&quot;caps&quot;&gt;DMG&lt;/span&gt; 1.0.dmg and the md5 = 55b909196952ff72c93aaf3553cf661e&lt;/li&gt;
	&lt;li&gt; On the Mac: Rename the image file you have just copied to &amp;#8220;OS.dmg&amp;#8221; and then unmount recovery2.dmg. You will now have an image of your ATV&amp;#8217;s recovery partition called recovery2.dmg but the OS.dmg file contained within has been replaced with the 1.0 version.&lt;/li&gt;
	&lt;li&gt;On the Mac: sFTP into the &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt; and upload the edited recovery2.dmg to the Documents folder. Then rename this file recovery.dmg&lt;/li&gt;
	&lt;li&gt;On the Mac: sFTP into the &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt; and upload MacOSXUpdCombo10.4.9Intel.dmg to the Documents folder.&lt;/li&gt;
	&lt;li&gt;On &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt;: With the remote navigate to the &lt;span class=&quot;caps&quot;&gt;DVD&lt;/span&gt;/NitoTV menu and select Settings &amp;gt; Install Software. I then ran &amp;#8216;Install Perian&amp;#8217;, &amp;#8216;Install mPlayer Codecs&amp;#8217; and &amp;#8216;Install Turbo&amp;#8217;s kextloader&amp;#8217; in that order. This probably wasn&amp;#8217;t necessary and most of it is probably already there but worth doing just to be safe.&lt;/li&gt;
	&lt;li&gt;On &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt;: Once all this is done you&amp;#8217;re ready to run smart installer.&lt;/li&gt;
	&lt;li&gt;Unplug the &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt;, plug it back in and then you should be able to mount the box on your mac and see your shares on the &lt;span class=&quot;caps&quot;&gt;ATV&lt;/span&gt;. I&amp;#8217;ve found that streaming video from your Mac via &lt;span class=&quot;posthilit&quot;&gt;afp&lt;/span&gt; in NitoTv/&lt;span class=&quot;caps&quot;&gt;DVD&lt;/span&gt; is a bit choppy. Streaming through the &amp;#8220;Files&amp;#8221; menu seems much smoother.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The only thing I need to add is that the so called &amp;#8220;OS-dot-&lt;span class=&quot;caps&quot;&gt;DMG&lt;/span&gt; 1.0.dmg&amp;#8221; is the original firmware of the AppleTV that you can obtain if you own an AppleTV Take One.&lt;/p&gt;
&lt;p&gt;The original forum post can be found &lt;a href=&quot;http://forum.atvflash.com/viewtopic.php?f=10&amp;t=67&amp;start=50#p1016&quot;&gt;here&lt;/a&gt; and all the credits go to Scrubadub and Magic, whoever you are.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Nikon D80 HDR bracketing tutorial</title>
   <link href="http://username.github.com/2009/01/06/nikon-d80-hdr-bracketing-tutorial/"/>
   <updated>2009-01-06T00:00:00-08:00</updated>
   <id>http://username.github.com/2009/01/06/nikon-d80-hdr-bracketing-tutorial</id>
   <content type="html">&lt;p&gt;Recently I dived into &lt;a href=&quot;http://en.wikipedia.org/wiki/High_dynamic_range_imaging&quot;&gt;High Dynamic Range&lt;/a&gt; photography (also known as &lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt;) using my Nikon D80.&lt;/p&gt;
&lt;p&gt;My interest for the &lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt; technology is the capability to produce images that would be almost impossible to take with a digital camera. An &lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt; image reveals details in the light and dark areas of your images.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/julien.viet/Bastia_01_01_09#5286332709867698482&quot;&gt;&lt;img class=&quot;size-medium wp-image-89&quot; title=&quot;ciel1&quot; src=&quot;/wp-content/uploads/2009/01/ciel1-300x200.jpg&quot; alt=&quot;HDR&quot; width=&quot;300&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For instance, on this picture we can see the details in the clouds but also on the rock and it would be very hard to achieve it without &lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This tutorial does not explain how to create an &lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt; image because there are already very good tutorials on that subject, for instance you can read &lt;a href=&quot;http://www.vanilladays.com/hdr-guide/&quot;&gt;Vanilla Days tutorial&lt;/a&gt;, it is based on the Photomatix software but it does not hurt and you could use another software.&lt;/p&gt;
&lt;p&gt;I will rather focus on explaining how to configure a Nikon D80 to leverage a built in feature called Auto Exposure Bracketing (&lt;span class=&quot;caps&quot;&gt;AEB&lt;/span&gt;) that makes easier the creation of &lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt; images. I found all the relevant informations in the user manual but they were not clear enough and I had to spend some time on it in order to get it effective.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt; imaging works by combining the same image with different exposures into a single image using an appropriate software. No need to emphasis on the fact that the images should rigorously be the same as possible. It can be done manually by shooting several times the same pictures with different exposure time and keeping the same aperture size, but it has at least two drawbacks:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;you need to physically touch the camera to change the exposure and it could change slightly the different images&lt;/li&gt;
	&lt;li&gt;it take time to reconfigure the camera and your image may change during that time (clouds may move for instance)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Nikon D80 has a feature called bracketing that allows to shoot three times the same pictures with the same aperture but with different exposures in that order:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The normal image&lt;/li&gt;
	&lt;li&gt;The underexposed image&lt;/li&gt;
	&lt;li&gt;The overexposed image&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is my howto for configuring the D80 appropriately:&lt;/p&gt;
&lt;h3&gt;Configure the image quality&lt;/h3&gt;
&lt;p&gt;The first step is to set the image quality to &lt;span class=&quot;caps&quot;&gt;RAW&lt;/span&gt;. You can change it by pressing the &lt;span class=&quot;caps&quot;&gt;QUAL&lt;/span&gt; button and rotate the the main command until you get &lt;span class=&quot;caps&quot;&gt;RAW&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;Configure the &lt;span class=&quot;caps&quot;&gt;ISO&lt;/span&gt; sensitivity&lt;/h3&gt;
&lt;p&gt;Set the &lt;span class=&quot;caps&quot;&gt;ISO&lt;/span&gt; sensitivity to the lowest value you can afford, for instance &lt;span class=&quot;caps&quot;&gt;ISO&lt;/span&gt; 100 works well most of the time for me.&lt;/p&gt;
&lt;h3&gt;Configure the focus mode&lt;/h3&gt;
&lt;p&gt;Focus mode should be configured to manual (perhaps it&amp;#8217;s possible to use automatic but I never tried).&lt;/p&gt;
&lt;h3&gt;Configure the mode&lt;/h3&gt;
&lt;p&gt;Set the D80 into Aperture-priority mode (A). Exposure bracketing works with that mode.&lt;/p&gt;
&lt;h3&gt;Configure the bracketing&lt;/h3&gt;
&lt;p&gt;Press the &lt;span class=&quot;caps&quot;&gt;BKT&lt;/span&gt; button and rotate the main dial to chose 3 shoots and the sub-command dial to choose the bracketing increment with the value 2.0EV. At this moment you configured the D80 to change the exposure of the photo each time you shoot. Therefore the first picture you take is a normal one, but the second one will be underexposed by 2EV and the third one will be overexposed by 2EV. The forth one will be exposed normally.&lt;/p&gt;
&lt;h3&gt;Configure the shooting mode&lt;/h3&gt;
&lt;p&gt;The final step is to configure the shooting mode to continuous.&lt;/p&gt;
&lt;h3&gt;Et voilà!&lt;/h3&gt;
&lt;p&gt;The next time you will take a picture keep the finder pressed and the D80 will take the three shoots for you. Now it&amp;#8217;s up to you to make great &lt;span class=&quot;caps&quot;&gt;HDR&lt;/span&gt; pictures!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>I'll be at Devoxx 08</title>
   <link href="http://username.github.com/2008/12/08/ill-be-at-devoxx-08/"/>
   <updated>2008-12-08T00:00:00-08:00</updated>
   <id>http://username.github.com/2008/12/08/ill-be-at-devoxx-08</id>
   <content type="html">&lt;p&gt;Long time no blog, just a quick note that tell you that I will be at Devoxx 08 as a &lt;a href=&quot;http://blog.exoplatform.org/2008/12/08/exo-presence-at-devoxx-08/&quot;&gt;representative&lt;/a&gt; of eXo in the exhibition center.&lt;/p&gt;
&lt;p&gt;See you there!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The WebOS Vision</title>
   <link href="http://username.github.com/2008/10/15/the-webos-vision/"/>
   <updated>2008-10-15T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/10/15/the-webos-vision</id>
   <content type="html">&lt;h3&gt;The initial vision&lt;/h3&gt;
&lt;p&gt;When I was a JBoss contributor, we used to name the infrastructure kernel as WebOS, it was Marc Fleury&amp;#8217;s vision I think. Actually for many years the banner of our source code was:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/*&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;* JBoss, the OpenSource J2EE webOS&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;*&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;* Distributable under LGPL license.&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;* See terms of license at gnu.org.&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It may sound a bit marketingish but it is a simple and powerful concept that was pioneered by JBoss in 2000 and followed by a large crowed since then. The fundamental idea is to provide a system for  managing services. That system can be simplified as the equation &lt;code&gt;WebOS = deployer + registry + controller&lt;/code&gt; , I won&amp;#8217;t go farther in the gory details. Today JBoss as rewritten from scratch the system as &lt;a href=&quot;http://www.jboss.org/jbossmc/&quot;&gt;JBoss Microcontainer&lt;/a&gt;, we assume that it is as of today the most complete system and will be for many years.&lt;/p&gt;
&lt;p&gt;So JBoss Microcontainer provides a runtime for your services, do you think it is sufficient ? that would surely work out if you would use services the way we used computers 30 years ago (or maybe 40) with a shell as unique user interface.&lt;/p&gt;
&lt;h3&gt;Toward a more complete vision&lt;/h3&gt;
&lt;p&gt;To complete the picture we need an infrastructure to deliver an user interface that is adapted to the web and that&amp;#8217;s our business at eXo. What we provide can be simplified as @WebOS = deployer + registry + aggregation + identity@.&lt;/p&gt;
&lt;p&gt;The deployer takes care of deploying visual components such as portlets or widgets. Both are connected to your service infrastructure but in a different manner. Portlet adapts your existing applications (&lt;span class=&quot;caps&quot;&gt;JSF&lt;/span&gt;, Tapestry, Struts, et&amp;#8230;) to the portal world. Widgets are more stateless and access services through Rest. Components are registered in the registry. Nothing really fancy here.&lt;/p&gt;
&lt;h3&gt;The aggregator and identity are the real value add&lt;/h3&gt;
&lt;p&gt;The aggregator provides rich front end capabilities to deliver the user interface adapted to your needs based on flexible layouts and skinning. the Ajax technology came to the rescue a few years ago and is now naturally involved to improve the end user experience. It comes in two flavors, the classic portal and the WebOS portal (here literally an operating system like OS X or Vista).&lt;/p&gt;
&lt;p&gt;The identity part takes care of linking your existing user back-end to the portal. It integrates the profile and the various roles of the user (I am not talking here about the social aspect of the user identity as it is out of scope of this blog, we&amp;#8217;ll have more announcements about that soon).&lt;/p&gt;
&lt;h3&gt;The vision&lt;/h3&gt;
&lt;p&gt;The vision we have sketched so far is almost complete. Our WebOS is able to deliver services and applications to your users, but it comes as an empty shell. To make it more sexy it would be nice to have applications to deploy in it. It is also what eXo delivers as professional and powerful application &lt;a href=&quot;http://www.exoplatform.com/portal/public/en/product/exosolution&quot;&gt;products&lt;/a&gt;  that comes bundled with our offering providing a full fledged WebOS solution.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>What's new and cool in Portlet 2.0</title>
   <link href="http://username.github.com/2008/09/18/whats-new-and-cool-in-portlet-20/"/>
   <updated>2008-09-18T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/09/18/whats-new-and-cool-in-portlet-20</id>
   <content type="html">&lt;p&gt;I just made my presentation available on SlideShare!&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;425&quot; height=&quot;355&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;src&quot; value=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=javazoneexo-1221752202783191-9&amp;stripped_title=whats-new-and-cool-in-portlet-20-presentation&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;425&quot; height=&quot;355&quot; src=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=javazoneexo-1221752202783191-9&amp;stripped_title=whats-new-and-cool-in-portlet-20-presentation&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Portlet 2.0 @ JavaZone 2008 18th of September</title>
   <link href="http://username.github.com/2008/09/08/portlet-20-javazone-2008-18th-of-september/"/>
   <updated>2008-09-08T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/09/08/portlet-20-javazone-2008-18th-of-september</id>
   <content type="html">&lt;p&gt;I will be speaking next week at &lt;a href=&quot;http://www.javazone.no/&quot;&gt;JavaZone 2008&lt;/a&gt; about Portlet 2.0 aka &lt;span class=&quot;caps&quot;&gt;JSR&lt;/span&gt; 286. The talk title is “What’s new and cool in Portlet 2.0″ and it’s about the new features in the &lt;span class=&quot;caps&quot;&gt;JSR&lt;/span&gt; 286 specification. I’ll introduce the new key features of the spec with demonstrations.&lt;/p&gt;
&lt;p&gt;My session is on Thursday 18th of September 2008 at 3:45 pm. You can find more information on that &lt;a href=&quot;http://javazone.no/incogito/session/What%27s+new+and+cool+in+Portlet+2.0.html&quot;&gt;page&lt;/a&gt;. I’ll be there during the full event so if you want to meet and have a drink, it will be with great pleasure.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The future is so bright...</title>
   <link href="http://username.github.com/2008/09/05/the-future-is-so-bright/"/>
   <updated>2008-09-05T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/09/05/the-future-is-so-bright</id>
   <content type="html">&lt;p&gt;&amp;#8230;that I almost need my shades.&lt;/p&gt;
&lt;p&gt;eXo Platform SAS &lt;a href=&quot;http://blog.exoplatform.org/2008/09/05/arrival-of-julien-viet-at-exo-as-portal-product-manager/&quot;&gt;announced&lt;/a&gt; officially today that I am now part of the &lt;a href=&quot;http://wiki.exoplatform.com/xwiki/bin/view/Main/Team&quot;&gt;eXo Platform crew&lt;/a&gt; as Portal Product Manager.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Massive mail import in GMail</title>
   <link href="http://username.github.com/2008/08/25/massive-mail-import-in-gmail/"/>
   <updated>2008-08-25T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/08/25/massive-mail-import-in-gmail</id>
   <content type="html">&lt;p&gt;Recently I had to archive a consequent number of mails into GMail. I don&amp;#8217;t want to keep those mails in my Mail User Agent (Mail.app), yet I want to be able to search and retrieve any single mail. Of course I&amp;#8217;m keeping an mbox version of those mails but once it&amp;#8217;s in an mbox, it&amp;#8217;s kind of dead because you cannot easily read one mail or search the mbox.&lt;/p&gt;
&lt;p&gt;I considered several solutions and the simplest I could find is to dedicate one GMail account for that purpose. The only drawback is to have internet access but I&amp;#8217;m fine with that. In addition the &lt;span class=&quot;caps&quot;&gt;IMAP&lt;/span&gt; support provided by GMail allows to do that without any hacks.&lt;/p&gt;
&lt;p&gt;Once my special GMail account was created, I started to use my mail client to copy the messages in dedicated folders in the archive account. It was working fine for a small number of messages like 5000. Some of my mailboxes have way more messages, like 60,000. Above 5000 messsages, it becomes a nightmare for two reasons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The mail client synchronizes with the archive account which slows down the whole process.&lt;/li&gt;
	&lt;li&gt;Network failures are more likely to happen and make the whole process very fragile. When you have a network failure you don&amp;#8217;t know how your mail client will hold the resume.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I started to look around for solutions but I did not find something that would work out well for me. So I started to create my own solution, that would just do the job. Obviously I used Java as it offers all the low level &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; and frameworks to build the solution:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://java.sun.com/products/javamail/&quot;&gt;JavaMail&lt;/a&gt;: the corner stone&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://jcp.org/en/jsr/detail?id=166&quot;&gt;&lt;span class=&quot;caps&quot;&gt;JSR&lt;/span&gt; 166 Concurrency Utilities&lt;/a&gt;, the &lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/CompletionService.html&quot;&gt;CompletionService&lt;/a&gt; which allows to multithread trivially the system and improve the import throughput&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://mstor.sourceforge.net/&quot;&gt;Mstor&lt;/a&gt; a local store provider for JavaMail: provides a way to read mbox format using the JavaMail &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then I wrote a few classes using the above frameworks to perform the massive import. It turns out to work very well and deals with network failures when it happens. I won&amp;#8217;t make an open source project because I don&amp;#8217;t have extra time to invest in that, however if someone is interested in getting the source code, I would give it as it is.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The footprint of the Air Ajax runtime</title>
   <link href="http://username.github.com/2008/08/21/air-ajax-runtime-footprint/"/>
   <updated>2008-08-21T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/08/21/air-ajax-runtime-footprint</id>
   <content type="html">&lt;p&gt;When I started to use Spaz, I naturally twitted about it and of one my friends tried it. He recognized that the application was better than Twitterific but did not adopt Spaz because of the OS resources consumed by the application. I know a bit the heart of Spaz as I developped a few of its features, I know that it does not waste resources and I concluded that perhaps the runtime could be the cause of this overhead.&lt;/p&gt;
&lt;p&gt;This morning, I downloaded one of the simplest applications written in Air Ajax, the classic &lt;a href=&quot;http://download.macromedia.com/pub/developer/air/air_for_ajax.zip&quot;&gt;Hello World&lt;/a&gt; application. I simply executed the application &lt;code&gt;adl -nodebug application.xml&lt;/code&gt; and used the Activity Monitor utility provided by Apple to measure the memory and &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; footprint. The question is simple: what is the overhead of an application that nearly does nothing and have nearly zero state ? Note that I use the &lt;code&gt;-nodebug&lt;/code&gt; switch which optimizes the runtime, thanks to &lt;a href=&quot;http://funkatron.com/&quot;&gt;Ed Finkler&lt;/a&gt; that gave me the hint. It helps to reduce the &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; used by the application by a factor of 2. The first version of this entry did not take it in account.&lt;/p&gt;
&lt;p&gt;Disclaimer: this test is very subjective and if someone else performs the same test, he will likely find a different result.&lt;/p&gt;
&lt;p&gt;The answer is pretty big for me. My machine is a MacBook Pro 2ghz with 2 gigs of &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt; (I can&amp;#8217;t have more because it&amp;#8217;s one of the early models). The application uses constantly around 2% of &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; and 20 megs&lt;/p&gt;
&lt;p&gt;It is way too much for desktops. I wondered then how does it scale if I run 10 times the same application ? Perhaps that Air has a smart runtime that can collocate resources ?&lt;br /&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/wp-content/uploads/2008/08/tenhelloworldnnodebugfootprint.png&quot;&gt;&lt;img class=&quot;size-medium wp-image-32&quot; title=&quot;tenhelloworldnnodebugfootprint&quot; src=&quot;/wp-content/uploads/2008/08/tenhelloworldnnodebugfootprint.png&quot; alt=&quot;Ten Hello World Footprint&quot;/&gt;&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;According to my results, running 10 Hello World application consumes around 200 megs of &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt; and around 20% of my &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt;. Clearly I see a problem here, how can the end user really uses several Air applications at the same time without consuming too much OS resources ?&lt;/p&gt;
&lt;p&gt;That reminds me the story of the Java virtual machine. Back in 2000, the early versions of the Java virtual machine were slow and gradually they improved the performance of their virtual machine. If I remember correctly the &lt;span class=&quot;caps&quot;&gt;JDK&lt;/span&gt; 1.4 was the first release to provide decent &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; performances and then each major release had seen decent performance boosts. &lt;span class=&quot;caps&quot;&gt;BTW&lt;/span&gt;: Sun&amp;#8217;s VM also uses lot of memory but the &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; footprint is nearly zero. Reducing memory overhead is not achieved yet, I know they have plans to collocate if you execute several virtual machine though, I am not an expert.&lt;/p&gt;
&lt;p&gt;I hope that Air will follow the same path and that Adobe will invest in the optimisation of the runtime. In my opinion it is a key factor to increase the adoption of the platform.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Adobe Air for Ajax Developers review</title>
   <link href="http://username.github.com/2008/08/18/adobe-air-review/"/>
   <updated>2008-08-18T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/08/18/adobe-air-review</id>
   <content type="html">&lt;p&gt;I have been playing recently quite often with the &lt;a href=&quot;http://www.adobe.com/devnet/air/ajax/&quot;&gt;Adobe Air &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt; for Ajax developers&lt;/a&gt;. For more than 10 years my focus has been mainly the &lt;a href=&quot;http://java.sun.com/&quot;&gt;Java Platform&lt;/a&gt; and I did not have to use anything else so far. Don&amp;#8217;t misunderstand me,  I won&amp;#8217;t probably use much the Air in my job activities. My interest for it comes from the involvement in the &lt;a href=&quot;http://funkatron.com/spaz&quot;&gt;Spaz&lt;/a&gt; project. Spaz is an open source &lt;a href=&quot;http://twitter.com/home&quot;&gt;Twitter&lt;/a&gt; client written for the Air runtime with the Ajax kit, the story is a very classic one, I was looking for a good Twitter application and after using &lt;a href=&quot;http://iconfactory.com/software/twitterrific&quot;&gt;Twitterific&lt;/a&gt; for a few days, finally I switched to Spaz. Spaz answered most of my needs and I was able to easily provide patches to add new features that I was considering as important to me.&lt;/p&gt;
&lt;p&gt;The first thing I did was to install the Air &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt; for Ajax development. Adobe provides several development runtimes and one of those is based on Web standards: &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt;, &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; and Javascript. Once you have downloaded the kit, you need to set the &lt;code&gt;AIR_HOME&lt;/code&gt; variable and add to your path the &lt;code&gt;$AIR_HOME/bin&lt;/code&gt; expression.&lt;/p&gt;
&lt;p&gt;After that you have access to the &lt;code&gt;adl&lt;/code&gt; command that allows you to start an Air application. In the case of Spaz, I downloaded the source tree from the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; and used &lt;code&gt;adl application.xml&lt;/code&gt; et voilà! The application just start.&lt;/p&gt;
&lt;p&gt;The main advantage of the Ajax runtime is to reduce the entry level for developers. I was already quite familiar with Web and Ajax technologies and Adobe had a great idea to create such a platform. (It helped me to understand better Sun strategy with the heavy promotion of the Java FX platform). Most of the objects you will use are wrappers of Actionscript 3.0 objects, if you look at the documentation you will find for instance that the &lt;code&gt;air.desktop.Icon&lt;/code&gt; is an alias for the &lt;code&gt;window.runtime.flash.desktop.Icon&lt;/code&gt;. Does the developer cares about that ? I would say yes, because the default wrapper set is partial and does not cover the full platform, therefore sometime you need to use &lt;code&gt;window.runtime.flash.*&lt;/code&gt; when you want to access advanced features. It happened to me when I added a feature that display the number of unread message in the dock icon, pretty similar to what Mail.app does.&lt;/p&gt;
&lt;p&gt;The platform seems powerful enough. However compared to the Java platform it&amp;#8217;s very poor, but the main focus of the platform is to build RIAs and therefore it does not matter much. The integration with the desktop lets you leverage native menus, the dock icon on OS X and the system tray icon on Windows.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://help.adobe.com/en_US/AIR/1.1/devappshtml/&quot;&gt;documentation&lt;/a&gt; is the weak points of Air. The online &lt;a href=&quot;http://help.adobe.com/en_US/AIR/1.1/jslr/index.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; documentation&lt;/a&gt; is similar to Javadocs, so you will feel comfortable with it. The main issue comes from the main documentation that does not cover everything. The documentation for the embedded local &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; database is just minimal. When I developed the badge feature for the dock icon, I felt it was possible to leverage the powerful vector capabilities of Air to create nice shapes and indeed I was able to achieve it but as the cost of looking at the Actionscript 3.0 documentation which in my opinion is an issue (well even the Actionscript documentation was not enough) and I was left by myself.&lt;/p&gt;
&lt;p&gt;Finally I find the platform powerful and simple, the main issue being the documentation. If you have good Web and Ajax skills you can leverage them to build quickly an application. The main advantage over traditional Ajax application is that you won&amp;#8217;t be annoyed when doing cross domain Ajax, won&amp;#8217;t have to deal with browser quirks and will create more powerful RIAs. If your Web and Ajax skills are poor, you should consider twice using that platform, &lt;strong&gt;but&lt;/strong&gt; the learning cost in time and resource is not lost as you can reuse your knowledge for building classic Ajax application.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Syntax highlight support</title>
   <link href="http://username.github.com/2008/08/14/syntax-highlight-support/"/>
   <updated>2008-08-14T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/08/14/syntax-highlight-support</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve just added support for the syntax highlight using the very good project &lt;a href=&quot;http://code.google.com/p/syntaxhighlighter/&quot;&gt;SyntaxHighlighter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I used the WordPress plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/google-syntax-highlighter/&quot;&gt;Google Syntax Highlighter for WordPress&lt;/a&gt; but not without pain.&lt;/p&gt;
&lt;p&gt;Indeed there is a &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; conflict between SyntaxHighlighter and Wordpress at the list level that makes the highlighted code to be displayed with additional margins. If you want to see what I mean, download the plugin for WordPress and look at the screenshot. The plugin on my blog is fixed.&lt;/p&gt;
&lt;p&gt;So now the fix: modify the file &lt;code&gt;Styles/SyntaxHighlighter.css&lt;/code&gt; in the plugin (which originally comes from the SyntaxHighlighter project). Add the following at the bottom:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nt&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;body&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.entry&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.dp-highlighter&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;li&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0px&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0pt&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0px&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
 </entry>
 
 <entry>
   <title>JSON support for WordPress</title>
   <link href="http://username.github.com/2008/08/14/json-support-for-wordpress/"/>
   <updated>2008-08-14T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/08/14/json-support-for-wordpress</id>
   <content type="html">&lt;p&gt;I find quite strange that nobody ever provided support for that. Googling about &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; support for WordPress did not return anything relevant. At all.&lt;/p&gt;
&lt;p&gt;I use the &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; support in my &lt;a href=&quot;http://www.julienviet.com&quot;&gt;home page&lt;/a&gt;. It is used to display the last 5 blog entries of this blog in the side bar. It does not appear at first as I did not want to clutter the page, so you need to hover the mouse over the blog section and you will see it appear using a nice fading (thanks to jquery).&lt;/p&gt;
&lt;p&gt;Anyway here is the php code for WordPress. It is not a plugin because it does not interract with the heart of the system and WordPress does not seem to have an architecture for adding that kind of feature. I believe it should rather be a core feature of the product rather than an extension.&lt;/p&gt;
&lt;p&gt;First step, create a file called &lt;code&gt;wp-json.php&lt;/code&gt; at the root of WordPress:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;php&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;empty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$wp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;require_once&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;./wp-load.php&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;nx&quot;&gt;wp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;feed=json&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ABSPATH&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;WPINC&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/feed-json.php&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then create a file named &lt;code&gt;feed-json.php&lt;/code&gt; in the &lt;code&gt;wp-includes&lt;/code&gt; folder:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;php&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;header&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;Type:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;application&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blog_charset&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;$more&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;$items&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;query_posts&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;have_posts&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;the_post&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;$item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
	&lt;span class=&quot;s&quot;&gt;&amp;quot;title&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_the_title_rss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt;
	&lt;span class=&quot;s&quot;&gt;&amp;quot;link&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;apply_filters&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;the_permalink_rss&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_permalink&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()),&lt;/span&gt;
	&lt;span class=&quot;s&quot;&gt;&amp;quot;description&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;apply_filters&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;the_excerpt_rss&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_the_excerpt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()));&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;$items&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;endwhile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;$arr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_bloginfo_rss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_bloginfo_rss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_bloginfo_rss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;language&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rss_language&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$items&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;callback&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;json_encode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$arr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;);&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; to use it is http://yourdomain/yourpath/wp-json.php?callback=myfunction. The callback is mandatory (if you don&amp;#8217;t want it, modify the php script above) in order to make the feed mashable directly in a web page. It will return data like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;myfunction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&amp;quot;title&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;It is what it is&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&amp;quot;link&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;http:\/\/blog.julienviet.com&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;description&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;A pure technical trip&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&amp;quot;language&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;en&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;#8217;ll explain later in another post how I consume it in my &lt;a href=&quot;http://www.julienviet.com&quot;&gt;home page&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Unofficial launch</title>
   <link href="http://username.github.com/2008/08/13/unofficial-launch/"/>
   <updated>2008-08-13T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/08/13/unofficial-launch</id>
   <content type="html">&lt;p&gt;This is the unofficial launch of my blog.&lt;/p&gt;
&lt;p&gt;My &lt;a href=&quot;http://www.julienviet.com&quot;&gt;home page&lt;/a&gt; went alive a few days ago and after that I&amp;#8217;ve managed to install wordpress and customize it for my needs. Well almost, I still need to add the syntax highlighter plugin and do a couple of other things.&lt;/p&gt;
&lt;p&gt;Working on my home page and the blog was a rich experience, actually I never really managed to do so called client side mashups and now I understand better what it is about. Thanks to javascript and &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt;, I&amp;#8217;ve been able to integrate Twitter and my blog feed into my home page without requiring any server side code. I did it that way for the sake of simplicity in term of development, as I&amp;#8217;ve been able to work directly on the page without the need of any server. There&amp;#8217;s a trade off though, doing that kind of mashup is not an easy task and requires considerable skills.&lt;/p&gt;
&lt;p&gt;I still have a few things to tune in order to officially launch the blog/site and drink Champagne. For instance I may consider to change the default theme of the blog although it is quite nice, it obviously has a taste of déjà vu. Actually I am considering to pay someone to create a custom theme, but I would need to find the right person first.&lt;/p&gt;
&lt;p&gt;I hope to open next Monday, see you next week!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Syntax highligher test</title>
   <link href="http://username.github.com/2008/08/13/syntax-highligher-test/"/>
   <updated>2008-08-13T00:00:00-07:00</updated>
   <id>http://username.github.com/2008/08/13/syntax-highligher-test</id>
   <content type="html">&lt;p&gt;Testing syntax highlighter plugin:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Hello&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;System&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;out&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Hello&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;hello&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
   &lt;span class=&quot;n&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hello&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
 </entry>
 
 
</feed>