AngularJS, HTML5, Groovy, Java and MongoDB All Together - What Could Possibly Go Wrong??
This year I’ve been giving an evolving live demonstration of coding a Fully Buzz Word Compliant, mobile-friendly web application. The aim of the demo is to show, via a real-world application rather than snippets or a toy example, where these popular technologies sit in your architecture, and how they interact with each other.
The code is available on GitHub. You’ll see there are a number of different branches for the different versions I’ve presented. The current one is the NoSQL Matters version. With all the branches, the commits correspond to the user stories in the slides, so you can get a feel for how the code builds up throughout the demo.
I’ve also presented the talk as a series of short, follow-along lessons. You can get 40% off the price with discount code VDEAL40.
In the demo I don’t get much of a chance to go through the Groovy script I use to import data into MongoDB, so I have a whole blog post just on that subject.
This talk has been videoed several times - some older versions use a different library to talk to MongoDB and (I hope) you’ll see that the most recent code is even simpler than these initial demos.
- JavaOne, October 2014 (uses Morphia, but the Java driver for
getNearest
) - vJUG, September 2014 (the Java back end is similar to the JavaOne version, but UI for getting the nearest coffee shop is slightly different)
- OSCON, July 2014 (uses Morphia)
- GOTO Chicago, May 2014 (there’s an interview where I explain the motivation behind the presentation, and the video uses MongoJack instead of Morphia & shows an even earlier version of the find-my-coffee UI)
- Joy of Coding, March 2014 (only the second time I presented this demo, shows the initial technology stack (including MongoJack) and UI).
(For a full list of this and all my presentations, see Public Appearances)
Resources
These are the main resources I used in creating this talk:
- REST in Practice - Fantastic book to get your head into the right place for RESTy web services
- AngularJS in 60 mins - a very useful introduction to building simple AngularJS apps
- AngularJS meets JavaEE - specifically walks through connecting an AngularJS app to a JavaEE back end using NetBeans, but the principals here are the ones I used in the cafelito application
- AngularJS
- Bootstrap
- UI Bootstrap
- Dropwizard
- MongoDB: remember MongoDB has free online courses
- Morphia
- Gradle
- Groovy: I liked both Groovy in Action and Making Java Groovy
- …and I’ve written about Spock before
- IntelliJ: there’s a free community version of the IDE, but it’s not very expensive to upgrade to the full version and it will save you so much time and effort.
And remember, the application code is available here.