Modern Java web app in 5min
Ruby on Rails has made it incredibly easy for beginners to setup full-featured web apps within hours. Initially a lot of the nitty-gritty is hidden behind generators. Generators utilities that help you generate new models, controllers, etc. They generate files and edit existing ones to make things easy for you. The team over at JHipster have now accomplished that for Java. Check it out. Another development in the Java world has made this “generator” approach much easier. JHipster leverages Spring Boot‘s extensive configuration options and exposes them to the user through its CLI. For example, switching an embedded jetty based project to embedded tomcat requires a one line change in a Spring configuration file.
I’m currently working on my own application stack and have gone back and forth between using Dropwizard or Spring Boot but I’m finally sold on Spring Boot after spending some time studying their internals and building on top of them. The only downside I see with Spring is that someone has to understand Spring fairly well once things need to be customized. Dependency injection is something you have to get familiar with to really see its power. Otherwise things feel like magic. Dropwizard is in that sense quite straightforward.
So I’m starting a blog post series that goes through all the steps I took to create my ideal base application framework. The stack will be:
- DigitalOcean Droplet
- Java 8
- Spring Boot
- Spring Security
- Embedded Tomcat
That’s some enterprise level goodness which is now super easy to pull together thanks to Spring Boot and JHipster.
More to come!