RIA Frameworks: the never-ending story (JavaCampParis4)

A few weeks ago saw an excellent evening at Google’s: JavaCampParis4. Quite a few people showed up, maybe partly out of curiosity for the famed Google offices (around 60 people in total, much more than previous editions). Google obliged by providing a big room with a breathtaking view on the Paris Opera House, the best buffet I’ve seen for a free event, as well as goodies including t-shirts and USB keys. Thanks, Google!

I find that these events are often more social than technical. There are a means for many to catch up with colleagues and friends. As for me, I was delighted to chat with Jean-Laurent, Grégory Paul, and many others, as well as meeting Nicolas Martignole for the first time (indeed I almost missed out on the excellent buffet).

Still, one thing I was really interested in, is Rich Internet Applications (RIA) Frameworks. I don’t know about you, but me, I have been hoping for a while that a clear leader would emerge. Probably because I have been spoiled by such an experience in the past (remember the good old days of Struts 1?). So I naturally suggested a session on RIA Frameworks which got a pretty large turn out.

Executive summary: there is no clear leader. However, Flex, GWT, jQuery emerge as the oligarchy dominating the area (.NET frameworks were not discussed, given the Java-leaning crowd).

Details

My original question was “What is the best RIA framework for professional development?” I didn’t want to discuss flashy new tools, only those that dominated the marketplace and that a company could capitalize on.

The frameworks mentioned by the participants were (in bold, those that are used the most by the people present in the session):

  • GWT: an obvious option for Java programmers, since it appears almost anything can be done in Java. Generating production-level pages can be slow. Many libraries available for it, either as native-Java libraries, or as wrappers for Javadoc libraries (to be avoided if possible, as they are harder to control and to use TDD-style)
  • jQuery: a library now frequently found on high-traffic sites, which has been officially approved by Microsoft
  • Flex: the only one to provide a complete solution. Someone was using it as the only solution for frequently displaying financial data.
  • scriptaculous
  • Yahoo! UI: good cross-browser support, but quite complex to use
  • Java FX: a person viewed it as an interesting option for mobile devices, but few are betting on it. Apparently, it does not require a browser plugin (apart from a recent version of Java)
  • Other tools mentioned: Google Visualization API and its GWT-GVis simplification layer (for generating charts), Prototype (Ajax & GUI JS library), qooxdoo (Ajax & GUI JS library), LightView / LightBox JS (both for specific image display, based apparently on Prototype), Dojo (Ajax & GUI JS library), phoneME (a technical library for Java on mobile platforms), Ext JS (yet another popular Ajax & GUI JS library with a GWT wrapper; proprietary. Apparently, the models are a bit complex). Even Silverlight was mentioned.

From all this transpire that there is no clear leader in the RIA space. The one that is the most likely to be around the longest is probably Flex. But, as mentioned, it is not an answer to all issues. Though well integrated with Java development, it is not as natural to use as, say, GWT. In fact, GWT seems to be the only real Java-friendly solution, an important argument given the hordes of Java developers with few Javascript skills. The issue, of course, is that GWT is not a complete solution: its graphics capabilities are more limited than the competing JS libraries. Its Ajax features are not the best either, especially if you design a very responsive application, such as a financial app.

So, here is my opinion:

  • personally, if you want to branch out from Java, then Flex sounds like an interesting way of doing things that look good
  • as a company, if you want, to bet on a new technology and can afford to train your staff, Flex is here to stay so is probably a safe bet
  • as a company, if you want to leverage your Java developers fast, then GWT is probably the way to go; in that case, you will also have to use additional Javascript libraries, starting with JQuery
Posted in java | 3 Comments

Why I use Twitter

"TWEET!" "Officer, This Lady is Loitering!"

I regularly mention Twitter to colleagues and friends. Most of the time, their reaction is “uh? I already do not have time to read blogs, why do you think I should waste time on Twitter as well?”

That reminds me of the time I was trying to tell my acquaintances about blogging or even (a long time ago) about this new thing called “the internet”. No, Twitter is not that useful. It is not going to save world hunger or give you a new job. But still, you should give it a shot. Here is my attempt to organize my thoughts a bit.

