Book Image

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
5 (1)
Book Image

Java EE 7 Development with NetBeans 8

5 (1)
By: David R Heffelfinger

Overview of this book

Table of Contents (18 chapters)
Java EE 7 Development with NetBeans 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Generating RESTful JavaScript clients for our RESTful web services


In the previous section, we saw how to generate Java clients for our RESTful web services. A common scenario is to develop RESTful web services in Java and RESTful web service clients in JavaScript running in the browser. Just as NetBeans can generate Java clients, it can also generate JavaScript clients for our RESTful web services.

To generate JavaScript clients for our RESTful web services, go to File | New in a web application project, select the Web Services category, and select the RESTful JavaScript Client file type:

In the next step in the wizard, select Tablesorter UI from the Choose resulting UI dropdown to generate a complete CRUD application. The generated web application uses the Backbone.js JavaScript library. Checking the Add Backbone.js to project sources checkbox does exactly what is expected; if we don't click it, then backbone will be loaded from http://cdnjs.com, a popular Content Delivery Network (CDN)...