Author: Karsten Silz
Jun 4, 2021   |  updated Jun 17, 2021 9 min read

Permalink: https://betterprojectsfaster.com/learn/talks-it-tage-2021-jhipster-faster-tools-and-technologies/

IT-Tage 365 2021 June: "Pick Technologies & Tools Faster by Coding with JHipster"

IT-Tage 365 logo

Table Of Contents

Logistics

Conference

IT-Tage 365 2021 June is a German online conference. The main event is from December 6 through December 9, 2021. But there are additional sessions throughout the year, such as mine.

Talk

I gave a session at IT Tage 365: “Pick Technologies & Tools Faster with JHipster” (“Technologien & Tools schneller auswählen durch Coding mit JHipster” in German). I discussed why we Java developers need to pick more tools more often, the challenges that come with that, and how generating code with JHipster can help picking technologies & tools faster.

I put my second JHipster applications into production in May 2021. I gave earlier versions of this talk to the London Java Community and the CinJUG (no video).

Abstract (German)

Unsere Java-Projekte werden heute von Technologien wie Microservices, Container, Cloud, DevOps und Apps bestimmt, die sich rasant weiterentwickeln. Deshalb wählen wir Java-Entwickler heute mehr Technologien als je zuvor aus – und auch noch häufiger. Wie können wir also zuerst einmal die richtigen Technologien auswählen? Und wie können wir dann technologisch auf dem Laufenden bleiben?

Ich werde typische Herausforderungen bei der Auswahl von Technologien und Tools diskutieren. Dann stelle ich JHipster vor, einen Open-Source-Anwendungsgenerator mit 170.000 monatlichen Downloads. JHipster hat keine proprietären Schichten und erzeugt produktionsreifen Code. Mit JHipster können wir einfach die gleiche Anwendung mit unterschiedlichen Technologien generieren: Monolith und Microservices, Backend mit NoSQL und SQL, Spring Boot und Micronaut und Node.js und .NET, Frontend mit React und Angular und Vue.js. Wir können diese Anwendungen dann mit unseren Daten in unserer Umgebung verändern, testen, debuggen, in Betrieb nehmen und zur Laufzeit überwachen. Wir lernen also Technologien und Tools, indem wir Code ausführen! Das ist viel besser, als aus veralteten Artikeln mit „Spielzeugbeispielen“ zu lernen, die unsere Umgebungen und Daten gar nicht kennen können!

Während des Vortrages werde ich live demonstrieren, wie man mit JHipster eine Anwendung generiert.

Abstract (English)

Technologies like cloud, microservices, containers, DevOps, and apps drive Java projects today. And they also evolve at a rapid pace. That’s why we Java developers pick more technologies more often than ever before. So how can we pick the right ones? And how can we stay up-to-date?

I’ll discuss typical challenges when picking technologies & tools. Then I’ll introduce JHipster , an open-source application generator with 170k monthly downloads. With JHipster, we can generate the same application with different technologies. Examples are monolith vs microservice, NoSQL vs SQL back-end, Spring Boot vs Micronaut vs NodeJS vs dot.NET, or React vs Angular vs Vue front-end. We can build, test, debug, deploy and run these applications in our environment with our data. So we learn technologies & tools by running code! That’s much better than learning from outdated articles with toy examples that don’t apply to our environment and our data!

I will also show live how to generate an application with JHipster.

Rate My Talk

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

This is the feedback I got on my talk. Please note that you can view the second page with the arrow button in the bottom left.


Slides

Here are the slides as PDF. They are 3.7 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.4 MB in size.

Videos

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




This week in "How to Build Java Applications Today":
No surprises in Java 17 LTS, Oracle Java free in production again, Java LTS every 2 years, Eclipse IDE 2021–09, Spring Data 2021.0.5 & 2020.0.13.

Sign up to my newsletter


Looking For Project in February 2022!

And now for some shameless self-promotion: I’m looking to join a project in February 2022, in Milton Keynes, London, or remote. I’ll work as a contractor or fixed-term employee but don’t take permanent positions. Interested? Then check out my resume & work samples!




Additional Talk Information

Mehr Technologien & Öfter (More Technologies & More Often)

Was ist JHipster? (What Is JHipster?)

JHipster Download Trend
JHipster Download Trend
  • JHipster Domain Language (JDL) slide
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 June 15, 2021:
    • 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 Docke 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

Wie hilft JHipster? (How Does JHipster Help?)

Vorauswahl: JHipster slides (“Preselection: JHipster”)

  • Framework: Spring Boot is part of JHipster core. All other options need plugins (see the Plugins section below).
  • Sprache (“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.
  • Architektur (“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.
  • Authentifizierung (“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 9 of 10 in the Conference Talks series.
« JFS 2021: "How Should Java Developers Build Front-Ends for Web, Mobile & Desktop Today?" | W-JAX Munich 2021: "How to Show Version Histories in Java Application Front-Ends?" » | Start: Java Forum Stuttgart 2019: "When Using the Application Generator Jhipster Is Worth It - and When Not"

This week in "How to Build Java Applications Today":
No surprises in Java 17 LTS, Oracle Java free in production again, Java LTS every 2 years, Eclipse IDE 2021–09, Spring Data 2021.0.5 & 2020.0.13.

Sign up to my newsletter


comments powered by Disqus