Get Hip with JHipster - Boston JUG 2018

Get Hip with JHipster - Boston JUG 2018

JHipster Tutorials:

* Get Started with JHipster 5: https://github.com/mraible/jhipster5-demo
* Build a Photo Gallery PWA with React, Spring Boot, and JHipster: https://developer.okta.com/blog/2018/06/25/react-spring-boot-photo-gallery-pwa
* Develop a Microservices Architecture with OAuth 2.0 and JHipster: https://developer.okta.com/blog/2018/03/01/develop-microservices-jhipster-oauth

YouTube Screencasts:

* Get Started with JHipster 5: https://youtu.be/-VQ_SVkaXbs
* Build a Photo Gallery PWA with React, Spring Boot, and JHipster: https://youtu.be/GlJWUqy1SJM

JHipster is one of those open-source projects you stumble upon and immediately think, “Of course!” It combines three very successful frameworks in web development: Bootstrap, Angular, and Spring Boot. Bootstrap was one of the first dominant web-component frameworks. Its largest appeal was that it only required a bit of HTML and it worked! All the efforts we made in the Java community to develop web components were shown a better path by Bootstrap. It leveled the playing field in HTML/CSS development, much like Apple’s Human Interface Guidelines did for iOS apps.

JHipster was started by Julien Dubois in October 2013 (Julien’s first commit was on October 21, 2013). The first public release (version 0.3.1) was launched December 7, 2013. Since then, the project has had over 170 releases! It is an open-source, Apache 2.0-licensed project on GitHub. It has a core team of 19 developers and over 430 contributors. You can find its homepage at https://www.jhipster.tech. If you look at the project on GitHub, you can see it’s mostly written in JavaScript (33%) and Java (27%).

At its core, JHipster is a Yeoman generator. Yeoman is a code generator that generates complete applications or useful pieces of an application. Yeoman generators promote what the Yeoman team calls the “Yeoman workflow”. This is an opinionated client-side stack of tools that can help developers quickly build beautiful web applications. It takes care of providing everything needed to get working without the normal pains associated with a manual setup.

72a2082c6a4dd79ad68befb3db911616?s=128

Matt Raible

August 14, 2018
Tweet