In theory, on Twitter, you are supposed to tell about what you are doing right now. For many, it means telling the world about the coffee they are drinking and other trivial things. This is not how I use it.

There are 3 types of people that I follow:

  • friends and colleagues: Twitter offers me a way to keep in touch with them even though I don’t meet them in person frequently or even call them. From these people, I enjoy both work-related tweets (“I got XYZ to work, it rocks!”) and mundane ones (“My little one is just one year old!”). Twitter is a low-friction way of talking with them, what Jeffrey Fredrick calls a replacement for a beer. Often, I miss what they say when I was not connected but that does not matter. Twitter is not a chat system. Sometimes, I respond to this type of people, or even DM them (ie. send a direct message). Anyway, as long as I get news occasionnally, I’m happy.
  • thought leaders and people I want to hear more: many figures in the domains I’m interested in now have Twitter accounts. Often, I already read their blogs, but that is not enough. Blogs are infrequent matters (less and less frequent as they embrace Twitter), and only well-formed thoughts appear on them. This is all good, but Twitter is where they talk about their day-to-day work. Sometimes, they would post half-formed thoughts (“what would happen if we stopped doing X and started doing Y instead?”). Sometimes, they would tell short things that do not deserve a full-fledged blog post (“Theory X is probably the most interesting thing I heard about this year”) or give links to page (“Check out this article — I recommend it”). Very occasionally, I would respond, or, more commonly, RT (re-tweet) their post so that my own followers are aware of things I find interesting. Like the others, the people I consider thought leaders also tell about their life. That is not so interesting, but unfortunately it is not easy to filter them out. That’s is the biggest drawback.
  • competitors: in a way similar to the friends and colleagues, I am interested to learn what they are working on. Obviously, I can only learn about what they are willing to tell. Still, it can be interesting. And over time some of them tend to the “friends & colleagues” category.

Over the months, I have built relationships with some people, learned the opinions of thought leaders on Fit, ask for help in selecting a mobile phone, followed Uncle Bob’s progress on Fitnesse/Slim, publicize various events that I was involved in… and arrange for a Twitter board to be displayed during a conference.

All these things can, in theory, be done via blogs or social networks sites. But the low friction of Twitter makes it so much more easy to use.

My advice is: get your own Twitter account and follow people you know. If you have things to tell that are not roo mundane, by all means, tell them. And do regularly clean up by stopping to follow posters that have a high signal/noise ratio.

Feel free to follow me, if I meet your own criteria for Twitter.

Posted in twitter | 3 Comments

Refactoring applied to features (or YAGNIAM – You Aren’t Gonna Need It… Any More)

Taking OffRefactoring code without modifying its external behavior is necessary to keep your code base manageable. That is nowadays a well-established fact.

However, it can only go so far to prevent your code base from swelling permanently. In theory, if your revenues keep growing, you can keep recruiting more people in your development team, and all will be good. Unforunately, that’s not usually how software works.

Like many other things in life, software goes through well-known phases: birth, growth, maturity, and decay. At some point, the costs of maintaining the software are just not justified anymore and the editor pulls the plug.

However, we can do a little better than that. If the project still has some life in it, it can be a better plan to reduce its complexity, in order to lower its maintainance costs and increase its life. In fact, there is no need to wait for the product to decrease in popularity. Housekeeping should be done as early as possible in the lifecycle. No need to maintain features that cost more than they pay.

My current customer has exactly this problem. Their project suffers from feature creep. Regression tests become more and more costly to maintain (it is actually planned to delete some of them regularly — though, of course, nobody really knows which ones we can afford to throw away).

I would call the activity I’m promoting “Feature Refactoring: the process of changing a computer program’s list of features (and corresponding code) without modifying revenues significantly” (balancing short- and long- term revenues). This means that it is OK to remove some features, as long as it is acceptable to your customer base, in terms of money to make in the long term. Basically, you want to avoid the classic pattern where 80% features that are little used or not used at all.

Note that I am not merely talking about features representing significant weight in terms of code, tests, or documentation. Rather, I want to target anything that costs money to maintain, understand (for new hires), market, etc.

