Collective Intelligence in Action

Don’t you hate it when you spend months (or years) working on a pet project / book / mad take over the world idea, then somebody comes out with something even better?

Yep, it’s just happened to me. Years working on the idea of the ‘Wisdom of Crowds’ (even prior to web 2.0 in the shape of Red-Piranha). Month’s working on a Masters Dissertation on applying Web 2 techniques to the Finance industry (pdf link). And somebody comes out and does it even better.

Not just better. But much much better.  The sort of better as in ‘If I had this earlier, I’d have just copied it and changed the words around a bit’. The book is available from Manning as ‘Collective Intelligence in Action‘. A free, first chapter (Understanding Collective Intelligence) is available here (pdf).

Collective Intelligence in Action

So what’s it about? We’ve all heard about the Wisdom of Crowds idea. But what if you need to actually implement it on your website? This book shows you how to (using both concepts and practical code, as well as the theory behind all of it that I was missing). It includes

  • Intelligent, learning search, using Lucene.
  • Extracting data from blogs using web-crawling.
  • Executing Real time feedback on facebook-like sites.
  • Scalable data-mining techniques to manage the torrent of information
  • Making personalised recommendations based on all of the information.

Disclaimer:Manning provided me with a free review copy of the book – but no strings attached. And , maybe if I’m nice enough to the Author (Satnam), I can persuade him to talk about making millions using JBoss Drools and Complex Event processing in the book.

How NOT to do Web 2.0 – No Cork is not near Drogheda

Web 2.0 is great – it allows users to get involved on your website.

Allthetopbananas.com shows not how to do it. Just be lazy and not bother to tell your website that Cork is not near Drogheda (for our non-Irish-based readers, they’re at opposite ends of the country, about a 4-5hr commute!).

Why should I bother to report to you that ‘Cork is not Drogheda’ if you haven’t done your basic research and looked at the map? Save your ‘wisdom of crowds’ stuff for items that you can’t find anywhere else.

Web2 with Java:Struts2, Spring MVC, Flex, JavaFX and Google Web Toolkit

Originally posted on the O’Reilly Books OnJava blog. 

My fellow Java Developers. Two years ago I wrote an article on ‘Web 2.0 and Enterprise Java – move over Struts‘ looking at what was likely to replace Struts 1 (then and now a de facto web standard). How did our predictions fare?

Remember that article (and this one) isn’t looking for technical best, but which is going to be a best investment of your time to learn (in a mercenary commercial sense). And if you’re deciding which to use in a project , which framework is going to be easiest to support in 5 or 10 years time?

Broadly speaking, the frameworks we talk about break into two types: those that treat the web as a set of pages, and those that treat the web as a set of components (think Visual Basic, Delphi or Oracle Forms act-a-likes).

So , what has changed in the last 2 years:

  1. The rise of Spring. Not only has it gone mainstream, but the Spring MVC, Spring Webflow and Spring-JavaServerFaces are very powerful and widely used web frameworks. A sign of how things have changed is that for Sruts 1 the Spring guys wrote the integration for the (then) bigger Struts framework. For Struts 2 , the integration was provided by the Struts community. With the forthcoming Spring 3 release the framework is increasing momentum; More annotations and less XML in Spring MVC; Rest Web Services out of the box, support for Dynamic languages like Groovy and Spring Webflow becoming a more ‘just use it where you need it’ solution.
  2. Adobe Flex and OpenLaszlo – Flash graphical interfaces on the Web, built using Java. I don’t think these will be *the* mainstream choice but I do think the will be more than a just a niche. And for design led companies, nothing else (not even Microsoft Silverlight) can come close in terms of a user ‘wow’ factor.
  3. JavaFX and Applets done right (Jim Weaver has a good article on this). More of a competitor to Adobe Flash as both are rich content in the browser using an easily obtainable plugin. JavaFX will appeal to developers because of it’s Java like syntax. I hope I’m wrong, but for rich web content, would you put your money on Sun (an Engineering led company) or Adobe (an almost apple-like design led one)?
  4. Frustration with JSF (Java Server Faces). For the last 3 years I’ve thought that ‘*this* is the year of JSF. I’m still waiting not because of lack of demand (as web apps become more complicated and use more Ajax they become more like the JSF component based model). It’s now uphill for JSF as I (and a lot of other Developers) have given up. I’m still waiting for the ‘EJB 3′ moment when JSF becomes more simple and more usable. Remember , we ‘re not talking about technically best, but which is going to be in widespread use.
  5. Google Web Toolkit (GWT). Looking at it one way , GWT is JSF done right – a component based web framework , but one that is fast and has a lot of community support. Even then it took me a long while to warm to GWT – I’ve bad memories of web-components that hide their internals (remember Microsoft Interdev 10 years ago?) . What got me over the hump was thinking of GWT as a compiler not to Assembly or bytecode , but to Javascript and HTML.

