Professional Documents
Culture Documents
By Matt Raible
@mraible
+ =
🌅
Who is Matt Raible?
Father, Skier, Mountain Biker,
Whitewater Rafter
Blogger on raibledesigns.com
developer.okta.com
Okta Supports Authentication Standards
@spring_io
#springio17
What about You?
Bootiful Development
http://bit.ly/boot-and-react
Today’s Agenda
Why Spring Boot?
@Entity
class Blog {
@Id
@GeneratedValue
private Long id;
private String name;
@RepositoryRestResource
interface BlogRepository extends JpaRepository<Blog, Long> {
}
Microservices with Spring Boot
@spring_io
https://developer.okta.com/blog/2017/06/15/build-microservices-architecture-spring-boot #springio17
Demo: Build a Spring Boot API
ES6, ES7 and TypeScript
ES5: es5.github.io
ES6: git.io/es6features
ES7: bit.ly/es7features
$ tsc greeter.ts
https://www.typescriptlang.org/docs/tutorial.html
bus.ts
@spring_io
#springio17
TypeScript 2.3
“Node.js is a JavaScript runtime built on Chrome's V8
JavaScript engine. Node.js uses an event-driven, non-
blocking I/O model that makes it lightweight and
efficient. Node.js' package ecosystem, npm, is the
largest ecosystem of open source libraries in the world.”
https://nodejs.org
https://github.com/creationix/nvm
Leading JavaScript Frameworks in 2017
angular.io
facebook.github.io/react
vuejs.org
@spring_io
#springio17
“Angular and React dominate:
Nothing else even comes close.”
Crunch the Numbers
Hot Frameworks hotframeworks.com
@spring_io
#springio17
Jobs on Indeed (US)
November 2017
8,000
6,000
4,000
2,000
0
React Angular Vue Polymer
@spring_io
#springio17
Stack Overflow Tags
November 2017
90,000
67,500
45,000
22,500
0
React Angular Vue Polymer
@spring_io
#springio17
Stack Overflow Trends
https://stackoverflow.blog/2017/05/09/introducing-stack-overflow-trends
GitHub Stars
November 2017
90,000
67,500
45,000
22,500
0
React Angular Vue Ember Polymer Backbone
@spring_io
#springio17
GitHub Star Growth
@spring_io
http://www.timqian.com/star-history #springio17
Hello World with React
<div id="root"></div>
<script>
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
</script>
http://codepen.io/gaearon/pen/ZpvBNJ?editors=0100
Imperative Code
if (count > 99) {
if (!hasFire()) {
addFire();
}
} else {
if (hasFire()) {
removeFire();
}
}
if (count === 0) {
if (hasBadge()) {
removeBadge();
}
return;
}
if (!hasBadge()) {
addBadge();
}
var countText = count > 99 ? "99+" : count.toString();
getBadge().setText(countText);
Declarative Code
if (count === 0) {
return <div className="bell"/>;
} else if (count <= 99) {
return (
<div className="bell">
<span className="badge">{count}</span>
</div>
);
} else {
return (
<div className="bell onFire">
<span className="badge">99+</span>
</div>
);
}
Create React App
Create React App
Ships with documentation!
Learning React
https://vimeo.com/213710634
Progressive Web Apps
@spring_io
#springio17
“We’ve failed on mobile”
— Alex Russell
https://youtu.be/K1SFnrf4jZo
Mobile Hates You!
How to fight back:
Implement PRPL
Lighthouse
Render
Pre-cache
Lazy-load
The PRPL Pattern
Push critical resources for the initial URL route
https://developer.okta.com/blog/2017/07/20/the-ultimate-guide-to-progressive-web-applications
Demo: Build a React Client
class BeerList extends React.Component<{}, any> {
constructor(props: any) {
super(props);
this.state = {
beers: [],
isLoading: false
};
}
componentDidMount() {
this.setState({isLoading: true});
fetch('http://localhost:8080/good-beers')
.then(response => response.json())
.then(data => this.setState({beers: data, isLoading: false}));
}
render() {
const {beers, isLoading} = this.state;
…
}
}
More Authentication with React
JHipster jhipster.tech
@spring_io
#springio17
The JHipster Mini-Book
4.0 Release on Sep 22, 2017
jhipster-book.com
21-points.com
@jhipster_book
Try React
Explore PWAs
https://developer.okta.com/blog/2017/09/19/build-a-secure-notes-application-with-kotlin-typescript-and-okta
@SpringBootApplication
class NotesApplication
@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>
DIY: Bootiful Development
http://bit.ly/boot-and-react
developer.okta.com/blog
Questions?
Keep in touch!
raibledesigns.com
@mraible
Presentations
speakerdeck.com/mraible
Code
github.com/oktadeveloper