167
What a Back-end Java Developer Doesn't Know About the Modern Web Stack Peter Lindh @peterlindh Rikard Thulin @rikard_thulin

What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Embed Size (px)

Citation preview

Page 1: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

What a Back-end Java Developer

Doesn't Know About the Modern Web Stack

Peter Lindh @peterlindh

Rikard Thulin @rikard_thulin

Page 2: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

A “typical” Java Developer

Image from http://nighthacks.com

Page 3: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

All names, characters, and incidents portrayed in this presentation are fictitious. No identification with actual persons is intended or should be inferred.

Page 4: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

.equals( );THIS IS A COINCIDENT

Page 5: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Dreyfus model of skill acquisition

Page 6: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Dreyfus model of skill acquisition

Page 7: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Dreyfus model of skill acquisition

Expert Java Developer

Page 8: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Let’s do webb

Page 9: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Java Developer Web Developer

Image from http://nighthacks.com

Page 10: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Java Developer Web Developer

Image from http://nighthacks.com

1st

Page 11: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Java Developer Web Developer

Image from http://nighthacks.com

2nd

Page 12: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Java Developer Web Developer

Image from http://nighthacks.com

3rd

Page 13: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Java Developer Web Developer

Image from http://nighthacks.com

4th

Page 14: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

And most important...

Page 15: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Java Developer Web Developer

Image from http://nighthacks.com

Ecological Green TeaStarbucks Coffee

5th

Page 16: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Expert Java Developer

Page 17: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

@Inject (value=web-dev-kit)

Page 18: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Java Developer doing web

Page 19: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Done!

Page 20: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

F

Page 21: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

F A

Page 22: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

F A L

Page 23: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

F A L S

Page 24: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

F A L S E

Page 25: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Java Developer doing web

Page 26: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Java Developer doing web

Expert Java Developer

turns into

Page 27: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Kind of obvious!

Page 28: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Yes, but...

Page 29: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Page 30: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

because

Page 31: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

They don't KNOW

that they don't KNOW

Page 32: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

One step is a huge

DIFFERENCE

Page 33: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

This is ok

Page 34: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

YOUKNOW

WHAT YOUDON’TKNOW

Page 35: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

ISBLACK

ITNOT

OR WHITE

Page 36: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

About us

Page 37: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Rikard

Peter

Page 38: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Rikard

Peter

Page 39: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Rikard

Peter

Page 41: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

MISSIONBuild a modern web application

Page 42: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

MISSIONBuild a modern web application

FEATURING

WEB DEVELOPER

Page 43: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

MISSIONBuild a modern web application

FEATURING

WEB DEVELOPERAND SPECIAL GUEST STAR

JAVA DEVELOPER

Page 44: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

PART 1: Build a modern web application

Structure

Page 45: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- css/

| `-- modern.css

|-- index.html

Page 46: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VS

Page 47: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

|-- images/

| `-- duke.png

|-- css/

| `-- modern.css

|-- index.html

Page 48: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

{ why it is different }

Structure

Page 49: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- css/

| `-- modern.css

|-- index.html

target/modernweb

|-- css/

| `-- modern.css

|-- images/

| `-- duke.png

|-- index.html

|-- WEB-INF/

`-- web.xml

Maven to war layout

Page 50: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- css/

| `-- modern.css

|-- index.html

target/modernweb

|-- css/

| `-- modern.css

|-- images/

| `-- duke.png

|-- index.html

|-- WEB-INF/

`-- web.xml

Images are resources

Page 51: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- css/

| `-- modern.css

|-- index.html

target/modernweb

|-- css/

| `-- modern.css

|-- images/

| `-- duke.png

|-- index.html

|-- WEB-INF/

`-- web.xml

Images are resources

LOL

Page 52: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- css/

| `-- modern.css

|-- index.html

target/modernweb

|-- css/

| `-- modern.css

|-- images/

| `-- duke.png

|-- index.html

|-- WEB-INF/

`-- web.xml

Ok, IRL images goto

webapp

Page 53: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

target/modernweb

|-- css/

| `-- modern.css

|-- images/

| `-- duke.png

|-- index.html

|-- WEB-INF/

`-- web.xml

war layout to war binary

WAR

target/modernweb.war

Page 54: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

And feed the

container

WARWARWARWARWARWAR

Page 55: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

We serve filesIt’s as simple as that!

|-- images/

| `-- duke.png

|-- css/

| `-- modern.css

|-- index.html

Page 56: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

PART 2: Build a modern web application

Add dependencies

Page 57: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

https://jquery.com

Page 58: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

https://jquery.com

Page 59: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- js/

