Replacing OpenGamma UI


How easy will it be to replace OpenGamma UI with our own UI technologies, what are the things, constraints(if any) that we should be aware of?



Yes, it’s really just a case of using our APIs. If you’re calling from Java, you can just use the (possibly) remote interface endpoints. If you’re using other technologies, you’ll need to deal with marshalling data to and from one of our data model encoding formats (selectable via your HTTP request header).

Our WebUI consumes mostly JSON via REST calls, so lots of endpoints produce that - other formats supported are binary Fudge, FudgeXML (which is a textual representation of a fudge message) and JodaXML, which is a cleaner XML format produced by the JodaBean project. Point your browser at http://localhost:8080/jax/components to see all the rest endpoints.

You’ll get the easiest ride with a Java interface (e.g. Swing/NetBeans/SWT). Fudge implementations are available for Python, .NET and C, although these will let you parse the messages, they won’t automatically build local domain objects.

There are some holes in terms of APIs to get lists of valid values for some types, so you may have to resort to the odd hard-coded list.


Thanks for the response Tim.

I was looking for the REST call to get the calculation results and came across this:

GET /jax/components/ViewProcessor/main/clients/{viewClientId}/latestResult => “getLatestResult”

Is this correct?

Also I think it will be useful to have some more documentation or tutorial around use of REST calls w.r.t Open Gamma components.


The message you received tells you the method name in the Java code that will be called (getLatestResult). The top of the page tells you the class name. The result type of the method will be used to generate the response message.

For example, the security source is defined as:
GET /jax/components/SecuritySource/combined/securities/{securityId} => “get”

Start examining the code at DataFinancialSecuritySourceResource and follow it through to DataSecuritySourceResource (the superclass) then to the “get” method. Looking at the source code, you can see that it returns the type Security. The actual type will be an implementation of that interface.

eg. http://localhost:8080/jax/components/SecuritySource/combined/securities/DbSec~1000 would be the URI to retrieve a security. If you point your browser at that URI (with a valid security ID which might not be 1000) then you should get back an XML trace. RESTful content negotiation chooses the response type between Fudge binary and XML.

I agree that it would be nice to have better documentation…