Transcript

  1. Matt Raible | @mraible Get Hip with JHipster Workshop August

    14, 2018 Photo Credit: https://www.flickr.com/photos/captainkimo/12951104975
  2. Blogger on raibledesigns.com Old Fashioned Java Developer turned Java Hipster

    Father, Skier, Mountain Biker, Whitewater Rafter Open Source Connoisseur Who is Matt Raible? Bus Lover Okta Developer Advocate
  3. None
  4. None
  5. None
  6. public class Okta { public Okta(DeveloperDNA developerDna) { DeveloperRelations devRel

    = developerDna.getDeveloperRelations(); Assert.notNull(devRel,"Developer Relations is required to operate effectively."); Set<Developer> team = devRel.getTeam(); Assert.isTrue(!team.isEmpty(),"Team cannot be empty."); Assert.isTrue(!devRel.getSdks().isEmpty(), "SDKs required for developers."); } }
  7. Authentication Standards

  8. What about YOU? Are you a Java Developer? Web Developer?

    How long have you been doing web development? Do you like JSF? Do you like GWT? Do you like JavaScript? TypeScript?
  9. Do you want to be a hip Java Developer?

  10. Java 8 Parallel Collections JSR 310 Date and Time API

    Functional Interfaces with default method Lambda Expressions (a.k.a. Closures) Nashorn JavaScript Engine
  11. Hipster n. noun 1. One who is exceptionally aware of

    or interested in the latest trends and tastes.
  12. None
  13. None
  14. Latest trends in JavaLand? Microservices Embedded App Servers Deployment with

    Containers Environments: dev, test, production Auto-Configuration Monitoring
  15. Spring Boot Automatically configures Spring whenever possible Provides production-ready features

    such as metrics, health checks and externalized configuration Absolutely no code generation and no requirement for XML configuration Embeds Tomcat, Jetty or Undertow directly
  16. SPRING INITIALIZR @ start.spring.io

  17. @SpringBootApplication public class DemoApplication { public static void main(String[] args)

    { SpringApplication.run(DemoApplication.class, args); } } @Entity class Blog { @Id @GeneratedValue private Long id; private String name; // getters, setters, toString(), etc } @RepositoryRestResource interface BlogRepository extends JpaRepository<Blog, Long> { }
  18. @SpringBootApplication class NotesApplication fun main(args: Array<String>) { SpringApplication.run(NotesApplication::class.java, *args) }

    @Entity data class Note(@Id @GeneratedValue var id: Long? = null, var text: String? = null, @JsonIgnore var user: String? = null) @RepositoryRestResource interface NotesRepository : JpaRepository<Note, Long>
  19. None
  20. Microservices with Spring Boot https://developer.okta.com/blog/2017/06/15/build-microservices-architecture-spring-boot

  21. Latest trends in Web Development? Progressive Web Applications JavaScript MVC

    Frameworks CSS 3 with Animations Mobile First Front-End Optimization REST APIs
  22. None
  23. None
  24. Hot Frameworks hotframeworks.com

  25. Jobs on Indeed (US) August 2018 0 2,500 5,000 7,500

    10,000 React Angular Vue Vanilla
  26. Stack Overflow Tags August 2018 0 35,000 70,000 105,000 140,000

    React Angular Vue
  27. GitHub Stars August 2018 0 30,000 60,000 90,000 120,000 React

    Angular Vue
  28. None
  29. “Angular and React dominate: Nothing else even comes close.”

  30. Wouldn’t it be hip if…? ⚭

  31. What is JHipster? www.jhipster.tech

  32. JHipster is Open Source Web Statistics, July 2018 430K Page

    Views / 2.4M on GitHub 90K Downloads GitHub Statistics 11K Stars 435 Contributors
  33. JHipster Spring Boot Spring Security Angular React Bootstrap Metrics Maven

    or Gradle Authentication Type: cookie-based, JWT, or OAuth 2.0 / OIDC Type of Database: SQL or NoSQL Caching: EhCache or Hazelcast Elasticsearch Webpack Foundational Frameworks Project Options
  34. How to use JHipster To install JHipster and Yeoman, use

    npm: npm install -g generator-jhipster Then create a directory and cd into it: mkdir myapp && cd myapp Then run JHipster: jhipster
  35. Demo Time! Generate a basic blog application Look at its

    files and configuration 
 Generate the CRUD entities Limit blogs to current user, allow HTML Deploy to … all in 20 minutes! ☁
  36. Demo Entity Diagram

  37. Validate ID Token Token Endpoint Authorization Endpoint /.well-known/
 openid-configuration JWKS

    Endpoint UserInfo Endpoint OAuth 2.0 Authorization Server & OpenID Connect Provider (OP) OAuth 2.0 Resource Server Client (Relying Party) 1 3 2 5 4 1 Discover OpenID Provider Metadata 2 Perform OAuth flow to obtain a ID token and/or access token 3 Get JSON Web Key Set (JWKS) for signature keys 4 Validate ID token
 (JSON Web Token) 5 Get additional user attributes with access token from UserInfo endpoint OpenID Connect
  38. Get Started with JHipster 5 Demo https://github.com/mraible/jhipster5-demo | https://youtu.be/-VQ_SVkaXbs

  39. React PWA with JHipster 5 https://developer.okta.com/blog/2018/06/25/react-spring-boot-photo-gallery-pwa

  40. None
  41. JHipster is Knowledge

  42. The JHipster Mini-Book Written with Asciidoctor Quick and to the

    point, 160 pages Developed a Real World App: www.21-points.com Free Download from infoq.com/minibooks/jhipster-mini-book
  43. Lines of Code in 21-Points 0 5750 11500 17250 23000

    Project Created Entities Generated Business Logic and UI 22,876 21,355 15,173
  44. Learn More stackoverflow.com Spring Boot spring.io/guides JHipster www.jhipster.tech Okta APIs

    developer.okta.com
  45. Getting Help stackoverflow.com/tags/jhipster gitter.im/jhipster/generator-jhipster github.com/jhipster/.../CONTRIBUTING.md groups.google.com/.../jhipster-dev

  46. developer.okta.com/blog

  47. Questions? Keep in touch! raibledesigns.com @mraible Presentations speakerdeck.com/mraible Code github.com/oktadeveloper

  48. Lab: Create a JHipster 5 Monolith https://github.com/mraible/jhipster5-demo