Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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.

Matt Raible

August 14, 2018
Tweet

More Decks by Matt Raible

Other Decks in Programming

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. 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."); } }
  4. 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?
  5. Java 8 Parallel Collections JSR 310 Date and Time API

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

    or interested in the latest trends and tastes.
  7. Latest trends in JavaLand? Microservices Embedded App Servers Deployment with

    Containers Environments: dev, test, production Auto-Configuration Monitoring
  8. 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
  9. @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> { }
  10. @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>
  11. Latest trends in Web Development? Progressive Web Applications JavaScript MVC

    Frameworks CSS 3 with Animations Mobile First Front-End Optimization REST APIs
  12. Jobs on Indeed (US) August 2018 0 2,500 5,000 7,500

    10,000 React Angular Vue Vanilla
  13. JHipster is Open Source Web Statistics, July 2018 430K Page

    Views / 2.4M on GitHub 90K Downloads GitHub Statistics 11K Stars 435 Contributors
  14. 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
  15. 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
  16. 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! ☁
  17. 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
  18. 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
  19. 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