| `-- jquery-3.1.0.min.js

|-- index.html

Page 60: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

0101100010111001000011101011000101110010000111010110001011100100001110101100010111BUG000011101011000101110010000111010110001011100100001110101100010111001000011101011000

Page 61: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Rats! Forgot to download

jquery-3.1.0.jsjquery-3.1.0.min.map

Page 62: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

3.1.1 was obviously released

What are the odds???

Page 63: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- js/

| `-- jquery-3.1.0.min.js

| jquery-3.1.1.min.js

| jquery-3.1.1.min.map

| jquery-3.1.1.js

|-- index.html

$ rm jquery-3.1.0.min.js

Page 64: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Something smells funny...

Page 65: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Why do I put dependencies

under Version Control

System?

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- js/

| `-- jquery-3.1.1.min.js

| jquery-3.1.1.min.map

| jquery-3.1.1.js

|-- index.html

Page 66: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VS

Page 67: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

LET MEENTERTAINYOU DEMO

Page 68: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

{ why it is different }

Add dependencies

Page 69: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Package managers are tools to share and consume software

libraries and their dependencies

Page 70: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VERYSHORT

HISTORYLESSON

Page 71: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

2000

2004

2005

2005

Apache ANT

Ivy

Maven 1

Maven 2

2009Gradle

1977Make

Page 72: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

2000

2004

2005

2005

Apache ANT

Ivy

Maven 1

Maven 2

2009Gradle

1977Make

Page 73: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

2010

2012

NPM

Bower

2005Maven

Page 74: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

or

Java Package Managers

Page 75: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Package Managers

and

Others package managers exists

Page 76: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Package manager included with node.js

For JavaScript developers to share and reuse code

Page 77: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Tooling dependency management

(Build system, preprocessors etc)

Page 78: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Dependency

App

DependencyDependency Dependency

DependencyDependency Dependency Dependency

DependencyDependency Dependency DependencyDependency

npm: nested dependencies

Page 79: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

But npm3 has flat dependencies

While npm2 installs all dependencies in a nested way, npm3 tries to mitigate the deep trees and

redundancy that such nesting causes. npm3 attempts this by installing some secondary

dependencies (dependencies of dependencies) in a flat way...

TL;DR

npm v3 Dependency Resolution [https://docs.npmjs.com/how-npm-works/npm3]

Page 80: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Nested dependencies

The size of an application

is not an issue

Page 81: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Nested dependencies

The size of an application

is not an issuefor a server side Java application

Page 82: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Nested dependencies

The size of an application

is not an issuefor web apps

Page 83: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

For web dependencies we

NEED

Page 84: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

BowerDependency management for the web

Uses NPM

@twitter

Page 85: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Bower

HTML, CSS, Javascript, fonts and images

Page 86: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Dependency

App

Bower: flat dependencies

Page 87: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Flat dependencies

YOUAREONYOUROWN

Page 88: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Maven plugins ~= npm

Maven dependencies ~= bower

~= != =

Page 89: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Dependency

App

DependencyDependency Dependency

DependencyDependency Dependency Dependency

DependencyDependency Dependency DependencyDependency

maven: nested dependencies

Page 90: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

FLATVS

NESTED

Page 91: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Dep

App

DepDep Dep

DepDep Dep Dep

DepDep Dep DepDep

Nested dependencies

Dependency

App

Flat dependencies

When size does matter

{ web, css, fonts }BOWER

When size does not matter

{ java, tooling, modules }MAVEN, NPM

Page 92: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

PART 3: Build a modern web application

Task runners

Page 93: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Plugins => build phases$ mvn clean

$ mvn test

$ mvn install

$ mvn deploy

Page 94: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VS

Page 95: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

LET MEENTERTAINYOU DEMO

Page 96: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

{ the details }

Task runners

Page 97: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Task runners automate everything that can be automated

compile css/sass, optimize images, minification, software verification

Page 98: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Image from https://medium.com/@preslavrachev/gulp-vs-grunt-why-one-why-the-other-f5d3b398edc4#.lmxjckam4

Page 99: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

like maven vs gradle

or configuration vs codeuse whatever works best for you

Page 100: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Maven plugin ~= grunt / gulp plugin

Maven build phase ~= grunt task

Gradle task ~= gulp task

~= != =

Page 101: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VERYSHORT

HISTORYLESSONPART 2

Page 102: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

2010

2011

NPM

Grunt

2005Maven

2012Bower

2013Gulp

Page 103: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

PART 4: Build a modern web application

Development Workflow

Page 104: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Just need to add the

javascript

Page 105: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

index.html

<html> <body> <div id="#something">Duke</div> </body>

<script src="js/jquery-3.1.1.min.js"> </script></html>

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- js/

| `-- jquery-3.1.1.min.js

| jquery-3.1.1.min.map

| jquery-3.1.1.js

|-- index.html

Page 106: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Wait!New versions

will be a headache...

Page 107: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

<script src="js/jquery-3.1.1.min.js"> </script>

<script src="js/jquery-3.1.0.min.js"> </script>

Page 108: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

