Uploaded today is a new WAR file that wraps the existing, generic Nextbus Java API with a
JSON Servlet adaptor. While the raw API might not be the very best starting point for a thin-client
UI application, the project itself demonstrates the flexibility of both the Adapter and further
Java 6 EE to build layered applications in very little time.
The Web Proxy itself consists only of four Classes: A Stateless session bean to makes the Adapter JAR
injectable to the Web tier, a Servlet configured with Annotations and some JSON support classes. Most of the heavy lifting during development was spent familiarizing with several JSON Serializers (Jackson, Google Gson, and others) as well as getting re-acquainting with jQuery and Ajax.
The WAR file deploys on both Jboss 6.1.0 and Glassfish 3.1.2. The WAR file DOES REQUIRE a Java 6 EE
profile, so if you want to try on Websphere or Geronimo you might need to do research.
Nonetheless, this is a very quick way to start some easy UI coding with JSON, as well as a study
case for exploring how you might build a highly scalable Transit user application with Java in
the backend, hosted in the cloud, and Thinclients everywhere on myriad platforms. This EE 6 project
is an excellent jump-off point for a more ambitious project if anyone is interested.
Uploaded today is a new WAR file that wraps the existing, generic Nextbus Java API with a
JSON Servlet adaptor. While the raw API might not be the very best starting point for a thin-client
UI application, the project itself demonstrates the flexibility of both the Adapter and further
Java 6 EE to build layered applications in very little time.
The Web Proxy itself consists only of four Classes: A Stateless session bean to makes the Adapter JAR
injectable to the Web tier, a Servlet configured with Annotations and some JSON support classes. Most of the heavy lifting during development was spent familiarizing with several JSON Serializers (Jackson, Google Gson, and others) as well as getting re-acquainting with jQuery and Ajax.
The WAR file deploys on both Jboss 6.1.0 and Glassfish 3.1.2. The WAR file DOES REQUIRE a Java 6 EE
profile, so if you want to try on Websphere or Geronimo you might need to do research.
Nonetheless, this is a very quick way to start some easy UI coding with JSON, as well as a study
case for exploring how you might build a highly scalable Transit user application with Java in
the backend, hosted in the cloud, and Thinclients everywhere on myriad platforms. This EE 6 project
is an excellent jump-off point for a more ambitious project if anyone is interested.
Base URL to the source is at https://sourceforge.net/p/nextbusapi/code/39/tree/trunk/webproxy/
The WAR file is at https://sourceforge.net/projects/nextbusapi/files/releases/
The quickest way to get it up is with Glassfish, as it starts very quickly.
Enjoy
-- Jim Doyle (Medford, MA)