JavaOne 2014
Create the Future
@MarkStoetzer
& @brampatelski

Java is the future

Technologies
The future is Java

Trends

JAVA ME / ME embedded
Java SE embedded
- SE embedded 8 release in 2015
- Update release at end of year
Java SE
- Java SE 9 release planned for 2016
- Contains JigSaw

Mobile

Community
Embedded

Future java developers


Devoxx4Kids
&
First
Java Related Tools
Agile
Internet of Things
Evolutionary architecture
Modularity
Performance
Evil / Agile skills
Agile
Evolutionary architecture

Evolutionary
vs.
Emergent
Agile
Evolutionary architecture

Last responsible moment

Agile
Evolutionary architecture

Architect and develop for evolvability:
- Ease of change
- Coupling
- Lightweight documentation
- Continuous effort
Agile
Evolutionary architecture

Be conservative in what you send
and liberal in what you receive

Agile
Postel's law
Evolutionary architecture

Architect for testability
Agile
- System knowledge
- Business sensible components
- Testing at many levels
Evolutionary architecture


Agile
Evolutionary architecture

- Database refactoring
- Continuous delivery
- Choreography
- Contract testing
Agile
Techniques
Modularity

Jigsaw:
Delayed to JDK9


Agile
Modularity

OSGi
Eclipse & BndTools for OSGi
Apache Felix OSGi impl.
Amdatu, HTML5, AngularJS, RabbitMQ, JPA


Agile
Performance is a Social activity
Performance problems
- Outage
- User experience degradation

Agile
Or is it?
Performance is a Social activity
- Risk reduction
- Improve reliability
- Increase maintainability
- Quantifyable impact

Agile
Performance tests
Performance is a Social activity

UAT is my desktop

Agile
Performance is a Social activity
Production-like data is too hard

Comparing apples with pears

Agile
Evolutionary architecture
- Advice from Internet is not useful
- Default is good enough


Agile
Tuning by folklore
Performance is a Social activity
Throw over the wall mentality


Agile
Performance is a Social activity
Blame donkey


Agile
Performance is a Social activity
- Test
- Measure
- Analyze
- Discuss
- Proceed from step 1

Agile
Guideline
Agile learning
Failing:
Who's fault is it?
-----------------------
What did we learn?
Should we change something?
Learning:
Cross-team Guilds
Workshops
Presentations
Monthly open-space day
Breakfast presentations
Lunch presentations
Code review

Agile
Evil / Agile skills
Invest


Agile
Workshops
Monthly open-space day
Lunch presentations

Evil / Agile skills
Invest
Listen


Agile
Evil / Agile skills
Invest
Listen
Empathy


Agile
Evil / Agile skills
Invest
Listen
Empathy
Adapt


Agile
Failing:
Who's fault is it?
-----------------------
What did we learn?

Should we change something?
Go fast, fail often
Evil / Agile skills
Invest
Listen
Empathy
Adapt
Coach


Agile

Code review
Evil / Agile skills
Invest
Listen
Empathy
Adapt
Coach
Assertiveness


Agile
Evil / Agile skills
Invest
Listen
Empathy
Adapt
Coach
Assertiveness
Creativity


Agile
Java
Related
Tools
JDK8
GS Collections
Oracle MAF
Checker framework
Groovy
Avatar.js
TypeScript
Vert.x
IDE's comparison
OWASP ZAP
CI / CD
Java PaaS
Java
Related
Tools
JDK8 / Streams
// applying 12% VAT on each purchase
// Without Lambda expressions:
List costBeforeTax = Arrays.asList(100, 200, 300, 400, 500);
for (Integer cost : costBeforeTax) {
double price = cost + .12*cost;
System.out.println(price);
}
// With Lambda expressions:
List costBeforeTax = Arrays.asList(100, 200, 300, 400, 500);
costBeforeTax.stream().map((cost) -> cost + .12*cost).forEach(System.out::println);

Java
JDK8 / Lambda
Related
Tools

.onAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
anim.playFromStart();
}
})
.onAction((ActionEvent) -> { anim.playFromStart(); })
.onAction((e) -> { anim.playFromStart(); })
.onAction(e -> anim.playFromStart(); )
Java
GS Collections
Related
Tools


Java
GS Collections
Related
Tools
- No Entry
- Watch out for entrySet()
- creates a lot of objects
- Use forEachKeyValue()
- Watch out for entrySet()

Memory efficient Set and Map
Java
Oracle MAF
Related
Tools


Mobile dev. dilemma:
Native vs Web?
Java
Oracle MAF
Related
Tools

80+ components
XML format
Visual development
Declarative data binding
Rendering HTML5 / JavaScript
Theming through CSS
Native user exp

& AMX
Java
Oracle MAF & AMX
Related
Tools
Drag-n-drop development

- per user
- per instance / app
Supported by JDeveloper and Eclipse
Use native mobile features
Completely free to develop and test
www.oracle.com/maf
No other Oracle products needed
Licensing for prod-env

Java
Checker framework
Related
Tools


Java
Checker framework
Related
Tools


Java
Checker framework
Related
Tools

Dynamic checks
if (x != null) {
x.hashCode();
}
if (!RegexUtil.isRegex(userInput)) {
throw new RuntimeException(...);
}
Pattern p = Pattern.compile(userInput);
Java
Checker framework
Related
Tools

