title: Is there a way to generate boilerplate code for RESTful stacks?
body: <p>As I get more into RESTful APIs, the (good) simplicity of the approach means that you generate a LOT of boilerplate code, and code that has to match in three or four different places, e.g. for a Jersey-based stack:</p>
  
  <ol>
  <li>HTML on the web page which provides controls (a button <code>Create Foo</code>)</li>
  <li>JS on the web page which formulates the JSON and the request to create a Foo</li>
  <li>A <code>FooRest</code> class method to handle the request and create a Foo</li>
  <li>A <code>Foo</code> class to instantiate, which will manipulate the data structure</li>
  </ol>
  
  <p>Are there tools which provide a starting point for some or all of this code automatically, possibly starting from something straightforward like a JSON data structure? E.g., provide:</p>
  
  <pre><code>card: {
    methods: [GET],
  }
  handOfCards: {
    methods: [GET POST PUT DELETE],
  }
  </code></pre>
  
  <p>and at the very least end up with Ajax requests, CardRest and HandOfCardsRest classes with the specified methods stubbed out, and Card and HandOfCards classes with properties or getters/setters?</p>