Apr 01
In my project, Xml2Java, I had need for a code that checks reflection information, specifically methods and fields, and operates on relevant ones. For example, I wanted the code that analyses the elements and attributes of a complex element to work only on getter methods, that is, methods that begin with “get” or “is” and return a boolean.
At first, the code looked like this:
for (Method method : clazz.getMethods()) {
if (method.getName().startsWith("get") ||
(method.getName().startsWith("is") &&
method.getReturnType().equals(Boolean.TYPE))) {
// do stuff
}
}
Continue reading »
Feb 01
I’ve read in Vinny Carpenter’s blog about how he used XMLBeans and was thinking to myself that this is exactly the sort of thing Xml2Java (note the name change) is there to help with.
It is true, however, that Amazon had provided an XSD for him to use, which made it easier to use some generator. This is what XSDs are there in the first place, and Xml2Java does provide a method of extracting an XSD from your bound classes.
However, generating classes automatically from an XSD often creates a cumbersome layer of data access instances. These always seem badly designed and cumbersome because XSD files are not there to reflect a programming language class structure, but a data structure. Xml2Java comes to help you bind the well-designed XML data files to your well-designed Java classes.
Now, I realise that Xml2Java is in its beta phase and might have not been the choice for Vinny’s friend; it won’t be in the beta phase forever though, and the more feedback I get, the faster it will get released!
Jan 24
I’ve written about it before, the importance of where you host and I’ve just had enough with SourceFourge’s slowness. To check the status of my project I need to wait for a few full minutes before I begin to log in. Try to imagine my nightmare when working with the issues system.
The need for a faster web site, and wanting to switch to Subversion, which is better for on-the-move developers, showed me I had to pack my stuff and leave SourceForge. It gave a good service - But it gave a better service a few years back.
I’m thinking of switching to JavaForge, “the sourceforge” of JavaLobby, or to Tigris, the home for engineering tools (including Subversion itself).
I’m not sure which is best, as I don’t know the two services. I’d appreciate any tips!