RAML webapp experiments

Technology

 

The last months a customer has been moving functionalty from native Android and iOS into HTML5 in webviews, both on a REST backend. The updated technology stack has however not really changed the way apps are developed at this particular customer

  • back-end and front-end developers working on multiple projects at the same time
  • seperate HTML5 (AngularJS) and REST-service (JAX-RS) apps (deployet to seperate machines)
  • short time allocated for documentation

and so development progress has been slowed down by various issues, amoung them

  • (mis)communications delays
  • additional context switching
  • configuration issues, especially with cookie authentication.

blogg

And thats completely normal. But I feel we could do better – the customer has some app rewrites (from scratch) coming up – would it be possible to improve the development process using new tools and skills?

How would I design a HTML5+REST system today, and, how much effort would it take a back-end developer like me to learn the necessary skills?

The HTML5-app and REST-backend builds obiously need to be combined in a single build (war). The REST API needs to be shared between them. Enter Maven plugin for Yeoman and the RESTful API modeling language (RAML). So we will have a single Git project with

Would it work? To investigate, I generated a sample JHipster project and reimplemented the default services from a RAML file. This required me to learn

And the result? A working project sample on github :) Conclusions:

  • Auto-generating JAX-RS java code works well
  • RAML AngularJS service generator tool generator-ramlang still needs some work
  • Spring REST and JAX-RS can coexist
  • JHipster is an interesting project, but I’d like some more options on the project generator

So it is possible to learn basic web development in a couple of weeks – the amount of new concepts can be staggering at first, but with support of a style-guide, most of what you do is to output HTML elements and thats quite managable – thats just programming. Even limited knowledge will get you a long way in terms of not relying on another developer for fixing simple issues. RAML is really not that hard, and advanced at the same time – dedicating a couple of days of time will get you a long way.