Monday, August 14, 2006

My Picture


For those who don't know me, here is a picture.

Wednesday, April 26, 2006

The new look of jsp/js code

Years ago, we used to write stuff like :

<script type="text/javascript" language="Javascript 1.2">
<!--
(document.all ? document.foo.bar :
document.getElementById('foo').bar) =
foo(<%=MyStaticLib.bar(baz)%>)['<%=map.get("quux")%>'];
-->
</script>

Nowadays, with XHTML, the browser evolution and JSP 2.0 combined with prototype.js gives us a new fresh look on things:

<script type="text/javascript">
// <![CDATA[
$('foo').bar = foo('${custFn:bar(baz)}')['${map['quux']}'];
// ]]>
</script>

Have fun!

Thursday, March 02, 2006

Java Black Belt

I don't blog here as often because I have been spending my free internet time on Java Black Belt trying to go up the belt latter. It is a free java testing site, well not completely free, but money free. You have to give in some of your time and experience to contribute a little something to get points which in turn allow you to take the tests. Here is my profile there.

Wednesday, February 22, 2006

JSP CheatSheet

Here is a nice cheat sheet for jsp 2.0 xml documents. It covers pretty much everything: jsp directives, tag file directives, JSTL, implicit objects, and EL.

Wednesday, February 08, 2006

OSCache and MVC

(Continued from previous post) Another way to configure OSCache is through the provided CacheFilter. Now my page is even faster (15 ms on average) and I am not breaking my MVC.
So the morale of the story is: the tags are flexible, but if the flexibility doesn't suit you, don't use them!

Tuesday, February 07, 2006

OSCache tags with MVC?

I tried to cache a relatively slow page today using OSCache. I simply embedded the entire content in <oscache:cache> tags and was surprised to discover it took longer using the cache. My page load time was around 800 ms and became 900 ms once cached.

After some playing around I realized it was due to my MVC-Struts
architecture which was incompatible with the way I was using the cache tag. Since the heavy work of loading and refactoring the data was performed before even reaching the jsp, it was performed aimlessly every time even though the tag was caching the content.

So, I hacked my MVC and put an ugly scriplet inside the cache tag calling a static execute method
and set the original execute method of my Action blank. The page time went down to 125 ms which is a significant improvement.

I am left to figure out a way to use it without hacking my MVC. To be continued...

Monday, January 30, 2006

Facelets : Like Tapestry but JSF

Facelets is a view technology that focuses on building JSF component trees. The web community is eagerly seeking a framework like Tapestry, backed by JavaServer Faces as the industry standard. While JavaServer Faces and JSP are meant to be aligned, Facelets steps outside of the JSP spec and provides a highly performant, JSF-centric view technology. Anyone who has created a JSP page will be able to do the same with Facelets. Even though Facelets is being developed open source under Sun's guidance, it can work with any JSF 1.2 compliant implementation or MyFaces.

It has been included in both the free and PRO versions of Exadel - the choise for JSF as an Eclipse extension based on WTP, and it is also the purpose of the Tomahawn Taglib in MyFaces. Now that Facelets has been integrated in AppFuse, we have no more reasons not to try it.