How can we do this? Well, here are a few smells that can help

  • your client representative tell you about it — the easy scenario
  • you detect that few customers actually use your modules – monitoring tools can help you here
  • you find bugs in production… and few people actually complain about it — should this feature be there at all?
  • you upgrade your project… and nobody complains — if your features are popular, someone is bound to complain about any change
  • specs for a particular feature are not updated — features that do not evolve tend to rot
  • run workshops with customers — a interesting format for this is Speed Boat

My point is that there are even more potential benefits in term of code maintenance when removing features, compared to refactoring the code base (which is a good thing to do, too).

Refactor your features. See this one there in the corner? You Aren’t Going to Need It.

You’ll be happier.  And you will probably save money.

Posted in agile, misc | Leave a comment

Is Fit Dead? A debate on Twitter

Influential members of the Agile community recently discussed the current state and history of Fit (the original thing, not Fitnesse or other Fit-inspired tools). The conversation took place on Twitter mostly on Tuesday, March 3rd and Wednesday, March 4th. Here is a transcript.

It was kicked off by an interview of Ward Cunningham and James Shore on Hanselminutes where Ward & James were asked whether Fit was dead.

Bob Martin first reacted on Twitter by pointing out that, at any rate, “FitNesse is thriving”, along with Slim, a new system that can be used by Fitnesse as an engine to run the test tables.

Michael Feathers replied that, in his view, Fit was more appropriate as a seed for other works: “Take it, grow it locally, and never commit back.” This seems confirmed by James Shore, a former leader of the Fit project (and a successor to Ward in that role): “Fit core was intentionally resistant to change [...] from an organizational perspective”

Interestingly, James believes that both Fit and Fitnesse have “similar flaws, which could be solved by another approach”:

  • Fit flaw #1: maintenance. HTML is hard to maintain and refactor.”
  • Fit flaw #2: Customers. Customers don’t generate the documents, and that was the whole idea.”
  • Fit flaw #3: Programmers. Fit loves domain models and Whole Value. Most programmers don’t. Impedance mismatch.”

This last point is actually seen as a benefit by J.B. Rainberger: “Similar to JUnit, Fit puts positive pressure on programmers. [That said] TDD informs design, but many use JUnit for testing. Fit informs feature design, but many use Fit for testing.” James agrees: “Fit drives the design of the domain layer just as TDD drives separation of concerns.”

JB & James both note that, regardless of the tool itself, they “continue to succeed collaborating with customers with Fit’s table format”, typically by “collaborating with examples on a whiteboard”.

Possibly, the biggest shortcoming (as stated by James & Ward during the interview, but also in twitter by Brian Marick: “I can’t offhand think of any product owner who wrote tests in any format”) is that the assumption that business people would write the tables was flawed. A view not shared by Keith Braithwaite “I’ve had actual users write tests in tables in excel with success”. JB, for one, prefers “Customers help write docs”, reformulated by Elisabeth Hendrickson as “Business stakeholders & implementation team collaborate on articulating expectations.”

Finally, several people including Willem van den Ende pointed to BDD and especially to Cucumber as a better implementation of the same ideas “Cucumber given/when/then steps flow naturally for me, FIT- style tables are optional, I add them later if needed.”

For more details see the following links:

Posted in fit | 4 Comments

Fitnesse now supports versioning to SCMs!

I really like how Fitnesse is doing these days (I even subscribed to the mailing list, which I had not considered last year, for example). Bob Martin is adding features every few weeks. It is great!

In the release he did a couple of days ago, he added 2 interesting things:

  • one is a format tool that helps giving a more readable view of your tables, in editing mode; unfortunately, your edit panel must be using a fixed-size font (which it is not the case by default on my system)
  • the most interesting addition, though, is the support of SCM tools to store wiki pages

There are two ways to configure a SCM tool.

The first is to specify it on the command line:

  java -DCM_SYSTEM=package.to.AParticularCmSystemIntegrationClass -jar fitnesse.jar

The second is to specify in a high-level page on your hierarchy of pages:

  !define CM_SYSTEM {com.project.fitnesse.OurSvnSystem me/my_password /cm/myRespository}

