Captcha what?
May 30, 2006 | In Java | 1 CommentGot this when joining a group at Yahoo Groups. I know they need to outsmart the spambots, but come on. I can’t read this.

And what about people who have bad eyes or are even blind. I think blogger.com uses some sound captcha. Others use mathematic statements, but I guess that is not to hard for spambots to crack.
Pre-packaged Eclipse
May 30, 2006 | In Java | No CommentsThis is good news! Someone has taken a lot of Eclipse plugins and packaged them into “distributions”. If you do Java ME development you download the mobile distribution. There are also distributions for Java EE, desktop, LAMP etc.
Anything that simplifies and cuts on startup time is good. Now if we only had decent bandwidth in Sri Lanka…
Ajax Framework Smackdown
May 24, 2006 | In Java | No CommentsSomeone did a count and found 135 Ajax frameworks…
This session actually only have representatives from two: DWR and Dojo. Then there are three other, non-ajax representatives: JSF, Flex/Flash and Swing.
It feels like a very immature technology. There is not even a standard format to send data back from the server. Some send HTML that gets injected in the page, some use Javascript that will be executed n the browser and some uses XML that they can get data from through DOM.
What ever framework you subscript to today, my guess is that you will want to change that many times. Moving target.
Weaknesses:
Dojo: bad documentation
Flex/Flash: Proprietary
DWR: Limited functionality - focuses on remoting
I really don’t like Adobe’s approach. They claimed to have support on Mac OS X, Windows and Linux, but the latest player is not available on Linux. I would not take the Flash route today.
We use DWR today. It is a limited but good framework. If you need fancy DOM stuff, you could add script.acol.us to handle that part.
Spring Webflow
May 18, 2006 | In Java, Javaone | No CommentsThis session is interesting since we build a application (not a framework!) to build dynamic flows with custom validation, branching transitions, signing, PDF generation etc.
Spring Webflow (SWF) has sort of the same idea: let the controller keep state and discover where to go next.
It works with a static set of beans. You can’t use it with our solution since we would need to dynamically change the Webflow description
SWF is saving the Flow Execution in a repository. Task execution uses the flow description to decide where to go.
Difference from us: Webflow separates the flow description from the rest of the application (beans etc.). Simpler. We have everything (data items, validation, flow, custom code) in one BIG XML file. Could we abstract the navigation part into an “execution engine”?
In the Webflow there are different types of states (think UML state diagrams):
* View state - show something to the user
* Action state - do something with the data
* Decision state - use conditions to tell where to go
* Subflow state - enter “child flow”
* End state - end the flow, clean up
Webflow can be tested in isolation, accessing Spring managed beans. So the flow can be tested from Eclipse.
Scripting in Java EE
May 18, 2006 | In Agile, Java, Javaone | No CommentsThree guys from Oracle. Two french guys that was sometimes hard to understand. ![]()
They started with a introduction to Groovy. Really cool things. I need to look into that in greater detail. There is two books coming out soon, one is “Groovy in Action” from Manning.
They demoed a small Groovy Swing application using JMX to deploy an EAR to Oracle App server and create a DataSource for it.
Then they showed WSDL stubs in Javascript
Automatically generates Javascript to consume a web service, from a WSDL. Then a web client can call Javascript methods to consume the service in the client.
Check out!
JSR 223: one API that scripting languages can implement. Then they can be used from ScriptEngine Interface. It supports binding variables from Java to the script. Share data.
Demo: a Javascript running inside Java 6 that talks to a web service. Then you can talk to this script from a jabber client.
JUnit 4 and Java EE 5 - Better Testing by Design
May 18, 2006 | In Agile, Java, Javaone | 1 CommentThis is the first time I will hear Kent Beck speak. I have read a few of his books and he seems like a smart guy. This session is also crowded. I seem to pick the popular ones today. But it pays off, since they all have been splendid.
The speaker is making a joke about developers that LIKE testing.
“Testing is getting respect from developers. Five years a go this room would have had five people in it.”
The testing momentum is growing, but TDD is not yet mainstream. What will happen? Will TDD be a blipp in the CS history, like “Britney Spears”. Or will it continue to grow?
“JUnit isn’t complicated, anyone could have written it. But I did, and that’s why I stand here and you all sit there.”
JUnit 4 has some big changes, but remains backwards compatible. They have removed the composite pattern (Test interface implemented both by TestCase and TestSuite). No more testFoo in test names. Instead use the @Test annotaion. No more setUp() and tearDown(). Use annotations @before and @after.
Beck is telling the storing about the flight from Zurich to the US together with Erich Gamma. beck was doing mostly Smalltalk (still doing “Latin”, said Gamma). gamma was into Java. So during the flight Beck suggested that they should do some Java hacking. That was the beginning of JUnit. Never intended to be distributed.
Some good stuff:
“If the test is hard to write you might actually have a architectural problem in the code”
“Something in my programming style leads me to never need mock object.”
Introduction to Ajax
May 17, 2006 | In Java, Javaone | No CommentsAnother great session from the same guy who did the Swing session. Got to get his name for later Javaones. Another thing: these Ajax/GUI sessions seems to attract the most beautiful girls at Javaone. Good thing for all you single nerds. ![]()
Effective Java and Java Puzzlers
May 17, 2006 | In Java, Javaone | No CommentsAs expected these session where packed. They even moved the Puzzler session to the keynote hall. Joshua didn’t finish his new version of Effective Java to Javaone as planned. Can’t wait to get my hands on it. He didn’t say when it is to be expected.
The Effective Java talk was mostly about generics. Since we are still at 1.4 (thank you IBM…) we have not put generics to test yet. But it might be a good thing, since people are still figuring out how to use them correctly. I guess Joshua’s book well be a good read when we move to 5.0.
The Puzzler talk was entertaining as always. The focus here was also on 5.0 corner cases. My coworker Anders figured out one. I had a general idea about what was wrong with a few, but didn’t find the exact error on one of them.
Now I’m waiting for a talk about what’s new in Spring 2.0 with Rod Johnson. Also packed… This day might turn out to be the best day of this years Javaone.
8 ways to make you more productive in Swing
May 16, 2006 | In Java, Javaone | No CommentsThis session was great. Got to get the slides and start trying out some of the stuff.
I really would like to do some Swing.
Rest and Atom
May 16, 2006 | In Java, Javaone | No CommentsThis technical session started with a comparison of SOAP and REST web services. SOAP violates the web paradigm and misuses HTTP. WS-* is too complicated (specs are over thousand pages). REST, instead of just a SOAP endpoint URL, uses simple HTTP and send XML documents. It uses HTTP verbs: POST, GET, DELETE, PUT. In REST HTTP caching will work according to specs.
Downside of REST is that it’s not standardized, less industry support. More of a developer uproar (like EJB vs. Spring). There is now interface like WSDL in SOAP, and no directory system like UDDI.
Then he described Atom. Atom is a feed format like the old RSS.
Like RSS. Atom is standardized in RFC4287.
The Atom format contains a feed with some metadata and zero or more entries, also with metadata: Feed 1..* Entries
Entries can carry anything: text, HTML ot any content you declare with a content-type.
Atom is not just for blogs anymore! It can be used in CMS, wikis or other types of application. I have few ideas for our systems.
APP is the “Atom Publishing protocol”, used to interact with a server using the Atom for its feeds and entries. For the typical Atom application, blogs, APP is used for CRUD operation on the blog. APP uses HTTP verbs: POST, GET, PUT, DELETE
APP is a REST protocol. Everything is a (URI) resource. APP also supports adding of binary data and using several authors on one blog.
Service -> Workspace -> Collection of entries
-> Collections of media
To implement in a server you need the Servlet API and the ROME feed parsing API.
A client can easily be implemented with ROME and Apache jakarta HTTPClient.
Things I need to check:
* SOAP Doc/Literal
* RESTful web services
* ROME
* Is ATOM working with Wordpress?
* http://blogapps.dev.java.net