Monday, October 13, 2014

jHipster, the super baby in SpringRoo's pouch !

In this development productivity blog, I share my excitements about being productive using approaches such as code generators and seeing dream of having that iWAOW application really taking shape over the lazy weekend !


But I was kind of disappointed that my favorite code generator tool, to be specific "app generator" tool, Spring Roo went into maintenance only mode ! I was hoping Spring Roo would get new releases which included modules like Spring Boot, Spring Data Rest on backend and most importantly, greatest and coolest new technologies on front end. For example, Angular JS, Ext-JS/Sencha, Backbone JS. But looks like Spring guys decided to keep Spring Roo where it was. There are some valid reasons SpringRoo was demoted. For example, First of all, the revolution on front end technologies is so huge, that it is not primary business of Spring guys. Also, Roo is based on OSGi which is not much preferred technology by developers, with the debut of Spring Boot, Spring Roo is too old to refactor I guess.

Spring Boot ! (projects.spring.io/spring-boot)


I was excited to listen to launch of Spring Boot live at Santa Clara SpringOne convention, but after trying that, I realized, it is quick way to boot the spring application, but it did not have the command I was looking for, something like

> boot create entity <entityName> ( quick googlers don't copy paste this command please ! :)

This is the cool command I was looking for, but realized that boot had totally different purpose, like gathering dependencies in flash of a second by just looking at the code and following convention-over-configuration approach. That is cool too !

Playing With Play! (playframework.com)

During all this disappointment that Roo is being (only) maintained by some small company in Spain, I was looking who is that can replace Roo. I also checked Play Framework, tried some sample programs but turned out that was from totally different world where even java programmers deny there is standard like Servlets ! But that's fine, I realized great companies like LinkedIn has contributed and used Play a lot and it gives fantastic results. But it is another framework like Spring and I was looking for something on top of base framework which helps in creating at least CRUD application.

jHipster ! (jhipster.github.io ) 

During this search I did have an idea there is one weird named Hipster trying to leap like Roo with all greatest technology stack and here it is, I waited until it's born as stable release and I do see exactly what I looking for,

yo jhipster:entity <anEntity> (Create entity anEntity )
yo jhipster:service aService ( Create service aService) 

Yo !!! Yes, I did say it for the magic it would do and create CRUD angular page including Spring server side, but YO here also mean Yeoman ! The super-cool CRUD generator for 100+ web frameworks is base of jHipster ! In fact, jHipster is one of those hundreds of plugins, called "generators" written to generate server side code using Spring's latest offsprings like Spring-Boot, Spring Data, Spring Data Rest etc..

You can just land on this page and get tired of reading how many plugins have been already written, here you go http://yeoman.io/generators/


Now back to jHipster, I am thrilled about jHipster because, using all these already cool frameworks, it generates full stack web application using Angular and Spring ! Look at the great questions it asks when creating jHipster application !
  1. What is the base name of your application? 
  2. Would you like to use Maven or Gradle? - So, decide your server side build manager !
  3. What is your default Java package name?
  4. Do you want to use Java 8? - Cool ! 
  5. Which *type* of authentication would you like to use? - Superb ! You can also choose OAuth 
  6. Which *type* of database would you like to use? SQL / NoSQL ?
  7. Do you want to use Hibernate 2nd level cache? - Hardcore server side engineers know how it helps !
  8. Do you want to use clustered HTTP sessions? So by default, very minimal in session, almost stateless which is need for scalability.
  9. Do you want to use WebSockets? Applause ! 
  10. Which *production* database would you like to use? Means, you can have different databases already configured in production and development.
  11. Which *development* database would you like to use? 
  12. Would you like to use Grunt or Gulp.js for building the frontend? Cool - Options here too ! 
  13. Would you like to use the Compass CSS Authoring Framework? Incredible ! Compass is most advanced tool to generate CSS.
Imagine the comfort you get by having all these dependencies in your app right there when you start the development !

Hmm.. There are so many technologies embedded as a inherient part of jHipster.

HTML5BoilerPlate - So you dont have to worry adding things like Modernizer on your own. This boiler plate takes care of old browsers too, so many old-school browsers got taken care of.

Twitter Bootstrap : Need to talk anything about this most popular project on Github ?

Bower : Dependency management on client side ! Very popular now a days ! 

Karma, PhantomJS : When it is angular, no need to really mention this as it comes part of Angular. But just not to forget !

Following on server side !

Boot should be mentioned again and again because Boot was mentioned again and again in this year's SpringOne (which I did not attend btw :) , for architecture style of Micro-service. Spring guys have Boot everywhere now a days ! 

And when it is Spring world, I dont have to mention Spring Security, Spring MVC etc Right ? 

I am also so much impressed with what jHipster has for production readiness ! Monitoring with Metrix (which I dont know !) , caching with something called HazerCast (sorry, Dont know this too ) .

Conclusion : 
So in short, jHipster is like a Monster Platter you order in restaurant and avoid hassles of thinking of each item separately and getting that great feeling "I have everything" ! 



My tweets on similar topics