This one is interesting, because it allows you to have different configurations for different hierarchies of pages (typically one for each different projects, or even for different versions of the same project).

The bad news, though, is that the CM System Integration class in question is not provided by default, though I’m sure that in time there will be all sorts of appropriate integration classes provided with Fitnesse. But that’s not the case so far (except for an example made to connect to Git — not sure how generic it is). That said, it does seem quite easy to implement that class (you basically need to implement calls to the command line in Java).

You might want to download the Fitnesse release and check out the FitNesse.UserGuide.SourceCodeControl page. As often with Fitnesse, the website does not have the latest details.

Posted in fit | 1 Comment

Paris JUG One Year Anniversary

JUG FrancophonesA fun evening last Tuesday at the Paris Java User Group. It was the first year anniversary, so special events were planned.

The highlight was the introduction of ALL French JUGs (all created shortly after Paris JUG was). More than a year ago, there was not a single JUG in France, there are now in total 9: Rennes, Nice, Bordeaux, Tours, Nancy/Metz, Toulouse, Lyon, Nantes, plus, of course Paris (and Luxembourg, Switzerland and Belgium, also represented that evening). There is little doubt that other major French cities will have their own JUG soon, especially Lille and Marseille.

The organizers gave a couple of interesting statistics:

  • the typical participant at Paris JUG is a Java architect more than 30 years old; this is in contrast to other local JUGs in France which have sometimes 50% students in the audience
  • the users mailing list (voluntary subscription only) has around 180 members
  • the announce mailing list (automatic subscription when registering to any evening) has more than 1100 members; however, only the organizers can post to it and only announcements of events organized by Paris JUG are made there
  • the number of people registering to a Paris JUG is reaching 220 (more than 200 since September); unfortunately, with 175 available seats, this means that they will have to limit the number of participants in the coming evenings
  • more than 1500 visitors / month to their website

Tombola Jazoon

There were also a few technical presentations, on subject such as Wicket, Java 7 and JOGL, but the most impressive one was for the version 3 (not currently available) of Parleys. Stephan Janssen did an impressive job, first with clients programmed in Flex, Java FX and GWT, second with an almost magic movie editor that matched videos of presentations with slides automatically. That could solve quite a few problems we have with our own conferences at Valtech. Extremely good stuff, as Londoners would say!

For more about this evening at Paris JUG, check out:

Posted in conferences, java | Leave a comment

JavaCampParis3 is on!

I am very excited to let you know that my colleague Anthony and I are organizing a BarCamp related to Java programming and everything that goes around it. Quite a few people have registered already. A lot of the topics that people are interested in discussing include TDD, tests and build tools, but also alternative languages for the Java platform. Interested in them? or in other? Register today!

Don’t know what a BarCamp is? well, it basically works like an Open Space Conference: the participants (you!) bring topics that they are willing to talk or discuss about. They get sorted at the beginning of the day in an open agenda and people go to topics they are most interested in.

This BarCamp will last the whole day. Sun is kindly letting us use their fancy offices in Paris, near the Champs Elysées, and my employer, Valtech, is paying for the food.

Come and join us! It will be fun.

Posted in conferences, java | Leave a comment

Agile Alliance Meeting in Paris

Hall

As you might know, the AA board is meeting in person a couple of times a year and, for once, they decided to reach out to the crowd. This time, it happened in Paris.

Not much talking that evening; mostly networking, really. I got to talk to a few people that I had seen at Agile 2008, but couldn’t meet, because of the huge crowd. It’s too bad I couldn’t stay for drinks, since I was giving a training the following day.

Check out my pictures.

Posted in agile | Leave a comment

Fixed display errors in French translation to Hudson

I think I have finally fixed (most) errors in the display of the French translation in Hudson. 3 different people reported them to me, which is a sign that Hudson enjoys a strong following in France (I also keep stumbling on French Hudson fans in conferences and my colleague Eric Le Merdy has just released a new Hudson plugin for Nabaztag).

The root of the problem is that I incorrectly thought that properties should be encoded in UTF-8 (in fact, only help pages in HTML should be). In practice, properties files should stay in classic ISO 8859-1.

