Saturday, May 10, 2008

Leopard JDK 1.6 hates on GWT 1.4.62 (and .61)

I'm even running the unofficial GWT build for Tiger and Leopard, but tonight I tried to start working on a GWT project in Idea and got this error when I tried run my hosted mode browser:


Unable to load required native library 'gwt-ll'. Detailed error:
/local/java-libs/gwt-mac-1.4.62/libgwt-ll.jnilib: )

Your GWT installation may be corrupt
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load required native library 'gwt-ll'. Detailed error:
/local/java-libs/gwt-mac-1.4.62/libgwt-ll.jnilib: )

Your GWT installation may be corrupt
at com.google.gwt.dev.shell.LowLevel.init(LowLevel.java:107)
at com.google.gwt.dev.shell.mac.LowLevelSaf.init(LowLevelSaf.java:262)
at com.google.gwt.dev.BootStrapPlatform.go(BootStrapPlatform.java:29)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:318)


I regenerated the project on the command line and tried running it again with the same results. It was working a few weeks ago, I swear.

After a bit of dorking around, I thought "Oooh. Java 1.6." In Idea, I switched my JDK back to 1.5 and voila! All was good.

Awesome little car

Friday, May 09, 2008

Taking Down JavaOne. Bye Bye JavaOne!

JavaOne Guy In Cape

Free lunch with norovirus

Grizzly and JAX-RS

Grizzly: bewildering and relatively low level talk for this
conference. It looks awesome, but I'm probably not going to be
implementing a steaming protocol on top of grizzly.

JAX-RS: amazing use of annotations. Suddenly makes web services look
fun and agile. I didn't much like restlet, but this us wonderful. Demo
showed service exposing system properties. Really fast and easy.

Strangely Java EE 6 is chock full of lighter weight technologies,
without that bloated API feel of Sun's earlier enterprise offerings.
That, with glassfish, grizzly etc. looks like they're really getting
some religion.

\t : iPhone->you

JavaOne: The last day

As usual, the best, most mind-blowing talk today was a Groovy talk with Danno Ferrin and Andres Almiray on SwingBuilder and GraphicsBuilder. An impressive demo was a functional Twitter client written in about 700 lines of SwingBuilder & Groovy. The MVC layers were very neatly divided and the level of sophisticated interface behaviors (such as changing the cursor and graying elements with one simple declartion) was amazing given the terseness.

Some of the most interesting features are in Groovy 1.6, including a @Bindable annotation which you can apply to your properties and it dynamically generates full bean change support on anything which implements Observable. All of a sudden a *lot* of horrible tedious crap goes out the window. I think that provoked some gasps.

Also awesome was a talk by Mark Hansen on "Web Services with JAXB, JAX-WS, JAX-RS, and Ajax". Web services have really repelled me many times. It's just so bloody...complicated and horrible. This is SOAP I'm talking about, of course. He had a good slide showing the 5 stages of web services (i.e. Kubler-Ross, Denial, Involvement, Anger, Grief, Acceptance).

He did an excellent job walking through using annotations to bind the beans and create web services. He showed three approaches: code first, contract (ie, wsdl) first, and meet in the middle. He showed an impressive demo which used an ajax front end to hit a servic which aggregates searches against 3 shopping services with a mix of SOAP and REST.

Now I'm in a talk about Project Grizzly and Java NIO.

Thursday, May 08, 2008

del.icio.us beta extension for Firefox 3

Hot damn! Finally, the great del.icio.us Firefox extension is available for beta fun for Firefox 3. You can grab it here on the del.icio.us blog.

JavaOne Day 3

It's Thursday and this has become the thing I do everyday: I go to Moscone Center, and try to find the difference between 134 and EP 107-110, and avoid shaved headed guys in sweatshirts, and shagged haired guys with glasses, and all of them with backpacks, very few looking where they're going.

Today, a couple of sessions already:

  • An AWESOME grails & groovy talk by Guillaime LaForge, about replacing Java EE patterns with things like metaprogramming, and coding by convention. The most awesome thing was showing how the dynamic finders are implemented in grails. An example, is on your domain object you call (without defining) findAllLikeByNameAndAge, and grails dynamically generates a finder implementation using Hibernate. His argument was that you can replace ServiceLocators and DAOs both by moving the persistence methods onto the "domain" objects where "they belong".

    This is an argument from Eric Evans' Domain Driven Design, and the only qualm I have with it in this case is that the model classes in grails aren't really domain objects per-se -- they're really proxies for the physical tables. This is a great model for simple applications, but in my own experience isn't a replacement for more complex applications in which the domain model diverges from the database.

    I'm probably over-simplifying and it's a great idea. In any case, it makes me want to dive head-on into grails in a way I was never tempted with ROR.

  • A dull, but necessary update on the servlet 3.0 early draft spec.

  • Right now I'm in a session on "building the semantic web". It's the first one with more than 2 presenters. It's a kind of a panel. Henry Story, from Sun, is talking right now. He has an address book with a lot of urls representing all this information about people (like name) as urls. Great! "my name is http://blah.blah.com"

    He's mentioned that he was up until 4am last night.

    We such abruptly switched to a new speaker. He's talking about some social network site, twine.com. This isn't going to be very technical. I can feel it in my water.

  • This guy from AllegroGraph just showed a great demo of a big database of connected people and being able to query on people by what he did with them. The categories included "shook hands with", "talked with", "kissed", "was intimate with". He created a graph showing a circle of "who i kissed with and was intimate with and who was intimate with other people who were intimate with me." Someone made a joke about "needing virus protection".

    I found it funny. I think I've gone native.

  • This "Turning WTF Code into a Learning Experience" by William Pugh from U.of Maryland is really good. Lots of great and frightening examples. Mentioning the classic static final DateFormat bug drove me to dive into work code and finding one in recent code. Jesus. Also led me to find many many instances of it in other people's code at work. Will have to report this...

    I'm glad I abandoned the ponderous Composite Application Patterns talk (basically horrible ERP stuff).

