Author: Karsten Silz
Apr 15, 2022   |  updated Oct 4, 2022 8 min read

Permalink: https://betterprojectsfaster.com/learn/talks-jax-london-2022-jhipster-pick-technologies-faster/

JAX London 2022: "Pick Technologies Faster by Coding with JHipster!"

JAX London logo

Summary

We developers pick more technologies more often today. We pick an initial set of candidates, then go through a preselection, and then do a detailed evaluation in our environment. There are lots of challenges there.

JHipster does the preselection for us. It generates the same application with different technologies and our data. That means we can fully evaluate these technologies in our environment. JHipster doesn’t help if it doesn’t contain the technologies we’re investigating. It also can’t tell us how productive we’ll be with a technology.

Please see my slides for why I came to this conclusion.

Information additional to the slides is below.

And here’s how to get started with JHipster:

Table Of Contents

Logistics

Conference

JAX London is a hybrid conference that brings together cutting edge software engineers and enterprise-level professionals innovating in the fields of Java, microservices, continuous delivery and DevOps. It will run from October 3 through October 6, 2022.

You can buy a ticket here:

Talk

My talk title is “Pick Technologies Faster by Coding with JHipster!”. I will give it on October 4 at 10:15.

Abstract

Technologies like cloud, microservices, containers, DevOps, and apps drive Java projects today and evolve quickly. So we Java developers need to pick more technologies more often today. How do we pick the right ones? And how can we stay up-to-date?

I will discuss common challenges for picking technologies. Then I’ll introduce JHipster, an open-source application generator (100k monthly downloads). JHipster has no proprietary layers and creates production-ready code. With JHipster, we can generate the same application with different technologies. This applies to architecture (monolith & microservices), frameworks (Spring Boot, Quarkus, Micronaut, Node.js & .NET), data storage (NoSQL & SQL), authentication (OAuth 2, JWT & session), front-ends (React, Angular & Vue.js), Continuous Integration (Jenkins pipeline, Azure pipelines, GitLab CI, GitHub Actions, Travis CI & CircleCI), deployment (AWS, Azure, Google Cloud, Docker, Kubernetes, OpenShift, Cloud Foundry & Heroku), and more.

We build, test, debug, deploy and run these applications in our environment with our data. So, we learn technologies by running code! That’s much better than learning from outdated articles with toy examples that neither apply to our environment nor our data!

I will generate a JHipster application in the talk.

Why Should You Listen To Me?

I’ve been a Java developer for 23 years. I’m a Java news reporter for InfoQ, so I know what’s going on in the Java world. I’m neither affiliated with the projects I’m discussing nor selling books or training courses.

I share industry analysis and my project experiences to give you options for your next project. But in the end, you decide!



Java Tech Popularity Index Q1/2024:
Developer job ads down 32% year over year, Stack Overflow questions dropped 55% since ChatGPT. I now recommend IntelliJ Community Edition because many AI code assistants don't run in Eclipse. Job ads for Quarkus hit an all-time high.

See All Issues & Subscribe



Tell Me What to Change Next Time

If you’ve seen my talk, then please rate it!

This is the feedback I got on my talk.


Slides & Video

Here are the slides as PDF. They are 4.6 MB:

You can also get the slides in their original Keynote format. “Keynote” is Apple’s presentation application. Why would you do that? My slides have less text than the PDF version, so you can see what I cut. I also animated the slides, so they are more pleasant to watch. Or maybe you want to peek under the hood to see how I achieved specific effects. These slides are 5.3 MB in size.

The link to the video will probably be available here after the talk. It may be behind a paywall.

Additional Talk Information

More Technologies & More Often

Java & TypeScript

The Java releases are from Wikipedia, as are the TypeScript releases. As of June 15, 2021, the TypeScript 4.3 release was missing there.

Frameworks

The two blue dots on the left and right represent Java EE and Spring Boot. The five red dots on the right represent MicroProfile, Quarkus, Micronaut, DropWizard, and Helidon.

Java Distributions

The two blue dots on the left and right represent Oracle’s JDK and IBM’s OpenJ9 (changed name from “J9” when it became an Eclipse project in 2017). The first red dot on the right represents AdoptOpenJDK which is becoming an Eclipse project called “Adoptium” and distributes both OpenJ9 and “regular” OpenJDK releases. The other red dots represents OpenJDK distributions from Oracle, Microsoft, Amazon, RedHat, Azul, Alibaba, Bell Soft, and SAP.

What Is JHipster?

JHipster

The JHipster home page is https://www.jhipster.tech. All of its project are on GitHub.

Safe Project?

The download number refer to the generator-jhipster NPM package. npmtrends.com has the trend for the weekly number of downloads:

JHipster Download Trend
JHipster Download Trend

JHipster Domain Language (JDL)

JDL has its own section on the JHipster site. You’ll find the various sections both on the left in the menu and on the right as a numbered list:

JDL Sections on the JHipster Site
JDL Sections on the JHipster Site

For the live coding, I put both the application configuration and the data model into one JDL file. You shouldn’t: This way, your entire application is rebuilt when you update the data model part and import it again with JHipster! Instead, you should put the application and the data model into separate JDL files.

