Theory In Practice

HalBuilder 2.0.1 Progress

It’s been awhile since I’ve posted anything on the state of HalBuilder and where the project is going, so now that I’d started heading towards a release I thought it was about time I updated the blog about it.

The first thing to note is the Github source repository has moved to a new HalBuilder Organisation and split up into a set of 6-7 separate maven artifacts/git repositories:

  • halbuilder-test-resources
  • halbuilder-api
  • halbuilder-core
  • halbuilder-java
  • halbuilder-scala
  • halbuilder-kotlin
  • halbuilder-clojure

halbuilder-test-resources

A reusable set of HAL representations in both XML and JSON format to use in tests. This artifact is bundled using the maven-remote-resources plugin for easy reuse in other projects.

Currently this is the only 2.0.1 series artifact that has been released.

<dependency>
<groupId>com.theoryinpractise</groupId>
<artifactId>halbuilder-test-resources</artifactId>
<version>2.0.1</version>
</dependency>

halbuilder-api

Next up is the HalBuilder API artefact, under the 1.x releases this used to be the contents of the com.theoryinpractise.halbuilder.spi package.

There are two fundamental changes in the 2.0.1 series of HalBuilder:

  1. The base API contains no dependency on the Google Guava library, this means the things no longer return Optional<T> instances ( see the halbuilder-java module for this ).
  2. All classes/interfaces/methods with the word Resource in their name have been renamed to Representation to more clearly separate HAL from your actual REST API. HalBuilder is all about the representation of your resources, not the resources themselves.

halbuilder-core

The core HalBuilder library - this is 1.x restructured, and without any outgoing Google Guava dependencies.

halbuilder-java

The halbuilder-java module provides a simple “extension” class (com.theoryinpractise.halbuilder.java.Representations) containing Guava based extensions to the HalBuilder library.

halbuilder-scala

The new halbuilder-scala module contains implicit conversions providing idiomatic Scala extensions to the HalBuilder library. Similar to halbuilder-java only using Scala’s Option and closures.

halbuilder-kotlin ( coming )

The planned halbuilder-kotlin module provides idiomatic Kotlin extension methods to HalBuilder. The intent is to be a sister to module to halbuilder-scala only using Kotlin nullable types and closures.

halbuilder-clojure ( coming )

The planned halbuilder-clojure module provides idiomatic Clojure functions wrapping HalBuilder. Much like halbuilder-kotlin and halbuilder-scala - the intent is to provide support for clojure functions/predicates/maps when working with HalBuilder.

Releasing?

So far I’m pretty happy with the shape of halbuilder-api, halbuilder-core, and halbuilder-java so I hope to start releasing these artifacts over the next week or two unless something crops up, or someone reports some heinous design flaw…

Recent comments

Blog comments powered by Disqus