Skip to main content

Every Angle

Posted by editor on March 18, 2009 at 8:02 AM PDT


And this is why you test and fix stuff

There are a couple of interesting messages featured in the Forums section that speak to an experience surely all of us have had: people using our software in unexpected ways. It's so easy to develop your APIs or applications with certain use cases in mind that you don't anticipate and handle uses of your stuff that, while perhaps syntactically correct, falls on its face when run.

For example, let's say you make an assumption about appropriate font sizes for a small screen, based on sample text. Well, are you accounting for other languages? Other character sets? Following up in http://forums.java.net/jive/thread.jspa?messageID=337596&tstart=0#337596, a long-running thread about bundling fonts into LWUIT apps, "browneye man" explains a problem using Chinese in a LWUIT app:

I've noticed that on my Nokia S60 phone, there are other applications that can control the font size at a much finer scale. I'm guessing that it is the Java VM that is putting the limit on font control. Can anyone comment on that? My application is a Chinese ebook reader. There are 2500 frequently used Chinese characters in the language. Because of the complexity of Chinese Characters, a font size that is too small is not readable. So if you imagine 2500 medium sized bitmapped Chinese Characters included with my jar, it takes too much space and too long to load.

Pointing out another edge case, ranboii realizes that JAXB can generate Illegal XML characters:

Apparently there are some XML characters that are illegal to have in the content area of an XML document, and there is no way to "escape" them to make them legal. For example, 0x1F is an illegal character. So if a java object happens to contain that character (which is legal in a Java string), JAXB will quietly generate invalid XML! Then when we try to unmarshal that XML back into an object, an exception is thrown. This means that the ability of JAXB to correctly marshal and unmarshal an object depends on what data happens to be in the fields of the object! That doesn't seem like a very safe or general solution.

Fortunately, LWUIT and JAXB are open-source (both are GPL), so if either or both of these are genuine bugs, they're likely to get fixed.


Also in today's Forums, mugambo could use some help understanding Federated Identities and SSO for web services. "Would really appreciate if some one can clarify how federated identities and SSO is achieved for web services. I know SAML defines web SSO profile but how does it work for web services. Also it defines how federated identities can be established like persistent and transient Pseudonyms but how can web services use them and which standards profile will it use."

billf points out the light-by-design GRIN scene graph in
Re: GRIN vs HAVI. "In Blu-ray, a GRIN-based menu, when obfuscated (which reduces the size and the load time somewhat) a typical xlet comes in around 100K, and has an acceptable load time on even the slowest players. This model of bundling the library with the xlet has worked well, largely because we were very strict about keeping the size of the library and the number of classes it contains to a minimum."


In Java Today,
Rakesh Menon has posted a new demo applet to the JFXStudio, showing off JavaFX Light Effects. "JavaFX provides many APIs for Lighting effects. There are also different light types such as DistantLight, PointLight, [and] SpotLight. As you might have noted, there are many attributes available in each of these classes to control the light. We may not be familiar with the details of those attributes. But we still would like to use the APIs to generate light effects."

Release engineer Xiomara Jayasena has posted a new blog explaining the JDK Build Process. "The goal of Java Release Engineering is a reliable, reproducible and consistent build process. [...] The following is a representation of the build process for JDK7." The blog describes the different Mercurial repositories that make up JDK and how they integrate with one another.

This week's Aquarium webinar is on OpenSSO, the open source project that provides enterprise-quality infrastructure to implement single-sign on. Sid and Ajay will present a technical overview of OpenSSO and then will explain how it is being used in a real-world deployment. The presentation will end with a roadmap for the features in future releases of OpenSSO. Presentation on Thursday, March 19th, 11am US Pacific, at TheAquarium Channel. Full details (and recordings) at the Show Page.


In today's Weblogs, Jean-Francois Arcand introduces the Atomosphere project with Getting started with Atmosphere CPR part 1: Writing the HelloWord of Comet....a Chat application. "Time to get started with Atmosphere CPR (Comet Portable Runtime)! In this first part, I will describe how to write a chat application and deploy in on Tomcat, Jetty and GlassFish."

While he's admittedly not enthusiastic about using Windows as a build server, John Ferguson Smart has some tips for Installing Hudson as a Windows Service. "Hudson has a very convenient feature designed to make it easy to install Hudson as a Windows servers. There is currently no graphical installer that does this for you, but you get the next best thing - a web-based graphical installer."

Finally, Arun Gupta continues a series of recent JRuby-on-Rails-on-GlassFish blogs with
TOTD # 74: JRuby and GlassFish Integration Test #5: JRuby 1.2.0 RC2 + Rails 2.x.x + GlassFish + Redmine. "The next set of tests ensure that some commonly used open source Rails applications can be easily run using this setup. The first one is Redmine - 0.8 is the stable release now. Redmine was first tried on GlassFish a few months ago. The steps have simplified since then."


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

And this is why you test and fix stuff