Wednesday, June 29, 2005

Another JavaOne Trip Report

WARNING: This blog entry was imported from my old blog on blogs.sun.com (which used different blogging software), so formatting and links may not be correct.


Greg Murray and I gave a talk on AJAX yesterday. They're tracking the attendance numbers for all technical sessions at JavaOne and as of this morning it was in the top 10! It has probably dropped down a couple of notches by now though... The talk went well and I've only received positive feedback, so I think this is a technology a lot of people are excited about.



A couple of people have already tried the AJAX component library for Creator and have asked where the other AJAX components are. The component library only contains my auto completion textfield so far; the other components written by Greg (Murray), Ed Burns, Roger Kitain etc. have not yet been adapted for Creator - we really should do that ASAP but we've all been too tied up with JavaOne. I'll post something once it's ready. And we desperately need that JSR for component metadata, so we can directly embed designtime metadata in the same files already used to generate component classes!






I had a fun challenge this morning. During the launch of the new Ultra 20 computer, I was challenged to code up an application using our tools as fast as possible. I had roughly an hour. While I was coding away, there was a panel discussion followed by some presentations. I was listening to my own music so I wouldn't get distracted. A couple of times I caught myself tapping with my feet - hope I didn't distract the nearby journalists! My screen was visible though so they could see that I wasn't "cheating" (e.g. just pulling up previously created content). I had planned in advance roughly what to build, but hadn't tried it - after all what fun is a challenge if it isn't actually challenging? However, thanks to this I got to get pretty stressed! My plan was to build a translation web service, by first pulling down a free dictionary word map (English to Spanish and vice versa), then read the words into a map, then build a Creator web app which takes pasted text, splits it into words and calls the web service to generate a translated text segment. Plus various web controls to convert the translation direction etc.



Well, I started out with NetBeans to create the web service. I knew this would be most of the job. I looked at the format of the data file - a perfect job for the new JDK 5.0 Scanner API, so I wrote some methods to parse the data files using it, storing it all in typed Maps (using generics). Ah, what a delight it is to use the new JDK 5.0 features - the code is so much cleaner. By now it was definitely time to deploy the web service - I had used up half of my time already (but I knew I could do the Creator part really quickly). So I hit Deploy, and .... disaster!! I got an error message from the ant file responsible for deploying the web service. What's going on??? And at this point they stopped the
briefing and asked me for status... uh oh... "I have another half hour, right? Right? Phew". I've done a web service before - a couple of weeks ago I did a simple dictionary lookup one (the one shown in the AJAX keynote), so I thought this should work. The only significantly different thing is that I had used JDK 5.0 apis this time - the format of the datafiles, maps etc. couldn't matter - so I decided to cut my losses, not try to debug it and just rip out the generics and rewrite the scanner portion to just do simple String iteration instead (e.g. iterate over the String, look for the first tab, that's the English/Spanish delimiter, then look for the first comma or newline, that's the first translation word, etc.)






Done... ahh....








That strategy worked - another ten minutes I had a working web service, and twenty minutes later I had built a Creator web app with dropdowns for choosing Spanish to English, English to Spanish, and English to Spanish to English. I also modified the output to be HTML for the text such that I could mark up any nonmatched words (which I left untranslated) in a light red background color. When it came time to report what I had done, I opened the browser, cut & pasted Sun's mission statement (from our web site), and translated it from English to Spanish and back to English. With the poor dictionary and complete lack of heuristics, the result was a pretty interesting Mission Statement - one I hope we won't adopt!



