Grails CAN HAZ REST 2! - No Fluff Just Stuff

Grails CAN HAZ REST 2!

Posted by: Andres Almiray on October 16, 2009

It surprises none that Grails can expose REST services gracefully and effortlessly, just watch how the masters do it in Mastering Grails: RESTful Grails. However making REST calls from within a Grails application is a task left to your own wits. Fortunately Groovy makes that task also a simple one, at least when it comes to GET, but what about POST or PUT? There are a few alternatives however:
  • Cook up your own REST library leveraging Apache HTTPClient, a common component used on the Java world.
  • Go one level up in the abstraction chain and use HTTBuilder, which relies on Apache HTTPClient.
  • Or simply type grails install-plugin rest.
That's right, the recently announced Griffon REST plugin has spawned a copy of itself as a Grails plugin. Provided behavior and configuration options are pretty much identical.

On a related note, a new version of the Grails J2D plugin has been released too. This release updates the plugin to GfxBuilder 0.2.1 (bye bye GraphicsBuilder!).

Feedback is always appreaciated.

Keep on Groovying!
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »