So, how do we create a REST client in a Spring based java application. It's easy, isn't it? All you do is make an http connection and read the results. Well, not quite. In this example I use a simple call to http://realurl.org as an example.
There is a rather cool little library that I think should be more widely used: The Syntax Highlighter from Alex Gorbatchev. ( https://github.com/alexgorbatchev/SyntaxHighlighter )
It helps when you want to include little snippets of code, xml, html, php, java, shell, whatever in your web pages. There is a separate Drupal module ( http://drupal.org/project/syntaxhighlighter ) which makes it very easy to use.
Here is an example from their demo page...It is an example of an html page.
I have received a review copy of "Spring Roo In Action" which is an Early Access e-book from Manning ( http://www.manning.com/rimple/ )
It will be interesting to compare this to the Spring Roo cookbook which I reviewed earlier this year.
A little while back I needed to create a simple server to supply some information to some local machines, and cache that information. I realised that it was probably a project I could use Spring Roo to great effect, and that it was simple enough to provide the basis for a tutorial. Here is that Tutorial
This article is kind of like "Meta Research". I'm not going to tell you how to process XML in Java, I'm just going to point you at some other cool tutorials which do. These are all by Lars Vogel. I strongly recommend his training material for its clarity.
Since the dawn of time (well since I started to process XML) there have been two styles of loading XML, and one main style of writing it. You either loaded up the whole file into memory (through "DOM" - the Document Object Model), or if you were fancy, or worried about running out of memory, you used SAX - the amusingly named "Simple API for XML".
Well I was interested to read Lars Vogel say "Both DOM and Sax are older API's and I recommend not to use them anymore.". He is of course saying that a number of techniques introduced in JDK 1.5 and 1.6 are now better than the old ways.
Spring Roo Add Ons: Typical Security
The idea behind Spring Roo is that you tell it what you want, and it gives you a Java and Spring framework for developing such a tool. Typically the app you are building is a website (though it doesn't have to be).
One of the most common features of a web application framework is some kind of role based permissioning mechanism. As well as the ability to store users details, we also want to store jobs (or "Roles") that users might do, and record which users are authorised for which roles.
Here is a review of a book I bought while still in "Early Adopters get the incomplete ebook" phase. Spring Roo Cookbook from Packt Publishing.
OpenGamma released a public version of their Risk Management software at the end of April and I've had a few weeks to read the docs, look at the code, run the tests, and basically play around with it. What I haven't done yet is generate a risk report.
Here are my first thoughts.
Disclosure: I am a London based contractor who has maintained Risk systems for several years. My aim in this is to help other London companies evaluate and use open source software for risk. I have no relationship to OpenGamma other than being interested in using their software.