And some css

Page 109: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

modern.css

#something { background: white;}

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- css/

| `-- modern.css

|-- js/

| `-- jquery.min.js

| jquery.min.map

| jquery.js

|-- index.html

Page 110: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

And

Page 111: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

pom.xml

<build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> </plugin> </plugins></build>

modernweb

|-- pom.xml

`-- src/

|-- main/

| `-- resources/

| `-- images/

| `-- duke.png

`-- webapp/

|-- WEB-INF/

| `-- web.xml

|-- css/

| `-- modern.css

|-- js/

| `-- jquery.min.js

| jquery.min.map

| jquery.js

|-- index.html

Page 112: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

$ mvn clean install

< lots of lines emitted… >

Page 113: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

$ mvn tomcat:run

< lots of lines emitted… >

Page 114: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
Page 115: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

+ F5

Page 116: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Duke

Page 117: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Nice! Just need to tweak the

background color

Page 118: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

$ mvn clean install

F5

$ mvn tomcat:run

Duke

#something { background: papayawhip;}

Page 119: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Nice! Just need to move #something

1px

Page 120: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

OMG!

Nice! Just need to move #something

1px

Page 121: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

ZZZZZ

Page 122: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VS

Page 123: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

LET MEENTERTAINYOU DEMO

Page 124: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

{ why it is different }

Development Workflow

Page 125: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

QUESTION:Web workflow

equal toJavaEE workflow?

Page 126: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

At some abstraction

YES

Page 127: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

We write

CODE

Page 128: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

NO

in the real world

Page 129: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

code, build, test, preview

Page 130: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

code build, test deploy preview

Page 131: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Or evenWORSE

Page 132: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

mvn install mvn deploy CI build artifact integration test

performance test publish artifactbuild container publish container

deploy container preview

Page 133: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

PART 6: Build a modern web application

Scaffolding

Page 134: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

$ mvn archetype:create -DgroupId=[your project's group id] -DartifactId=[your project's artifact id] -DarchetypeArtifactId=maven-archetype-j2ee-simple

Page 135: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VS

Page 136: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

LET MEENTERTAINYOU DEMO

Page 137: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

{ the details }

Scaffolding

Page 138: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

YeomanScaffolding for webapps

Favors Workflow

Page 139: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

yo.equals(archetypes)

Page 140: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

YES

Page 141: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

VERYSHORT

HISTORYLESSONPART 3

Page 142: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

2012Yeoman

2005Maven

Page 143: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

7 years advantage translated from

INTERNET TIMEis like 18,000 yearsbefore current era

Page 144: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

SURPRISINGLY

Number of generators

MAVEN 1648YEOMAN 4148

As of 2016-08-14

Page 145: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Maven archetypes

OLDLEGACY

NO ECOSYSTEMFRONTEND THE BACKEND WAY

Page 146: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Yeoman generators

VIBRANTACTUALLY USED

GOOD ECOSYSTEMMOSTLY FOR FRONTEND

Page 147: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

THE FUTURE MAY BE…As Yeoman beats maven archetypes

<ironic>In the future

node is required to create a java project</ironic>

Page 148: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

TIP OF THE DAYAbout to develop a maven archetype?

Is it the right tool?Have you evaluated Yeoman?

Page 149: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Conclusion

Page 150: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Maven plugins ~= grunt / gulpMaven plugins ~= npm

Maven life cycles ~= grunt Maven dependencies ~= bower

Maven archetypes = yo

Page 151: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Back-end tooling

IS NOTa perfect match for

WEB DEVELOPMENT

Page 152: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

#1The structure of a web application is lean

Page 153: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

#2Dependencies for the web needs to be flat

Page 154: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

#3The development workflow is very different

Page 155: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

#4Scaffolding for the web is awesome

Page 156: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

#5Java tools has been polished

Web tools are evolving

Page 157: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

So the ROCKSTARS

are...

Page 158: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

+

favorite package manager and task runner

+

Page 159: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

ROGER THAT!...if I only could convince

the back-end team that defines the build process

Page 160: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

API

Front-end Back-end

Page 161: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

As you (should)

RELEASEthe frontend independently

YOU CAN USE THE RIGHT TOOLSand embrace the frontend workflow

Page 162: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

KEY POINTDon’t wrangle your front-end code

into the backend build process

Page 163: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

NOT KNOWING WHAT WE DON’T KNOW

Page 164: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

KNOW WHAT WE DON’T KNOW

Page 165: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Novice

Advanced beginner

Competent

Proficient

Expert

Please allow me to introduce myself. I'm a man of wealth and tastePleased to meet you. Hope you guess my name

Page 166: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Your mission if you choose to accept it

EXPERIMENTWE RECOMMEND THE EASY WAY

Page 167: What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final

Q & APeter Lindh Rikard Thulin@peterlindh @rikard_thulin