Java REST Options

REST with or without a Web Container

CXF2 or RESTLet or RESTEasy or JAX-RS (Jersey) or DropWizard or Spring Boot or …  There have been an number of options for a while.   Spring Boot and Drop Wizards

are very cool because of the simple deploy and lack of need for a cumbersome EAR or WAR deploy to a JEE server.  DropWizard also

has a ton of features and built-in metrics.  Resthub is very cool too, but not well supported.  JAX-RS works nice if you use Glassfish +

NetBeans 7.4 + JEE 7.  Since that lets you create REST client and server and the client can be HTML5 and is mostly generated for you.  It

will also build REST services for you from existing entities or relational tables.  I wish it had a wizard to do that easily from NoSQL

entities.   NodeJS has a nice REST client.   Also you can try your hand at developing REST in NodeJS or Cujo REST.   A REST client from JavaScript is easy, here is

a nice article on RestJS with Spring.


Spring Boot


mvn archetype:generate -DarchetypeGroupId=org.resthub -DarchetypeArtifactId=resthub-jpa-backbonejs-archetype -DarchetypeVersion=2.1.4

mvn jetty:run


Other Links



Cool Links of the Day – Build Your First Mobile App with PhoneGap Build

Nullzzz – FRP, Bacon.js and stuff: Bacon.js Tutorial Part I : Hacking With jQuery

raimohanska/bacon.js · GitHub – Synchronising Multithreaded Integration Tests revisited – Task.js Asynchronous Tasks In JavaScript

Understanding Java Garbage Collection and what you can do about it – YouTube – Algorithm of the Week: Shortest Path with Djikstra

MongoDB – Updating Records – CodeProject – Sencha Touch 2 Stores – Editing Model Instances and Reverting Changes – String Utility Classes in Java – 5 Talks To Learn More About Node.js – JPA/JPQL: Intermediate Queries with @NamedQuery – How RESTful Is Your REST?

Native Win32 ports of some GNU utilities

UnxUtils | Free software downloads at


Node.js for Production

Coding Guides

Book Review: Testable JavaScript

 Testable JavaScript Book Review

Testable JavaScript

By Mark Ethan Trostler
Publisher: O’Reilly Media
Released: January 2013
Pages: 274


Chapter 1 Testable JavaScript
Chapter 2 Complexity
Chapter 3 Event-Based Architectures
Chapter 4 Unit Tests
Chapter 5 Code Coverage
Chapter 6 Integration, Performance, and Load Testing
Chapter 7 Debugging
Chapter 8 Automation
First off, I want to say this is one of my favorite books. It is a great work on developing with TDD and agile with a focus on JavaScript. I am considering buying a print copy
to keep next to my computer with the GoF, Growing Object Oriented… and Release It! I am big believer in the main aim of the book to keep javascript code simple and
loosely coupled. This is not a book for those who don’t know JavaScript or have some background in Test Driven Development.

The book starts with a nice section on agile, TDD, BDD , the why’s, what’s and how’s of all the best practices for modern development. There is a very thorugh discussion of a
number of great development tools including: JSLInt, JSmeter, JSCheckStyle, YUIDoc and JSDoc. This book is great for Java developers wishing to start doing enterprise level
JavaScript on the client and server and in-between (Meteor / Derby).

I like this book also for it’s thorough coverage of best modern development practices: Code Reuse, Coupling, Metrics, Dependency Injection, auto documenation (think javadoc),
formalized softwtare inspections, coder coverage, fan-out/fan-in nd more agile practices.

One of the other strong topics in the book is Event-Based Architectures / programming. Event-based programming is great for decoupling objects. There is also great information on using and Event-Hub and as well.

Testing Topics from the Book

  • vows
  • isolation
  • scope
  • mock objects
  • positive and negative testing
  • PhantomJS for testing
  • stubs
  • spies
  • asynchronous testing
  • running tests on the client and server side

Cool Tools from the Book

Links from the Book



Links of the Day

Node.JS Links


OpenShift Spring WebApp / Tomcat

OpenShift Express / Node.js




