Bens Stuff

Thursday, May 27, 2004

JAI is a worthless piece of crap!

I have never seen a more user unfriendly API in my life. How the heck does Sun expect us to use it? For instance, to create a TIFF image from a byte array, I saw in an example that you use JAI.create("tiff", params). What are the options for the first parameter? Who knows, it's not documented anywhere. What about the second parameter? Again, who knows? You may be thinking, well look at the generated API-DOCS. Alright, look at this.
Parameters:
opName - The name of the operation.
args - The source(s) and/or parameter(s) for the operation.
Ok Sun, what are my choices for opName? What about param? It's just a ParameterBlock argument. For that we have the ability to "add" various objects of type "Object" and native types. What do they do and what are my choices?

I think this is an example of how not to create an API. I guess I have a couple days of ripping my hair out trying to figure it out...Google, here I come!

4 Comments:

  • Just reading your note in 'log stuff', but couldn't post a comment there. For an OSS JMS solution, check out http://joram.objectweb.org/ if you haven't already. Cheers!

    By Anonymous Anonymous, at 12:24 PM  

  • That's odd, it was like the rest of the HTML was missing. Anywhoo's I republished the blog and it's now working. I haven't tried any Open SOurce JMS solutions yet, but I'll take a look at Joram.

    By Blogger BenC, at 1:21 PM  

  • JAI has a pretty weird API. Once you get your head around it it starts to make some sense but it takes awhile and there doesn't seem to be any reason for it to be so convoluted.

    I wonder if anyone's used JAI for any real graphics applications. I'm not really sure that NASA counts since they have very unusual requirements.

    Did you see this?
    https://jaistuff.dev.java.net/

    Brady

    By Anonymous Anonymous, at 9:05 PM  

  • Cool man, I hadn't seen that stuff before, thanks. BTW, I've only used JAI for it's image conversion code; converting images from TIFF to PNG with the occasional resizing. I'm not talented enough, graphically, to really utilize the API. So for people who are, the API probably makes sense.

    By Blogger BenC, at 10:00 AM  

Post a Comment

<< Home