This document summarizes Matt Raible's presentation on mobile development with Ionic, React Native, and JHipster. It introduces JHipster and how it can be used to generate Spring Boot and Angular/React applications. It then discusses using JHipster to create progressive web apps and how Ignite CLI and Ionic can be used to generate mobile apps from JHipster projects. The presentation concludes by covering JHipster's roadmap and encouraging attendees to try out JHipster.
Cybersecurity Challenges with Generative AI - for Good and Bad
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users Group 2019
1. Mobile Development with Ionic, React Native, and JHipster
July 23, 2019
Matt Raible | @mraible
Photo by Roman Kruglov https://www.flickr.com/photos/romankphoto/9548426282
2. Blogger on raibledesigns.com and
developer.okta.com/blog
Web Developer and Java Champion
Father, Husband, Skier, Mountain
Biker, Whitewater Rafter
Open Source Connoisseur
Hi, I’m Matt Raible!
Bus Lover
Okta Developer Advocate
7. Agenda 1. Introduction to JHipster
2. JHipster Ignite
3. Ionic for JHipster
4. JHipster Roadmap
5. Action!
8. Introduction to JHipster
What is JHipster?
Installing and Using JHipster
JHipster Microservices and OIDC
Progressive Web Applications Overview
Part 1
10. What is JHipster?
JHipster is a development platform to generate, develop and deploy
Spring Boot + Angular/React Web applications and Spring microservices.
and Vue! ✨
www.jhipster.tech
12. A powerful workflow to build your
application with Yeoman, Webpack/
Gulp and Maven/Gradle
JHipster Goals
A sleek, modern, mobile-first front-
end with Angular and Bootstrap
A high-performance and robust
Java stack on the server side with
Spring Boot
A robust microservice architecture
with JHipster Registry, Netflix OSS,
Elastic Stack, and Docker
13. How to Use JHipster
Install JHipster and Yeoman, using npm:
npm install -g generator-jhipster
Create a directory and cd into it:
mkdir newapp && cd newapp
Run it!
jhipster
15. 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
54
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
OAuth 2.0 and OIDC
16. yelp.com/callback
Back to redirect URI
with authorization code
Exchange code for
access token and ID token
accounts.google.com
Email
**********
Go to authorization server
Redirect URI: yelp.com/cb
Scope: openid profile
Authorization Server
yelp.com
Connect with Google
Resource owner
Client
accounts.google.com
Allow Yelp to access your public
profile and contacts?
No Yes
Request consent
from resource owner
Hello Matt!
accounts.google
Get user info
with access token
/userinfo
OAuth 2.0 and OIDC
23. Force HTTPS in Spring Boot
src/main/java/com/okta/developer/config/SecurityConfiguration.java
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.requiresChannel()
.requestMatchers(r -> r.getHeader("X-Forwarded-Proto") != null)
.requiresSecure();
}
}
developer.okta.com/blog/2018/07/30/10-ways-to-secure-spring-boot
24. Demo Using JHipster, create an app
Generate entities in app
Convert app to be a PWA
Test with Lighthouse
25. Part 2
Ignite JHipster
What is React Native?
What is Ignite CLI?
Ignite JHipster
JWT and OIDC Support
Entity Generator
26. Works on macOS, Windows,
and Linux
Ignite CLI
Saves an average of two
weeks
Easily spin up a new
React Native app
An ever-expanding list
of boilerplates and plugins
infinite.red/ignite
27. Create an app:
ignite new myapp -b ignite-jhipster
Ignite JHipster
https://github.com/ruddell/ignite-jhipster
Install Ignite CLI and Ignite JHipster, using npm:
npm i -g ignite-cli ignite-jhipster
Ignite!
🔥
A React Native boilerplate for JHipster apps
28. Demo Create an app w/ Ignite JHipster
Generate entities in app
Modify UI to be friendlier
Run on iOS and Android
29. Build a Mobile App with React Native
developer.okta.com/blog/2018/10/10/react-native-spring-boot-mobile-app
30. Part 3
Ionic 4 JHipster
What is Ionic?
Why?
Ionic Module for JHipster
JWT and OIDC Support
Entity Generator
32. Run it!
yo jhipster-ionic
Ionic Module for JHipster
Because Ionic Apps need some JHipster 💙 too!
https://github.com/oktadeveloper/generator-jhipster-ionic
Install Ionic and the Ionic Module for JHipster, using npm:
npm install -g ionic generator-jhipster-ionic
Profit!
🤑
33. Demo Create an app with Ionic4J
Generate entities in app
Modify UI to be friendlier
Run on iOS and Android
34. Use Ionic for JHipster to Create Mobile Apps
developer.okta.com/blog/2019/06/24/ionic-4-angular-spring-boot-jhipster
35. Part 4 JHipster Roadmap
What You Learned
What’s Next for JHipster
37. What’s Next for JHipster?
Improved Reactive Support
.NET Core and Node.js Blueprints
RFCs are open! github.com/jhipster/generator-jhipster/tree/master/rfcs
39. The JHipster Mini-Book
Written with Asciidoctor
Free download from InfoQ:
infoq.com/minibooks/jhipster-mini-book-5
Quick and to the point, 164 pages
Developed a real world app:
www.21-points.com