My JDL file is the same I used for my JHipster tutorial. It’s on GitHub and looked like this on October 3, 2022:

  • The application section describes how my application is configured. No suprises here! It’s a Spring Boot monolith with H2 as the development database and PostgreSQL as the production database. It supports multiple languages - English, German, Russian.
  • deployment documents how I deploy with a Docker Compose file here.
  • I declare various domain objects (entity) and their relationships.
  • In Spring Boot, I generate both service interfaces and implementation classes (service) and Data Transfer Objects (dto).
application {
  config {
    baseName my_simple_shop
    applicationType monolith
    authenticationType jwt
    buildTool maven
    cacheProvider ehcache
    clientFramework react
    clientPackageManager npm
    clientTheme litera
    clientThemeVariant primary
    databaseType sql
    devDatabaseType h2Disk
    dtoSuffix DTO
    enableHibernateCache true
    enableTranslation true
    jhiPrefix bpf
    languages [en, de, ru]
    messageBroker false
    nativeLanguage en
    packageName com.betterprojectsfaster.tutorial.jhipsterdocker
    prodDatabaseType postgresql
    reactive false
    searchEngine false
    serverPort 8080
    skipClient false
    skipServer false
    skipUserManagement false
    websocket spring-websocket
    testFrameworks [cypress]
  }
  entities *
}

deployment {
  deploymentType docker-compose
  dockerRepositoryName "joedata"
}

entity Product {
  name String required unique minlength(2) maxlength(90)
  price Float required min(0)
  description TextBlob required
  picture ImageBlob required
  specification Blob
  category ProductCategory
  inventory Integer required min(0)
}

enum ProductCategory {
  Laptop, Desktop, Phone, Tablet, Accessory
}

entity Address {
  addressLine1 String required minlength(2) maxlength(80)
  addressLine2 String minlength(2) maxlength(80)
  city String minlength(2) maxlength(80)
  postalCode String minlength(5) maxlength(5)
}

entity ShoppingOrder {
  name String required unique minlength(2) maxlength(90)
  totalAmount Float min(0)
  ordered LocalDate
}

entity ProductOrder {
  amount Integer required min(0) max(5)
}

entity Shipment {
  shippedAt LocalDate required
}

relationship OneToOne {
  Shipment{order(name) required} to ShoppingOrder{shipment(shippedAt)}
}

relationship OneToMany {
  Product to ProductOrder{product(name) required}
  ShoppingOrder{orders} to ProductOrder{overallOrder(name) required}
}

relationship ManyToOne {
  Address{user(login) required} to User
  ProductOrder{buyer(login) required} to User
  ShoppingOrder{buyer(login) required} to User
  Shipment{shippedBy(login) required} to User
}

service * with serviceImpl
dto * with mapstruct

How Does JHipster Help?

Preselection

  • Framework: Spring Boot is part of JHipster core. All other options need plugins (see the Plugins section below).
  • Language: Java is the default back-end language. We can use Kotlin through a plugin. Using .Net or Node.js switches the language to C# or JavaScript.
  • Architecture: We can either generate a monolith or microservices. See this section of the JHipster website for details on the microservices architecture.
  • Build tool: That’s either Maven or Gradle.
  • Authentication: We have the choice of JTW, OAuth 2 or session-based authentication. See this section of the JHipster website for details.
  • Caching: JHipster offers several caching options. See this section of the JHipster website for details.
  • Tests: JHipster creates unit test by default. Optionally, you can include frameworks for end-to-end web tests or performance tests. I think JHipster picks and configures the frameworks there, but you still need to write the tests yourself. See here for details.
  • Continuous Integration: JHipster creates the configuration files for all popular CI frameworks. The JHipster site has the details.
  • Deployment: The “Production” section of the JHipster website describes the deployment. The sidebar on the left lists the available options.
  • Monitoring: JHipster has a built-in dashboard. It does support other monitoring systems. See the JHipster website for details.

Getting Started with JHipster

For the latest information, please always go to the JHipster site.

My Tutorial

If you want to get started with JHipster, then my three-part tutorial on JHipster is just what you need:

  • The first part is optional. It tells the story of how JHipster and Docker saved my first Angular Java project.
  • The second part helps with installing JHipster. We then generate our first JHipster application and explore the UI for administration and our entities.
  • In the third and final part, we look at the JHipster code. We configure Eclipse/Intellij, import the project, and then inspect the code.

Plugins

Plugins change the code that JHipster generates. They are optional. JHipster calls them “blueprints”.

Here are the officially supported blueprints:

In principle, we can use multiple blueprints at the same time. But it seems that at least the Kotlin blueprint doesn’t go together with other blueprints.

The JHipster site has a list of all blueprints. That’s where we can find the Quarkus blueprint, for instance.

Part 19 of 25 in the Conference Talks series.
« QCon Plus 2022: "Google’s Flutter: Mobile, Web & Desktop Frontends from 1 Codebase?" | QCon London 2022: "Google’s Flutter: Mobile, Web & Desktop Frontends from 1 Codebase?" » | Start: Java Forum Stuttgart 2019: "When Using the Application Generator Jhipster Is Worth It - and When Not"

Java Tech Popularity Index Q1/2024:
Developer job ads down 32% year over year, Stack Overflow questions dropped 55% since ChatGPT. I now recommend IntelliJ Community Edition because many AI code assistants don't run in Eclipse. Job ads for Quarkus hit an all-time high.

Read my newsletter


comments powered by Disqus