Mongodb on OpenShift
HibernateOGM / Mongodb On Openshift
Redmine (Ruby on Rails implementation) – project management SAAS
Android REST Client



Raspberry Pi and Development

Here are some links I have found useful in setting up my Raspberry Pi machine for development and more.
Raspberry Pi
Raspberry Pi on My TV



Development on Pi
C-64 Emulator (Games)
Java on Raspberry Pi


Some Useful Updates via Raspian/Debian
sudo apt-get update
sudo apt-get install eclipse

Java library for Raspberry Pi
Java Library for RPi (Pi4J)
JVM on Pi
Oracle JVM Downloads
JDK1.7 on Pi

General Raspberry Pi Usage

Node.JS on Raspberry Pi
Scala on Raspberry Pi

Installing the TypeSafe Stack


Node.js Development on Windows with WebMatrix 2

Having found the excellent TOAD for MongoDB (and other NoSQL), Windows is starting to be an okay development platform.  Not as good as Mac or Ubuntu, but not bad.  From Eclipse to SBT to GIT to BASH, everything you need for Node.JS, HTML5, Mobile, NoSQL and Cloud PAAS development is available.

WebMatrix 2 lets you edit JavaScript, Node.js with, HTML5, CSS, Less, CoffeeScript, Images and connect to MySQL.





Great Extensions






Linked List

Graphic Display of Nodes in a linked list (with bacon data)


Linked List in UML


Linked List in Pseudo Code


Linked List in Node.js (Javascript)

An implementation in Javascript.  A linked list of buffers in Node.js.  A great set of implementations for Javascript.  A computer science implementation of JavaScript.  Also a nice insertion sort in Javascript.


Linked List in Java

Java has built in Lists.  An implementation of the Singly Linked List.


Linked List in Scala

Scala has built in Lists.  A Scala list from scratch.


Linked List in Groovy

Groovy has built in Linked Lists and other Collections.

RosettaCode, An awesome site listing implementations in many languages, this is a link to linked list.




Node.js and Mongodb Links

Test Driven Node.JS Development

What would a language and framework be with unit testing, BDD, and other testing methods, frameworks and systems?

So once you get beyond casual Node.JS development, you will need to start unit testing.  Node.js has a surprisingly robust and mature set of testing tools and options.  Out of the box, Node.js has Built In Assert which will let you do some basic XUnit style tests.   A step beyond that is NodeUnit, which is pretty easy to use for XUnit oriented people.  For me, it’s easy to pick up coming from doing a lot of JUnit tests.  This article is great for Using NodeUnit for Testing.  Node.js is great because so many people have developed tools, frameworks and utilities for it.  The only issue I have it some are not very mature and the options are so fragmented.  There’s no Spring framework or hibernate that garners massive usage.  So many variations and options, I wish they could work together to put together a killer Rails or Spring type group of mature, tested, interconnected tools and utilities.  Full Testing Suite – Mocha is installable via NPM and works with a CI server.  This one is pretty cool.

The source for everything testing/bdd/mocking for Node.JS is Joyent’s Testing Wiki.
There’s a number of behavior driven development tools including the polyglot tool Cucumber -> BDD Testing Tool – Cucumber.JS.  Another option is Asynchronous BDD Testing Tool – Vow.
For mocking,  Mockito Style Mock Objects – Mary Jane, looks great.   I will hope that maybe Mockito will officially support this one.
For JQuery fans, someone has ported QUnit to Node.JS [Node-Qunit]
This is just a sampling of test options.  Obviously tools like Selenium and Firebug will help you and so would JMeter and and SOAPUI.  A lot of general web testing tools are available that can do full system testing or integration testing for your Node.JS web apps.
I will be adding some examples in a future post with a github link.

Node.js and JavaScript Links

OAuth for Node.jS
Backbone hackers guide
Realtime multiplayer game in html5
Cloud Control Hosting
Deploy Node.JS to Staging
Mod Player
Node.JS Stack Trace
JavaScript Terminal
JavaScript Test Runner