I didn’t keep trace of which files I had incorrectly converted to UTF-8 and I don’t know of a tool that could check that for me (if you know of one, do let me know). So there is still a chance that some files remain in the incorrect format. If you find any, please create a bug report.

The fix should be available with the next release of Hudson, v.1.269, which should be a matter of days, according to history. My progress on the French translation are listed on the Hudson wiki.

Apologies to all that were inconvenienced by this bug.

Posted in hudson | 3 Comments

Bob Martin on Hudson

Yep, you heard it here first: Uncle Bob loves Hudson!

Not content with the videos on Slim, he has just produced another one showing how to do basic staff with Hudson. And by the sound of his voice, he is sold!

Inteerstingly, he compares the simple startup process of Hudson to the one in Fitnesse: just download and run.

Update (14/12/08): Uncle Bob has actually put online his Hudson install

Posted in fit, hudson | Leave a comment

Data types in Slim

After an initial introduction video, one on comparaison operators, Bob Martin has now a video on Data Types in Slim, his Fit replacement in Fitnesse.

Data types in Slim are simple. They can only be Strings and Lists, though it is entirely possible for fixtures to actually get integers.

A list looks like this:

[1, 2, 0.5]

Note the brackets. Also, note the space between the comas and the following value. This is important, as the comparaison will actually be made between the exact string specified in the table, and the String representation of the List returned by the fixture. Hence, the format in toString() is important.

Posted in fit, tdr | Leave a comment

Comparaison operators in Slim for Fitnesse

Now that the release of Slim is done, Bob Martin is spending time producing tutorial videos. The new one is about comparaisons in Slim.

There are two majors things to learn in it:

  • approximate equals
  • ranges

The ~= sign means “approximately equals to”, and depends on the number of decimals; for example,

~=1.3

in a cell will work for any value between 1.2 and 1.4.

A range allows Slim to accept results between boundaries. For example, put something like

1<_<8

in a cell and all values between 1 and 8 will be considered valid. This is something that some versions of Fit could do, but not all. With Slim, all versions of Slim will support this (since it will be evaluated on the Fitnesse side).

Last thing: Fitnesse contains a rather powerful expression evaluator that is not specific to Slim or Fit.
For example:

!define TIMES {1000}
|${=5*${TIMES}=}|

You can combine this construct with the range, and have something like this in your cell:

${=5*${TIMES}=}<_<${=6*${TIMES}=}

which will appear as

5000<_<6000

when viewing your wiki page.

Finally, you might want to watch out for the coming minor release of Fitnesse.

Posted in fit, tdr | 2 Comments

Bob Martin releases Fitnesse with Slim

You are probably familiar with Fitnesse, a wiki site that wraps Fit. It is basically an environment that helps attaching tests to specifications. Some call this a Test-Driven Requirements (TDR) tool. It has been originally written by Robert C Martin (aka Uncle Bob), Micah Martin and Michael Feathers.

Well, Uncle Bob is coming back with Slim, an extension of Fitnesse he has been working on since August 2008, as his followers on Twitter know. It has been released in the latest version of Fitnesse a few days ago.

Simply put, Slim (Simple List Invocation Method) is an alternative to Fit, quite simpler to implement and to use, and integrated with Fitnesse.

The big thing with Slim, for us mere users, is that it calls POJOs. No need to inherit from Fit-specific classes anymore! (something that GreenPepper has had for a long time) You will just have to implement some methods with particular names, depending on the type of fixture you use.

The fixtures that are available are familiar ones:

  • Decision Table, the equivalent of Column Fixture, with input columns and output columns
  • Query Table, the equivalent of Row Fixture; interestingly, its method query() now returns a List of Lists of Lists (!) instead of an Object[]  table
  • Script Table, the equivalent of Do Fixture in FitLibrary; it also shares many caracteristics with ActionFixture
  • finally, Table Table is the way for you to write any arbitrary fixture

