I am a fan of the JHipster framework. Recently, through a discussion with Jean-Marc Jézéquel, we decide to use it as a support for teaching advanced concepts in Software Engineering and Sofware Architecture at the University of Rennes 1 in a flip classroom.
The goal of JHipster is to provide a framework for building Modern Web apps that have:
These apps must be build using the latest HTML5/CSS3/JS technologies. Those websites should be delivered fast. Waiting 1 minute for your application to "deploy" is not acceptable. Modern websites should be able to handle huge numbers of concurrent users. We need robust, high-performance application servers.
The goal of JHipster is to solve those issues through.
Even for simple applications, achieving this goal raises specific conerns to manage system complexity.
For achieving this goal, JHipster combines:
through the following technologies
JHipster is a Yeoman generator. It can generate more than 10k architecture types of project depending on different criteria. As a result, when you start to create a project, you must answer a set of questions to select the required features for your application.
To illustrate Software Product Line principle and the feature diagram notation, I build a feature model for JHipster using Feature IDE and I create a generator for create the app automatically from eclipse or IntelliJ.
Here is a snapshot of the feature diagram. You can see the number of potential architecture types.
Here is a snapshot of a configuration model you can define from FeatureIde.
Behind the scene, I use xdotool to wrap the jhipster console when you define a first model.
#extract of the shell script generated #!/bin/bash xfce4-terminal -T jhipstergen -x yo jhipster & sleep 2 WID=`xdotool search --name "jhipstergen"` xdotool windowactivate $WID xdotool windowfocus $WID #appnam xdotool type myapp xdotool key "Return" #package xdotool type fr.irisa.jhipster xdotool key "Return" #Java Selection #xdotool key Down xdotool key "Return" ...
The feature model, some config sample and the generator for jhipster are available here.
Once you have created your application, you will want to create entities. For example, you might want to create an Car and a Person entity. For each entity, you will need:
The "entity" sub-generator will create all the necessary files, and provide a CRUD front-end for each entity.
Of course, the use of modelling techniques (UML) is confortable to create your business model.
I provide a custom code generator for JHipster (generating json file for entity).
You can easily use it directly from GenMyModel.
You get an archive file that can be added to your app root folder.
Next call the shell script.
#to the folder root. sh model.sh
As a result, you can easily extend the feature diagram in adding your own custom generator.
#to the folder root. mvn spring-boot:run #In an other console grunt serve
You obtain a clean runnable skeleton of your application. You can add services, refine restful services and create custom UI for your application.
The workflow is explained within a set of slides here.
To understand JHipster, developer must be familiar with
The flip classroom will be a pretext to introduce these technologies and the software architecture principles.
We would like to use JHipster for building flip classroom.
The course outline can be the following.
Discover JHipster through documentation.
Maven, git jenkins
Object-Relational Mapping (JPA and SpringDataJpa)
Dependency Injection and Advanced Oriented Design (Spring Core)
Http, Servlet and Rest architecture (Spring Rest)
Aspect Oriented Programming (Spring AOP)
Generative programming (Xtend, Spoon)
Software Product Line and Variability Engineering
Software Language Egineering (Internal DSL, external DSL, (and AngularJS directives ))
Web Enginneering (AngularJS, Web app testing)
Project 1: Develop a complex app using JHipster
Project 2: Create a subgenerator for Php synmfony, Android App, ...
I will provide a short video soon.
Sorry, no comments enabled for now because I'm using a simple static site generator (maybe I'll try out disqus another day).
But if you like what you see, send me an email.