JHipster in action

  • introduction
  • starting with jhipster
  • demo
  • experience-with-jhipster
  • outlook
introduction

hand coding vs Code Generators

hand coding is fun

  • my own code
  • clean code && tdd

Simple project

  • So many ... no time for ...

Cross Frontend Backend Operations
authentication Angular Cli Spring-Initializr deployment
define entity Unit-, Int-tests UI-tests monitoring
model entity relationships styleguide Swagger doc
consuming RESTful services offering RESTful endpoints
package.json application.yml bash scripting
i18n database layer
services services
security form validation
static pages database version control docker
  • time is money

... where my code 🐌 me down

  • apply tdd in a wrong way
  • bug

Where Code Generators are great

  • simplification
  • productivity
  • consistency

... where not so much

  • good test cases
  • domain specific language
  • and ...
what if ... There is a code generator that generates crud endpoints, TESTS and MORE!

JHipster

open source Full Stack Generator

  • Spring Boot Backend
  • SPA Frontend
  • Operations
  • Code + Unit-, I-, UI-Tests
starting with jhipster

Project Chronicles

  1. effort estimation
  2. architecture

Project Chronicles

  1. effort estimation
  2. architecture
  3. check out JHipster

Marketplace (Plugins)

Project Chronicles

  1. effort estimation
  2. architecture
  3. check out JHipster
  4. generate the whole app
Demo

Demo

generator-jhipster

                    
                        {"generator-jhipster": {
                            "jhipsterVersion": "6.1.2", // current 7.0.0-beta.0, most up-to-date: v7.0.0-beta.1
                            "applicationType": "monolith",
                            "serverPort": "8080",
                            "authenticationType": "jwt",
                            "enableHibernateCache": true,
                            "databaseType": "sql",
                            "devDatabaseType": "h2Disk", // current mongodb
                            "prodDatabaseType": "postgresql", // current mongodb
                            "buildTool": "maven", // gradle as alternative
                            "useSass": true,
                            "clientPackageManager": "npm",
                            "clientFramework": "angularX",
                            "testFrameworks": ["cucumber", "gatling", "cypress"], // JUnit, Jest default included
                            "jhiPrefix": "jhi",
                            "dtoSuffix": "DTO", // MapStruct
                            "enableTranslation": true,
                            "nativeLanguage": "de",
                            "languages": ["de", "en"]
                        }}
                    
                

Project Chronicles

  1. effort estimation
  2. architecture
  3. check out JHipster
  4. generate the whole app
  5. generate entity relationships (jdl)

JHipster Domain Language (jdl)

Project Chronicles

  1. effort estimation
  2. architecture
  3. check out JHipster
  4. generate the whole app
  5. generate entity relationships (jdl)
  6. deploy to the cloud

Project Chronicles

  1. effort estimation
  2. architecture
  3. check out JHipster
  4. generate the whole app
  5. generate entity relationships (jdl)
  6. deploy to the cloud
  7. add business logic
  8. make UI enhancements
Software being 'Done' is like lawn being 'Mowed'. - Jim Benson
experience with jhipster

Conclusion

Where JHipster shines

  • simplification, productivity, consistency
  • production-ready
  • RESTful
  • latest established frameworks: e.g. AngularJs → Angular
The value of a prototype is in the education it gives you, not in the code itself. - Alan Cooper
  • differentiates from other generators:
    • fullStack
    • foundation for TDD: Unit-, I- and UI-Tests
    • best practices

Backend

  • Liquibase, Mongock ↔ flyway, MongoBee
  • Hibernate
  • Spring Boot
    • @Entity
    • @Repository
    • @Service
    • (DTO with MapStruct)
    • @RestController
  • Jwt
  • Swagger
  • lombok

Why JHipster

  • makes sense for beginners
  • Spring Boot developer → learn SPA
  • rapid prototyping in 2-6 weeks
  • agile development with generated tests, production ready code etc.
  • asap feedback from stakeholder

challenges (in general)

  • common cliche

common cliche

challenges with jhipster

  • experience with Spring Boot
  • and at least 1 SPA-Framework
  • crud web pages: limited responsiveness on mobile clients
  • “Code never lies, comments sometimes do.” - jhipster comments
  • jhipster bugs

donation and bounty

bad fix

  • learning curve:
    • jdl
    • timeboxing
    • generated architecture
    • add code in right places
    • more complexity when generating microservice architecture: gateway, service discovery etc.

50-50 chance

Find out on your own

  • too much options regarding generation
  • if JHipster takes over everything, then where is the fun part?
  • issues: JHipster specific vs underlying frameworks
outlook

Sometimes it does feel like ...

after you found it

If you ask me

because

Get help from

JHipster GitHub Issue Page (bugs, features)
and
StackOverflow (questions)

often

slides on: https://geyuqiu.github.io/jhipster-in-action/
  • simplification, productivity, consistency
  • production-ready
  • RESTful
  • latest frameworks: e.g. AngularJs → Angular
  • fullStack
  • foundation for TDD: Unit-, I- and UI-Tests
  • best practices
  • experience with Spring Boot, at least 1 SPA-Framework
  • responsive design
  • timeboxing
  • learning curve:
  • jhipster bugs
  • too much options regarding generation
  • if JHipster takes over everything, then where is the fun part?
  • issues: JHipster specific vs underlying frameworks