Other enhancements include:

  • variables in fixtures can stay private; no need for them to be public anymore; setter methods are required instead. Not a big deal in my view, but something that beginners were often complaining about
  • error messages are clearer in Fitnesse, typically when classes or methods cannot be found in the fixtures
  • as a side effect of an evolution of Fitnesse made necessary by Slim, it is now possible to run tests in differents JVMs
  • Slim is much simpler to implement than Fit is; this is supposed to make ports of it to other languages much easier, more stable, and more consistent (some implementations of Fit do not have the exact same features as others)
  • it should also be possible to write tests without tables (with updates of Slim), which was very difficult with Fit, because of all these implementations; I want to see things like the plain text tests in TextTest !

Convinced? Then the next step for you is to look at the tutorial video Bob Martin did yesterday.

Me, I think this is a great enhancement, and one of the biggest news in the TDR Tools world this year. With Bob Martin’s influence, there is no doubt it will pick up steam quickly.

Posted in fit, tdr | 5 Comments

Back from Open Source eXchange

Conference SignInteresting day at Open Source eXchange, a conference organized by Xebia and SkillsMatter.

It was fun meeting Wendy Devolder (now CEO of SkillsMatter) formerly from Valtech (I worked with her at Valtech London back in 2001-2002) and Michael Isvy (with SpringSource) also ex-former. Also had nice chats with Guillaume Laforge, Alexis Moussine-Pouchkine, Antonio Goncalvez and many others, including 2 more Valtech alumni.

Aside from the presenters, most of the participants seemed to be tech guys working for blue chips.

Overview of the presentations

Michael Isvy from SpringSource did a valuable demonstration of DM Server. I find it surprising that it bets on OSGi (I cannot get myself to like it). But it seems mostly to become a good server, further strengthened by the recent addition of Groovy to their portfolio (post in French).

Spring DM Server seems to be mainly Tomcat + Spring Framework + OSGi. Supposed to be 100% OSS, but it is not easy to guess when looking at their website

Tugdual Grall did an entertaining presentation of eXo Platform. The WebOS part is impressive (but run from the local machine, so presumably much slower when used over the net). But I can’t imagine it winning most hearts. My money is currently on using separate apps such as Google Docs.

Guillaume Laforge, formely from G2One and now with SpringSource, did his classic Groovy/Grails presentation. Not much to add to what he has said at Paris JUG in September.

Oh yes, one thing: he hopes that Groovy will be used to script deployment under Spring DM Server. I totally agree.

Antonio Goncalvez presented JEE6, due for release in 2009 Q2. My feeling is that it is just getting too complex, in the sense that it is getting impossible to know about all its various standards and API (reminding me of the whole SOAP fiasco). The JEE6 team knows about this and has a plan where only subsets would be used. As for me, I think most developers will just stick with Spring or some other simpler options (though I guess Spring is getting less and less simple…).

Another thing: it seems EclipseLink is used as the reference implementation for JPA by GlassFish. EclipseLink is in fact TopLink, only Open Source. Interesting comeback, for a tool considered as dead after the Hibernate landslide.

Alexis Moussine-Pouchkine talked about GlassFish as a full-fledged JEE Server, open source, much faster and still as powerful than Weblogic and WebSphere. Strangely, few references to JBoss, except to mention that it (GlassFish) seems to have more downloads.

Christophe Laprun from JBoss had a session on JBoss Portal. I didn’t follow all of it (did work for Valtech instead). Portals and portlets are not that interesting to me. I’m glad other people work on them.

Hughes le Bars & Oktay Istanbullu from Yahoo! presented Hadoop, a solution to do grid computing for storage of very large data sets (in the order of PetaBytes). I couldn’t quite understand all the presentation, but the whole thing seems terribly interesting. It is used for web search and ads matching by Yahoo!

Oh, Hughes also mentioned PIG, apparently an equivalent of SQL, just better (!).

Drinks were paid after the conference, and a good time was had by all.

Check out my pictures of the conference on flickr.

Posted in conferences, groovy, java, spring | 1 Comment

CITCON Amsterdam Continuous Integration Cage Fight on YouTube

Julian has just posted on YouTube videos he took during the CI Showdown at CITCON Amsterdam last October. Sound quality is not very good, so make sure you are in a quiet environment.

Posted in citcon, continuous integration, hudson | 4 Comments