Nodester Node.JS + Express + Mongo App Part 1 – Nodester

The Running Node.JS Application on a Nodester


I am still working on putting up a full application for the tutorial.  Also I will try the same application on Nodejitsu, CloudFoundry and Heroku.

The following are the basic steps for working with Nodester. It is very similiar to all the other command-line PaaS interfaces. I am running this on
Windows, but it will work in most environments.


npm install nodester-cli -g
nodester user setup <username> <password>
nodester user setkey
nodester app create <appname>
nodester app init <appname>
nodester npm install express
nodester npm install mongoose
nodester npm install

git add .
git commit -am "Ready to deploy"
git push nodester master

nodester app info
nodester app stop|start|restart
nodester app logs

For nodester they push to master for Nodester to get a new build.

Log into your Application List Page on the Administration Site for Nodester and you will see your newly added Application. Nodester has a good help system that will be useful to you while learning. The git commands are standard GIT which makes using all the cloud systems pretty similiar.

After uploading, I check the logs for errors:

nodester app logs
nodester info Showing logs for: rollerderby
New PID: 18884
Spawing /app/server.js
Running node v-0.8.1
:: nodester ::

App listening on port 19885

nodester info ok!

nodester deployed


I used there out of the box example and added a connection to my test mongo db database at MongoLab.


Link Section:

The final deployed application from this tutorial

Restify with Mongodb and Mongoose (src)

Backbone.js Boilerplate

Node.JS Mongodb Native Driver

Mongoose Driver

Mongoose Tutorial

Node.JS and Mongodb Video Tutorial

Node.JS / Mongodb / Mongoose Tutorial

Finding Documents in MongoDB with Mongoose

Node.js Tutorial

Restful API with Node.js and Mongodb + Expresss & Mongoose

Backbone.js Fundamentals

Mongoose Model Definition

ETE Presentations

Chariot Solutions Presentations / ETE Presentations

Chariot Solutions Emerging Technology Philly ETE 2012 Screencasts

Chariot Solutions Videos and ETE Videos

CoffeeScript Edge

Emerging Languages

StratisfiedJS (Structured JS)

Large Scale Agile

Spring ROO with Addons

Backbone.js / Real-time Web Apps

Rich-Web Apps with Server Side Java

Vaadin Java Framwork

Interesting Stack (Backbone, NodeJS, Restify, MongoDB)

Dependecy Injection

HTML5 Apps with Java and Scala with Play


Massive Scaling

Lean, Kanban and Large Scale Agile

Let’s Play TDD

Cross Platform Mobile Experience

Real-Time Web Apps with Backbone

Better Agile Through Tribes

Java EE in the Cloud(s)




Grails 2.0

JavaScript Testing / BDD

Android + MongoDB + Node.js (in progress)

Mobilize Your MongoDB

MongoDB with Morphia 

LinkedIn’s Platform

Node.js at Heroku

VMWare Player for Cloud Foundry

Cloud Foundry





Main Documents

MongoDB Manual

I have MongoDB and RockMongo installed on my OpenShift PaaS site with JBoss.

JBOSS + MongoDB Quick Start

MongoDB + Java Tutorial on OpenShift

MongoDB Driver for Java (JavaDocs)

MongoDB + Android Part 1 + PaaS

Spatial MongoDB in OpenShift

SoLoMo (social, local, and mobile)

Geospatial Indexing in Mongo

MongoDB Shell on OpenShift

MongoMonitoringService (MMS) on OpenShift PaaS

MongoDB Native Driver for Node.js

MMS Manual

MongoDB Free on OpenShift

MongoDB Tutorial

BinaryJSON (Primary Data Representation for MongoDB)

SQL to MongoDB Mapping Chart

MongoDB Quickstart

Performance Tuning

Java Driver

Webinar:  Zero to MongoDB Intro for MongoDB with Java 

Mongo Tutorial

Slides and Videos


MongoDB + JavaScript

MongoDB + Java

MongoDB + Hadoop

ORM Node.JS for MongoDB

New MongoDB Docs

RHC / OpenShift Starting