Stringtree and Mojasef now on GitHub

It’s been a long time coming, but I have finally decided that the master source code of the Stringtree and Mojasef Java libraries will now be hosted at GitHub rather than Sourceforge. I have been using git to manage the rest of my software for a long time now, but my two main projects have …

Continue reading ‘Stringtree and Mojasef now on GitHub’ »

Ruby, Sinatra, Dreamhost, Haml, git – a smooth web app workflow … eventually

I have spent many years developing web applications in Java for corporate clients. During that time I have used a wide range of frameworks, APIs and other useful stuff. I have written my own versions (sometimes several) of many of these components, learned the tools well, and become very productive and effective. However, it has …

Continue reading ‘Ruby, Sinatra, Dreamhost, Haml, git – a smooth web app workflow … eventually’ »

Stringtree/Mojasef for Java 1.4 are now proper branches

A few months ago I made the decision to move the Stringtree and Mojasef code-bases on from their requirement to support older Java versions. I tagged a particular version of the code as “1.4 final” and proceeded to work through the trunk code in the repository to bring it in line with key Java 5 …

Continue reading ‘Stringtree/Mojasef for Java 1.4 are now proper branches’ »

Test-Driven Development of HTTP and REST interfaces with Mojasef

Test-Driven Development (TDD) of HTTP and REST interfaces can be tricky. This post contains some examples of how to do it using the open source Mojasef toolkit. I was prompted to write this post after recently finding and fixing an irritating bug using just this technique. First, let’s set the scene. In TDD the rules …

Continue reading ‘Test-Driven Development of HTTP and REST interfaces with Mojasef’ »

A kind of answer to “Is it time for Java 5?”

A week or two ago I wrote asking Is it time for Java 5?. I got a few answers, but nothing definitive. Today, however, I stumbled upon a blog post from Alex Miller which helped me decide. Apparently, Java 1.4 will officially reach its end of service life (EOSL) at the end of October 2008. …

Continue reading ‘A kind of answer to “Is it time for Java 5?”’ »

Is it time for Java 5?

A major goal of the Stringtree software project has always been to be as compatible as possible with all the software people are using for their Java development. Naturally that also includes whatever Java version is being used. For a long time I interpreted this goal as implying that all Stringtree code should run on …

Continue reading ‘Is it time for Java 5?’ »

Slight Improvement to Stringtree XML Parser

Someone just pointed out that the light-weight XML parser included in Stringtree did not handle explicit CDATA blocks. The version in SVN now has provisional support for this. If you need a simple and fast parser for textual data, then this should be all you need. For XML documents containing opaque binary data in a …

Continue reading ‘Slight Improvement to Stringtree XML Parser’ »

A Simple HTTP Client – Part 1 (Overview)

This post is the first of a series describing the use and implementation of the Stringtree HTTP Client. Recently I have been working with systems which talk to each other using REST/HTTP. Providing services and resources is pretty simple using Mojasef, but accessing such resources and consuming such services (in client code and in tests) …

Continue reading ‘A Simple HTTP Client – Part 1 (Overview)’ »

Stringtree Maven Repository

I have experimented with Maven a few times, but never been particularly impressed. Recently, however, one of my users has been bugging me to make the Stringtree and Mojasef classes and sources available in a Maven-style repository, for easier integration with Maven (or Maven-like) build tools and workflows. So I have done it. The current …

Continue reading ‘Stringtree Maven Repository’ »

Mojasef goes into beta at last

Finally, I have got to a point where I reckon Mojasef is nearing a proper numbered stable release. To celebrate this I have updated the version number in the Mojasef source code to 2.0.b1 and made a downloadable release (source and jar) available at Sourceforge. I strongly encourage anyone interested in shaping the direction, contents …

Continue reading ‘Mojasef goes into beta at last’ »

Stringtree 2.0.9

It’s been a month or so, so it’s time for another release of Stringtree. Changes in this release include: fixed some broken EasyTemplater constructors added switchable prefixing of attributes in XMLReader added switchable forcing all values to lists in XMLReader added storing cdata from mixed elements as “text()” in XMLReader added extra “read” methods to …

Continue reading ‘Stringtree 2.0.9’ »

Demo Friki currently out of action

I have just been informed by my hosting provider that they have had to disable the Java support on the server running the example Friki. Apparently this is due to too many applications from different users clogging up the stderr logs. I won’t be able to re-enable Friki until I have ensured that it does …

Continue reading ‘Demo Friki currently out of action’ »

Read JSON from a CharacterIterator

I just had a pleasant email exchange with someone who is interested in embedding Stringtree JSON in another project. In this particular case, the basic functionality of the JSONReader is fine, but the calling API was not quite aligned with what they need. So now, as well as reading JSON from a String, you now …

Continue reading ‘Read JSON from a CharacterIterator’ »

A Mojasef improvement prompted by thoughts of Spring

Following on from my post a couple of days ago I’ve now added a small extra feature to Mojasef which should add a whole range of extra power. One of the things it enables is a much closer integration with Spring, but that’s only a small part of the possibilities. The way this new feature …

Continue reading ‘A Mojasef improvement prompted by thoughts of Spring’ »

Integrating a Spring context with Stringtree

I don’t tend to use it myself (preferring the “spec” mechanism built-in to Stringtree), but today someone asked me if a Mojasef application could work with Spring. After a bit of thought, some downloading, and a little playing, here is the result. My intention was to allow beans configured in a Spring application context to …

Continue reading ‘Integrating a Spring context with Stringtree’ »