Platinum Solutions Corporate Website


Frameworks

Rumors and mysteries

A company called GemStone Systems, who's focus is enterprise and performance, has a teaser site that's got a few people talking...

Ruby that scales™

http://ruby.gemstone.com/

What are they up to over there? Not sure yet, guess we'll have to wait for RubyConf '08... but it could be interesting.

Groovy, Grails and a Common Cliché

I just got home from another Getting Started with Grails presentation. After using the framework for about six months, I still can't get over how easy it makes developing web-based Java apps.

Adobe Apollo

http://labs.adobe.com/technologies/apollo/

What does the new Adobe Apollo framework and runtime spell for future Swing development? With soo many people out there who already know flash/adobe products Apollo could capture quite a bit of the market.

This is not to say Apollo will replace enterprise level Swing devlelopment... but maybe it can? Send some simple requests to a smart backend server on the enterprise that does the heavy work and returns results to the view??? (leave comments)

Wicket Tutorial

It almost makes me shudder to think about how many people are going to be gunning for that little X in the top right corner of their browser window once they realize this post is about yet another web framework. BUT WAIT! This one is different, I swear. That’s what they all say right? But it’s the truth. Wicket is different, and if you spend a little time with me, I’ll show you how.

What Makes Wicket So Different?

Part of Speech Tagger Demo

I’m currently investigating “part of speech” taggers (commonly referred to as simply POS taggers) and came across a relatively new Java API for POS tagging developed by the Stanford Natural Language Processing Group.  What I really like about this API is its simplicity - other POS tagger APIs have not been as simple.  However, it is understandable that many POS tagger APIs are complex because POS tagging, while relatively simple for us humans, is not easy for software.

A Case of Blob Indigestion

On a recent project I had to persist image features into a database to be used on a content-based image retrieval (CBIR) system. These features included the following:

  • Color - represented as histograms for each color band; each histogram consisted of 256 float numbers.
  • Shape - represented as 127 Fourier coefficients (complex numbers).
  • Texture - represented as an array of the top 60 peaks locations (and sign) on a 128x128 wavelet decomposition grid; the wavelet decomposition is performed in each of the three color bands.

I normally do my modeling in terms of object orientation first. I created an ImageFeatures class which had references to other classes such as Color, Shape and Texture. Each of these classes ended up holding a primitive array of float numbers for the corresponding feature data. That's all well and good. Pretty simple stuff.

Strut validation wipes file upload field workaround

Given a struts action form that contains file upload field and server side validation is turned on. If the form does not pass the validation test and is returned back to the inputting jsp page, the upload file field will no longer contain the value that the user had inputted. This can be frustrating for the user. (In my situation, I had a few file upload fields and user had to re-enter all of them if the form does not pass the validation test, even if the error is not on the upload fields)

After searching on the web, I found that the upload field itself is does not take any default value. And because of security reason, values can not be force into the upload field by javascript.

Workaround:

In my action form, I added another FormFile variable and a String for storing the filename.

protected FormFile uploadFile;

protected FormFile uploadFilePrev;

protected String uploadFilenamePrev;

public void setUploadFile (FormFile uploadFile) {
    this. uploadFile = uploadFile;
    if (uploadFile.getFileSize() > 0) {
        this. uploadFile Prev = uploadFile;
    }
    if (this.uploadFilePrev != null) {
        this. uploadFilenamePrev = this. uploadFilePrev.getFileName();
    }
}

In the jsp:

<c:out value="${myActionForm. uploadFilenamePrev }" />
<html:file property=" uploadFile "/>

With this, the file previously selected is saved and the filename can be displayed in the jsp. Note that you need to account for the previously selected file in your validation code.  

Introducing Mule: An ESB Framework

There has been a lot of talk lately about agencies wanting to move towards the development of enterprise applications under a Service Oriented Architecture (SOA). However, moving forward with this initiative poses a fairly large problem: How do we integrate all of our different applications under the umbrella of a large SOA? In order to do this, there needs to be some type of communications framework to provide your old and new components with the ability to interoperate as an enterprise system. This is where Mule comes into play.

Mule is a message passing framework based on the Enterprise Service Bus (ESB) architecture. It is based upon the concept of UMO’s (Universal Message Objects). UMO components are your business objects. You may think that the UMO appears to be a Mule-specific component; instead, they are simply POJO’s that sit between application that receive and process messages. In order for a UMO to process these messages, we must have a means of communication that will connect an application to a specific UMO component. In Mule, this communication is facilitated through message endpoints. Similar to your stubs and skeletons in CORBA, these endpoints contain all information necessary to interface technologies such as JMS, SOAP, Xmpp and many others.