Home

The Affable Bean application with HTML5 front-end

This project shows how traditional server side application written using Java EE can be split into server side and client side part where client side part is written purely using HTML5/CSS3/JavaScript.

The original tutorial can be found at http://netbeans.org/kb/docs/javaee/ecommerce/intro.html. If you want to run this project you should follow the tutorial parts which setup MySQL database and populate it. Once the database is up and running and registered in the IDE you should have no problems running this project. NetBeans IDE 7.3 and GlassFish 3.1.2.2 are the recommended tools to use.

Project has two top level directories: server and client.

Server part

The server folder contains slightly modified version of the original Affable Bean app. The changes are:

  • rest package added with two rest services
  • rest/filter package added with CORS filter
  • web.xml uses Jersey REST servlet

Client part

The client folder demonstrates how client can be written using AngularJS framework. Check app/js/services.js if you need to adjust URL to your REST service. There is also an option to use offline static files instead of connecting to remote REST service. Similarly you may need to update test/unit/controllersSpec.js.

Download

If you prefer you can download a snaphost of the sources: https://bitbucket.org/dkonecny/affable-bean/get/tip.zip

Questions or problems?

Do not hesitate to contact me at dkonecny@netbeans.org.

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.