Wednesday, December 30, 2009

Random ideas for XINS and Logdoc

Here's a random list of possible enhancements to XINS.

First, a couple of changes that would make it much easier to configure an IDE (such as Eclipse or NetBeans) to work with XINS:

  • Move all Java source code to src/java/; currently it is spread out over src/java-common, src/java-client-framework and src/java-server-framework. Still, the JAR files can remain the same.
  • Put the generated Java source files also under src/java/, such as the Log and TranslationBundle classes.
  • Put all generated class files under build/classes/.
  • Make the Library classes detect the XINS version at runtime, instead of using a text replacement technique to modify the source code before compiling it.
Then some ideas on Logdoc:
  • Split out Logdoc from XINS. It's not needed inside XINS, all it needs is a JAR file and some Ant tasks for generating some stuff (like the Java source files and the documentation).
  • Make it easy to plug in a different logging library. Currently, Logdoc generates Log4J code, but it should be fairly simple to make it generate code for other logging libraries. It doesn't mean Logdoc should actually implement this, but it would at least facilitate it.
To be continued.

Monday, December 28, 2009

XINS 3.0-alpha1 tagged (fork at Github)

Just now I've created a tag for XINS 3.0-alpha1 in my XINS-fork at GitHub:
From a runtime-stability point of view, I expect this release just works, even if it is tagged as an alpha-release. At least for me this branch has been running in production for a couple of years now.

However, do note that from a development perspective, a lot of things may change before this goes into (or becomes) an official XINS 3 release. This requires agreement with other involved parties, especially Anthony Goubard (official XINS maintainer) and Online (copyright owner of most of the code).

Some of the things still high on my TODO-list:
  • get rid of all deprecation warnings by either resolving or suppressing them, depending on what is more appropriate
  • further change the code to use type-safe collections where possible, using generics
  • merge with official XINS 2.x changes

Command line input in Java


Today, someone introduced me to Spring Roo, which has quite some similarities with XINS at first glance. I really like the command line shell interface Roo has, featuring unbuffered text input, completion and fancy colors. I know it's not even close to a rich IDE like NetBeans or Eclipse, but I love command line tools for their productivity and simpicity.

Looking at some documentation, the text-based shell interface is implemented using these technologies:

  • JLine - Library for handling console from Java, unbuffered.
  • JAnsi - Library for using ANSI escape sequences to format console output.
  • JNA - Windows-specific library for displaying colored output on Windows-systems.

Both libraries work on Windows, Mac OS X and Linux/UNIX-systems. Definitely worth considering in case you want to implement a console application in Java.

PS. Upon further inspection, Roo is very different from XINS, though. Roo is an aspect-oriented build-time code generator/manager that generates JSPs, Spring code, Java plumbing code (such as toString() methods), while XINS is an RPC-oriented component technology framework that also has (optional) runtime components (both client- and server-side, if you wish).