How has Struts 2 got on in the meantime? I’m not sure. Remember , Struts 2 is very different from Struts 1. Conceptually it’s very similar to Spring MVC (Simple Java Beans based with configuration); Slightly easier to learn and maybe slightly less powerful than Spring (although both are more than capable for most Enterprise web applications.

The ‘I’m not sure’ bit comes from two (non technical) factors:

  1. Struts 2 hasn’t achieved the massive Enterprise developer mind share that Struts 1 did. It’s a better framework, but it’s got more competition.
  2. If you’re using Spring in the middle tier, why not have one less framework and use Spring MVC (instead of Struts 2) in the presentation layer as well?

Back to the previous predictions , how did we get on?

Scenario 1: Adding Ajax to existing Struts Applications. Use AjaxAnywhere – closest to the approach taken in the article Sprinkle Some Ajax Magic into your Struts Web Application. Despite writing this article , I see the frameworks evolving rapidly to the point where you would only take such an approach for adding Ajax to ‘Legacy’ applications.

How did we do? I’d maybe widen the choice of Ajax Libraries (to include DWR , Dojo, Prototype and others) but the basic idea of evolving rather than replacing your Struts 1 app still holds true.

Scenario 2: Need Ajax Now for a new Java Application. Use Appfuse as it gives Struts, Ajax (with DWR) and the possiblity of JSF integration now, all ‘out of the box’.

How did we do? I still recommend AppFuse, as it combines (name-your-web-framework) with Spring Hibernate(and other ORM) and Maven. However I’d now tend towards choosing Spring MVC (unless you’ve a reason to use Spring 2), given that you’re probably already using Spring in the mid tier.

Scenario 3: Medium Term. Use an implementation of JSF (either MyFaces or whatever Appfuse promotes – probably Struts Shale). Struts Shale (JSF) has so far released only ‘overnight’ builds. Apache MyFaces (JSF) tool support and Ajax capabilities are likely to improve over time. Both Struts-Shale and MyFaces are likely to play well with AppFuse , making it a safe bet for investing your time checking it out.

How did we do? Struts2 and Spring both still give you migration route to JSF. But do you want it?

So out of the creative ajax-induced chaos of 2 years ago, I see 4 or 5 clear choices in Enterprise web frameworks: Struts 2 (as a follow on from Struts 1). Spring MVC, due to the huge mindshare Spring has on the mid-tier. Google Web Toolkit , both as a natural home of frustrated JSF developers , and because who’s going to argue with the people who gave us maps and mail? Flex, because Flash apps done well just look so good. And JavaFX, because Applets-haven’t-gone-away-you-know.

In my view, we would have been delighted to have any of these framworks 5 years ago. And each (for different reasons) is likely still to be popular in 5 years time. Your missions now is to pick the one that suits your project needs.

Inside Information – Best Irish Business Blog shortlist

Inside sources (who declined to be named) are suggesting that the longlist for the ‘Best Irish Business Blog’ will look something like this …

Irish Blog Awards

Update:
The fact that this information was given to me (in ready to paste HTML) has nothing, absolutely nothing , to do with the fact that FirstPartners.net are sponsoring the Best Business blog award.

Logo

Top web designers get paid in cows

Eoghan McCabe and Ken Stanley are doing some work on a website for us. Under wraps until it’s complete, but even at this stage it looks very slick. This work is as a result of Eoghans win a web design competition so they’re refusing to take any payment for it. So what do you do to show their appreciation? You buy them a cow.
I don’t know what the going rate (in cows) are for Eoghan’s and Ken’s services, so this is only a token amount. And the cow goes to Africa via Oxfam Ireland rather than An Post leaving it at your doorstep. Although once Ken found out about his bovine-surprise, he threatened to track it down and BBQ it himself.

And yes, if you’ve been reading this blog for while, you’ll know that I’m a serial cow buyer.

British Midland's – BMI – Dirty Little Online Checkin Secret

Flew Dublin – Heathrow again last week – this time with BMI (British Midland International). It’s what all Java consultants do – pop on the plane to London to see a client. Now I like BMI, not least because they provide a bit of competition for Aer Lingus. I like Web Checkin. A lot. See my post on how to use Web Checkin to solve Dublin Airport’s problems. But BMI have a (bad) secret about their online check-in that they don’t tell you until after you have paid for your flight.

BMI Logo
Online or Web checkin means you print your boarding card before you leave home. It means you arrive at the airport , walk straight through security and enjoy a coffee while waiting for your flight to board. For Aer Lingus it’s great on a day trip; print both boarding cards the night before you leave. For BMI there’s a glitch; you cannot print your return boarding card until after you arrive in London.

What? On your busy-day-with-client-not-one-second-to-spare you are expected to start printing pieces of paper. What is worse, you only find this out after you pay your money. Called the Flight Helpdesk ‘we have a lot of people complaining about that Sir’. Mail to BMI customer service, no reply.

The moral of this story is not to complain about BMI (although here’s my Ajax related Rant about Scandanavian Airlines if that’s your thing , or Mulley’s lost baggage saga if you prefer). And yes, I should be glad of a choice of flights to Heathrow (see Limerick Bloggerand Bock the Robber)

No, the moral of the story is that IT systems (yes the geeky bits) can have a huge impact on customers in traditional business (you know, the ones that pay you money). Being the helpful people we are, we’ll even show BMI how to fix this using Business Rules. Somewhere, deep in the bowels of the BMI system code, Someone, a long long time again decided ‘no one will ever want to check in before they leave’ . And now that it’s spaghetti code, it can’t be fixed, leaving a lot of unhappy customers.

Microsoft Silverlight – Web 2 IDE – Event

Fergal Breen asked to blog about the Dublin Silverlight event, but Stephen Downey beat me to it. (Update: Ken McGuire is also writing about the event)
Microsoft silverlight logo

Microsoft Silverlight is a flash competitor; It looks good and is well worth checking out, but I’ve got my reservations if it is truely as portable as Flash (see comments on Tom Raftery’s Silverlight launch post). All the same, Silverlight is going to be big (it’s backed by Microsoft), and the IDE / Editor is setting a good standard.
Not sure? Go to the Event and make your own mind up.