Java 6 & 7 compatible
Annotations in comments
List</* @NonNull */ String> strings;
Voodoo comments for arbitrary source code
/* >>> import myquals.TRecv; */
....
int foo(/*>>> @TRecv MyClass this, */
@TParam String p) { ... }
Java
Related
Tools
Groovy / Metaprogramming
== file:///scores.dsl ==
players ‘Ben’, ‘George’, ‘Abe’
George 10
Ben 12
Abe 9
reportWinner
scores[:] // Create an empty Map

Java
Related
Tools
Groovy / Metaprogramming
def players(String[] names) {
names.each{ name ->
scores[name] = 0
}
}
== file:///scores.dsl ==
players ‘Ben’, ‘George’, ‘Abe’
George 10
Ben 12
Abe 9
reportWinner

Java
Related
Tools
Groovy / Metaprogramming
def methodMissing(String name, args) {
scores[name] = args[0]
}
== file:///scores.dsl ==
players ‘Ben’, ‘George’, ‘Abe’
George 10
Ben 12
Abe 9
reportWinner

Java
Related
Tools
Groovy / Metaprogramming
def getReportWinner() {
def max = -1
def winner = ''
scores.each { name, score ->
if (score > max) {
max = score
winner = name
}
}
"winner is $winner with score $max"
}
winner is Ben with score 12
== file:///scores.dsl ==
players ‘Ben’, ‘George’, ‘Abe’
George 10
Ben 12
Abe 9
reportWinner

Java
Related
Tools
Groovy in 2014 and beyond
Groovy 2.3
Closures ~ Lambda's
trait FlyingAbility {
String fly() {"I'm flying!"}
}
class Bird implements FlyingAbility {}
def b = new Bird()
assert b.fly() == "I'm flying!"
Traits ~ interface default methods

AST
NIO2
JSON parser
Template engine
Docs / www.groovy-lang.org
Java
Related
Tools
Groovy in 2014 and beyond
Groovy 2.4:
Full-blown support for Android
Antlr4 support

Java
Tools
Avatar.JS
Related


Java
Tools
Avatar.JS
Related
- Asynchronous
- Event driven
- Non blocking
- Single threaded


Java
Tools
Avatar.JS
Related


Java
Tools
TypeScript
Related
M$ opensource
Type-system
Optional
100% JavaScript
Step by step adoption

Java
Tools
Vert.x
Related



inspired by Node.js
Java
Tools
Vert.x
Related



Java
Tools
Vert.x
Related


- Server
- Maximize CPU usage
- High availability
Java
Tools
Vert.x
Related


Version 3
- Java 8 only
- Nashorn
- Runtime metrics
- Distributed data
Java
Tools
IDE's
Related






Java
Tools
OWASP ZAP
Related


Java
Tools
OWASP ZAP
Related

- Easy to use pentest tool
- Free and opensource
- Useful for devs and professionals
- Automated security tests
What can it give you?
Java
Tools
Related

- Pages to ignore (logout, duplicates)
- Anti CSRF tokens
- Session handling
- Authentication
- Users
- Non standard data
OWASP ZAP
Tuning
Java
Tools
CI / CD - The deployment factory
Related
Deploy is scary -> Delay
Dependency mgt
Version stability
Delivery
Identical env: Chef, Vagrant, Docker
Automation
People


Java
Tools
Java PaaS
Related


Java
Tools
Java PaaS
Related


Java
Tools
Java PaaS
Related


Continuous delivery
Java
Tools
Java PaaS
Related


Shared goal: agility
Java
Tools
Java PaaS
Related

- Puppet
- Chef
- Docker
- Etc.
Configuration as code
Java
Tools
Java PaaS
Related

- Cloudbees
- Openshift
- Oracle
- Heroku
Public PaaS
Java
Tools
Java PaaS
Related

- Apprenda
- Stackato
- Stratalux
- Jelastic
Private PaaS
Java
Tools
Java PaaS
Related

- Vagrant
- AWS opsworks
- VisualOps
- Jelastic
- Skytap
Promising
Java
Tools
Java PaaS
Related

- Features
- Technology stack
- Security and compliance
- Infrastructure
- Extensibility
Choose a PaaS
Internet
Things
Future Smart home
Java Smart car
Current Smart home
Wearables
Java robots with ROS
FIRST
How to talk to your house
Internet
Things







How to talk to your house
Internet
Things



Java Smart car @keynote
Internet
Things



Java Smart car @keynote
Internet
Things



Warp speed !!




Smart home for masses
Internet
Things






Smart home Standards
Internet
Things
Wearables



Internet
Things
Wearables



Internet
Things
Wearables



Internet
Things
Wearables



Internet
Things
Wearables



Internet
Things
Wearables



Nowadays:
- Lots of devices available
- Devices with predefined features
- No Real standard
- Hard to combine products
Internet
Things
Wearables








Internet
Things
Wearables



Internet
Things
Wearables



Internet
Things
Wearables




Internet
Things
Wearables



Internet
Things
Wearables



Java Robots & ROS
Internet
Things


Controlling Robots
Using Blender
Juggie
Java Robots & ROS
Internet
Things

ROS
- Message bus
- Publish subscribe
- RPC
- Platform unaware
- Parameter service
- Concepts: JMS and JNDI
Java Robots & ROS
Internet
Things

(cool) Open source libraries
- CMU Sphynx
- OpenDial
- Faceshift
Java Robots & ROS
Internet
Things


Challenges:


- Establish build tools
- RaspBerry Pi and ROS
- Not well documented
- Communicating between C++ and java is tricky
Internet
Things


Impressions