I realized right after the demo what the problem with deploying my original web service had been: Even though App Server 8.1 is capable of running JDK 5.0 code, I had started it from Creator (so it was using Creator's VM, JDK 1.4!) instead of NetBeans' (JDK 5.0). Doh!!



By the way, those new Ultra 20's are just fantastic. Deploying my app takes just a couple of seconds! I thought my existing W2100z opteron workstation was fast, but my, I want one of these!



Later this morning I went and attended the vendor panel on JSF components. That was really interesting - I got to see great demos of JSF components. ESRI and SoftwareFX showed components tightly integrated into Creator, which is always a proud moment since I wrote the code which renders their components on the screen :) Otrix showed some really powerful components - but only in the browser, which surprised me a bit since I'm sure they work in Creator (Stephane, Otrix' CEO who gave the talk, has provided a lot of great feedback to us over the last year). Craig McClanahan showed the new Creator builtin components. The Theme Switch feature appeared not to work but what had happened was that there were multiple projects open, and the theme switch was applied to a different project than the one for the current page!



I have a lot more to say about JavaOne, but I'm running out of time - I have some more people to meet this evening, and tomorrow morning I go on vacation! Just for 4-5 days but it's going to be great - I haven't taken much vacation the last 2-3 years and after the Early Access milestones followed by the JavaOne buildup followed by the JavaOne events I'm quite ready for it.



I've met several people at JavaOne who stopped by and said they read my blog and encouraged me to keep it up (a few even said to blog more). I appreciate that. It's very hard to get any kind of reliable statistics on blog readership - the page counts could be almost entirely due to search engine crawlers, and on the other hand RSS news aggregators completely hide the true number of readers. So getting actual thumbs up from people is great encouragement. And now that Creator 2 is out I have a lot of new things to talk about so once I'm back I'll get back into it!


6 comments:

  1. Tor, I like your bolgs...please keep writing.
    Haroon

    ReplyDelete
  2. I'm a reader, too - keep up the great work!

    ReplyDelete
  3. Glenn KronschnablJuly 5, 2005 at 1:50 PM

    I'm interested in learning more about the ESRI components. Do you have any URL's or screenshots? I've poked around some on ESRI's site, but there was nothing obvious. Thanks.
    PS. I've started playing with Creator 2 - and wow - great job.

    ReplyDelete
  4. Hi Glenn,



    I work for ESRI and I am glad to know you are interested in our components... For starters, here's a screenshot showcasing many of our components.


    Further, you can get a more detailed look into our architecture and components here.


    Please feel free to email me should you need more info.



    Tor - your blogs are always a great read! Please keep 'em coming...

    ReplyDelete
  5. Hey Tor and Glenn:
    First off, thanks Tor for an excellent blog and some nice work at JavaOne.
    Glenn, Keyur showed you some of the information on our JSF components, but you can also find more here:
    Detailed listing of tags and their attributes:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/Java/java_adf_taglib.htm
    Where you can set various display attributes:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/Java/java_adf_compare.htm
    Listeners and Action Methods you get out of the box:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/Java/java_adf_listeners.htm
    The JavaDoc for our components:
    http://edndoc.esri.com/arcobjects/9.1/Java/webcontrols/index.html
    and another chapter out of our developer guide that has some screenshots and discussion of using our components:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISServer/ServerDevGD_Ch7.pdf
    Is there anything more specific you want to see?

    ReplyDelete
  6. Let's try again with some html syntax

    Hey Tor and Glenn:

    First off, thanks Tor for an excellent blog and some nice work at JavaOne. Glenn, Keyur showed you some of the information on our JSF components, but you can also find more here:



    Detailed listing of tags and their attributes:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/Java/java_adf_taglib.htm
    Where you can set various display attributes:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/Java/java_adf_compare.htm
    Listeners and Action Methods you get out of the box:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/Java/java_adf_listeners.htm
    The JavaDoc for our components:
    http://edndoc.esri.com/arcobjects/9.1/Java/webcontrols/index.html
    and another chapter out of our developer guide that has some screenshots and discussion of using our components:
    http://edndoc.esri.com/arcobjects/9.1/ArcGISServer/ServerDevGD_Ch7.pdf
    Is there anything more specific you want to see?

    ReplyDelete