Wednesday, May 07, 2008

Another Pretty Good JavaOne Day

Today's sessions have been on closures (neil gafter), the Minion
search engine, user experience, and now, the sexy, "jsr 303". It's
about constraints. I'm not sure what that means in this context, and I
could use google to find out but I'd rather be surprised.
I found the Minion talk to be most interesting, maybe because I'm the
least familiar with search engines and textual information processing,
NLP and the like. The most amazing thing was their demonstration of
"tag gardening" - using tagged documents to create taxonomies specific
to the content. They used the example of the last.fm site's collection
of tagged musical content and creating a taxonomy of Death Metal sub-
genres as a tree.

\t : iPhone->you

Tuesday, May 06, 2008

EclipseLink JavaOne presentation

Okay, I should have known, but this kind of sucks. EclipseLink is open
source TopLink, which is cool, since I use it constantly. The talk is horribly underdetailed and would be better aimed at managers. It's all high level, lots of buzzwords.

It's a feature list talk, pretty much.

Also, EclipseLink is the worst name, ever. The second half is on NetBeans. I may have to skip that.

The NetBeans talk was not good. This talk made me feel sad and shameful and dirty.

\t : iPhone->you

Javascript talk at javaOne

I don't use js at all, so learning that its really secret lisp or scheme was kind of fun. I like the functional programming and the prototype pattern, but in the end groovy or ruby (I think) provide the same sorts of opportunities without the nastiness of js.

Still, though, dojo and jmaki and prototype and jquery etc make it pretty cool and useful, clearly.

I'm less scared, at least.

\t : iPhone->you

Effective Java 2nd ed.

Joshua Bloch's talk was really good. This being my first year of being
at JavaOne for more than one day, I'd not heard him before. He covered
a little generics, enums, and lazy instantiation. The enum patterns
were pretty exciting, partly because I haven't done that much with
enums. He had a pretty nice pattern of using an enum to implement
Singleton. He had a great example using phases and transitions - solid
to liquid = melt, etc. and building a bunch of mapping of transitions
to source and destination phases using generics and Maps.

I'm waiting to hear about Javascript: the language we love to hate.
I'm curious, actually, plus it's taking over the world.

One sweet thing about Fortress is that it's another language built on
top of
Java, like groovy, scala etc. The Java platform's fast and clean
enough that it makes sense to write languages which compile into Java
source, allowing javac to handle the many sweet optimzations.

Also, making the language extensible through libraries is way awesome.
All that math stuff, I don't know. It's too much like math or something.

\t : iPhone->you've

Fortress

Fortress looks pretty good: functional, implicit multiprocessing.

I forgot there are a lot of dorks here with really bad manners. One
must walk very aggressively.

\t : iPhone->you

JavaOne Blogging: Day One

Sitting on steps inside Moscone North, watching general session on big
screen. Neil Young just thanked "Jaavuh" a bunch of times for helping
with his x-prize re-fueless car.

I have a pile of sessions today, including: Fortress, grails, Joshua
Bloch talk.

Lot of beanbags, lot of slouching geeks in sloppy clothes (duh).

I am wearing my Steve Jobs outfit - black mock turtleneck, jeans, no
hightops - so I look frigging awesome.

\t : iPhone->you

Friday, April 25, 2008

Dealing with Excel in the Java (with JExcel, in particular)

Just because you're an open-source snob and programming in Java doesn't mean you're free of Microsoft Orifice, particularly Excel. Because I do a lot of database related coding and stuff, I deal with Excel a lot. JExcel is a major lifesaver.


Just in case you don't know, JExcel provides an api to Excel spreadsheets. You can read and create xls files, deal with various structures you'd expect such as cells, columns, and rows, as well as Worksheets and formatting.

I know this isn't the only Java API for dealing with Excel files, and I'm sure others are equally wonderful. Apache POI is venerable and also sounds good, especially since it deals more generally with the OLE 2 Compound Document Format, which gives you more general involvement with those other file formats, such as Word and Access and other horror shows. Also the name is awesome.

JExcel's really clean object model also appears to be a lot easier to comprehend than the OLE specific POI api. For quick and dirty, there's little better.

Groovy also has Scriptom for dealing directly with COM objects, but you have to be running your code on Winblows (not that there's anything wrong with that).

The power of dealing with an xls file directly, instead of having to open and save to csv files endlessly is huge. On a recent project, I was able to construct some groovy code which downloaded via http the most recent version of a spec spreadsheet, and do a lot of complicated parsing of field names to generate sql. 

In a sense, this is all pretty trivial, but in the bread-and-butter existence of the Commodity Developer's life, the quality of life improvement is huge.

I'll try to provide some examples later.

Friday, April 18, 2008

Simple JS ORM for Gears

This is pretty cool: a very simple little ORM (object relational mapping) 'package' for google gears written in Javascript on Uriel Katz's website. The idea is incredible, and an ORM is essential if one is going to actually do anything not-painful with gears. After years of using ORMs in Java (okay, mostly Toplink -- but it's still better than nothing), I can't imagine having to do everything in straight SQL again.


Here's his post -- It's from last year, so it's not like I'm current on this kind of thing, obviously.

whoami

t
san francisco, California, United States
View my complete profile