Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019

73 views

Published on

JHipster is bad-ass. It's an Apache-licensed open source project that allows you to generate Spring Boot APIs and Angular (or React!) apps. It has a vibrant community and ecosystem with support for deploying to many cloud providers and using the latest DevOps buzzwords, like Docker and K8s.

This session will show you JHipster, why it's cool, and show you how to create an app with it.

* Demo Code: https://github.com/mraible/jhipster6-demo
* JHipster + OIDC: https://developer.okta.com/blog/2019/04/04/java-11-java-12-jhipster-oidc
* JHipster + Microservices: https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config
* JHipster + Ionic: https://developer.okta.com/blog/2019/06/24/ionic-4-angular-spring-boot-jhipster
* JHipster + React Native: https://developer.okta.com/blog/2018/10/10/react-native-spring-boot-mobile-app

Published in: Software
  • Be the first to comment

Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019

  1. 1. Matt Raible | @mraible Spring Boot APIs and Angular Apps: Get Hip with JHipster! July 19, 2019 Photo by Matthew Whitehead https://www.flickr.com/photos/photonphisher/4715548161
  2. 2. Titanium Sponsors Platinum Sponsors Gold Sponsors
  3. 3. Blogger on raibledesigns.com and developer.okta.com/blog Web Developer and Java Champion Father, Skier, Mountain Biker, Whitewater Rafter Open Source Developer + User Who is Matt Raible? Bus Lover Okta Developer Advocate
  4. 4. 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."); } }
  5. 5. Authentication Standards
  6. 6. 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?
  7. 7. Do you want to be a hip Java Developer?
  8. 8. Java 8 Parallel Collections JSR 310 Date and Time API Functional Interfaces with default method Lambda Expressions (a.k.a. Closures) Nashorn JavaScript Engine
  9. 9. Java 11 New String Methods File Utility Methods Local Variable Syntax: var Java EE and CORBA modules removed What about Java 12?
  10. 10. Hipster n. noun 1. One who is exceptionally aware of or interested in the latest trends and tastes.
  11. 11. Latest trends in JavaLand? Microservices Embedded App Servers Deployment with Containers Environments: dev, test, production Auto-Configuration Monitoring
  12. 12. 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
  13. 13. SPRING INITIALIZR @ start.spring.io
  14. 14. @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> { }
  15. 15. @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>
  16. 16. Microservices with Spring Boot https://developer.okta.com/blog/2019/05/22/java-microservices-spring-boot-spring-cloud
  17. 17. Latest trends in Web Development? Progressive Web Applications JavaScript MVC Frameworks CSS 3 with Animations Mobile First Front-End Optimization REST and GraphQL APIs
  18. 18. Hot Frameworks hotframeworks.com
  19. 19. Hot Frameworks hotframeworks.com
  20. 20. Jobs on Indeed (US) July 2019 0 3,000 6,000 9,000 12,000 React Angular Vue Vanilla
  21. 21. Stack Overflow Tags July 2019 0 45,000 90,000 135,000 180,000 React Angular Vue
  22. 22. GitHub Stars July 2019 0 37,500 75,000 112,500 150,000 React Angular Vue
  23. 23. “Angular and React dominate: Nothing else even comes close.”
  24. 24. Wouldn’t it be hip if…? ⚭
  25. 25. @spring_io #springio17 JHipster jhipster.tech JHipster is a development platform to generate, develop and deploy  Spring Boot + Angular/React Web applications and Spring microservices.  and Vue! ✨
  26. 26. JHipster is Inclusive https://github.com/jhipster/jhipster-artwork
  27. 27. JHipster is Open Source Web Statistics, July 2019 356K Page Views / 704K on GitHub 103K Downloads GitHub Statistics 14K Stars 512 Contributors
  28. 28. JHipster Foundations Spring Boot Spring Security Angular React Bootstrap Micrometer Maven or Gradle Authentication Type: cookie- based, JWT, or OAuth 2.0 / OIDC Type of Database: SQL or NoSQL Caching: EhCache or Hazelcast Elasticsearch Frameworks Project Options
  29. 29. 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
  30. 30. 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!
  31. 31. Demo Entity Diagram
  32. 32. Get Started with JHipster 6 Demo https://github.com/mraible/jhipster6-demo | https://youtu.be/uQqlO3IGpTU
  33. 33. JHipster 6 with OIDC Authentication https://developer.okta.com/blog/2019/04/04/java-11-java-12-jhipster-oidc
  34. 34. OAuth 2.0 and OpenID Connect OpenID Connect OAuth 2.0 HTTP OpenID Connect is for authentication
 
 OAuth 2.0 is for authorization
  35. 35. React PWA with JHipster 5 https://developer.okta.com/blog/2018/06/25/react-spring-boot-photo-gallery-pwa
  36. 36. Microservices with JHipster 6 https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config
  37. 37. JHipster is Knowledge
  38. 38. The JHipster Mini-Book Written with Asciidoctor Quick and to the point, 164 pages Developed a Real World App: www.21-points.com Free Download from infoq.com/minibooks/jhipster-mini-book
  39. 39. Lines of Code in 21-Points 0 6500 13000 19500 26000 Project Created Entities Generated Business Logic and UI 25,670 23,590 16,728
  40. 40. Project Creation Entities Generated Biz Logic and UI 0 10000 20000 30000 2,999 2,648 1,839 9,472 8,911 5,523 8,383 7,696 5,892 Java TypeScript HTML Lines of Code by Language
  41. 41. Learn More stackoverflow.com Spring Boot spring.io/guides JHipster www.jhipster.tech Okta APIs developer.okta.com
  42. 42. Getting Help stackoverflow.com/tags/jhipster gitter.im/jhipster/generator-jhipster github.com/jhipster/.../CONTRIBUTING.md groups.google.com/.../jhipster-dev
  43. 43. developer.okta.com/blog @oktadev
  44. 44. Action! Try Spring Boot Try Angular, React, or Vue Try JHipster Explore PWAs Enjoy the bootiful experience!
  45. 45. Questions? Keep in touch! raibledesigns.com @mraible Presentations speakerdeck.com/mraible Code github.com/oktadeveloper

×