apocalypse now! johannes brodwall exilesoft jav a

106
Apo calypse now! Johannes Brodwall Exilesoft Ja va

Upload: gerard-stamey

Post on 01-Apr-2015

223 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Apocalypse now!

Johannes BrodwallExilesoft

Java

Page 2: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Etter 15 års erfaring fra IT bransjen i Norge, innså Johannes Brodwall:

“Det er immari kaldt her!”

Nå jobber han for IT bransjen i Sri Lanka.

Men er fortsatt mest i kalde Norge.

Page 3: Apocalypse now! Johannes Brodwall Exilesoft Jav a

I love the smell of XML in the morning.

It smells like… victory.

Page 4: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Prelude:

Page 5: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Where are the Java projects going?

Page 6: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Maybe it is just me…

… but customers: “Java = meh”

… and I surprised myself by agreeing

Page 7: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Java is my favorite language, but…

… Oracle is ruining it… JBoss is ruining it

… SpringSource is ruining it… you guys are ruining it

Page 8: Apocalypse now! Johannes Brodwall Exilesoft Jav a

«Don’t reinvent the wheel»

- «Everywhere», 20XX by Everyone

Page 9: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 10: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Part I:

Page 11: Apocalypse now! Johannes Brodwall Exilesoft Jav a

The nightmare

Page 12: Apocalypse now! Johannes Brodwall Exilesoft Jav a

XML APIs gone wild

Page 13: Apocalypse now! Johannes Brodwall Exilesoft Jav a

A simple XML file

Page 14: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Parsing with DOM

Page 15: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 16: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Whops – right this time!

Page 17: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 18: Apocalypse now! Johannes Brodwall Exilesoft Jav a

But the file may vary

Page 19: Apocalypse now! Johannes Brodwall Exilesoft Jav a

And the Java gets… worse

Page 20: Apocalypse now! Johannes Brodwall Exilesoft Jav a

And worse

Page 21: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Making it worse

Page 22: Apocalypse now! Johannes Brodwall Exilesoft Jav a

I know!Let’s use JAXB!

Page 23: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 24: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Just need to deal with this null

pointer…

Page 25: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 26: Apocalypse now! Johannes Brodwall Exilesoft Jav a

And this other one…

Page 27: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 28: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 29: Apocalypse now! Johannes Brodwall Exilesoft Jav a

But wait – they didn’t follow the

XSD!

Page 30: Apocalypse now! Johannes Brodwall Exilesoft Jav a

(Of course they didn’t)

Page 31: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 32: Apocalypse now! Johannes Brodwall Exilesoft Jav a

And we need to map it to a domain

object

Page 33: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 34: Apocalypse now! Johannes Brodwall Exilesoft Jav a

There must be a tool for that!

Page 35: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 36: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Running away

Page 37: Apocalypse now! Johannes Brodwall Exilesoft Jav a

The Java EE software development process

Page 38: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Exception

Google

Stack overflow

TweakDeploy

Waaaaait

Poke

Page 39: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Those that get it• JavaScript• Ruby• Python• Clojure?

Those that don’t• Scala• JSF• Groovy• Clojure?

“Those who cannot learn from history are doomed to repeat it.”- George Santayana

Page 40: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Are you using technology to solve

your problems?

Page 41: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Or so that you don’t have to face your

problems?

Page 42: Apocalypse now! Johannes Brodwall Exilesoft Jav a

… yet

Page 43: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Part II:

Page 44: Apocalypse now! Johannes Brodwall Exilesoft Jav a

The dream

Page 45: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Java’s greatest gift

The IDE

Page 46: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 47: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 48: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 49: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“I can see how TDD works for toy examples…”

Page 50: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“… but how can we use it when we have all these

really complicated technologies???”

Page 51: Apocalypse now! Johannes Brodwall Exilesoft Jav a

(Hint:“all these complicated technologies”

I think I see your problem right here...)

Page 52: Apocalypse now! Johannes Brodwall Exilesoft Jav a

How to make real problems more like

toy problems?

Page 53: Apocalypse now! Johannes Brodwall Exilesoft Jav a

(Tip: Not by getting more toys)

Page 54: Apocalypse now! Johannes Brodwall Exilesoft Jav a

He who gives up compilation time for

refactoring menu options deserves neither

- Benjamin Franklin

Page 55: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Less magic!

Page 56: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Parsing a file

Page 57: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 58: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Oh, that could be null!

Page 59: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 60: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Mapping to a domain object

Page 61: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 62: Apocalypse now! Johannes Brodwall Exilesoft Jav a

A SOAP service is just a retarded REST service

Page 63: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 64: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Part III:

Page 65: Apocalypse now! Johannes Brodwall Exilesoft Jav a

The road to a better place

Page 66: Apocalypse now! Johannes Brodwall Exilesoft Jav a

A better framework

Page 67: Apocalypse now! Johannes Brodwall Exilesoft Jav a

No calculator until…

Page 68: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Don’t use a framework you couldn’t have

written yourself

Page 69: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“But what about transactions?”

Page 70: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“We need an annotation for

that!”

Page 71: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 72: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Have you ever misconfigured

@Transaction?

Page 73: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Three lines of magic!

Page 74: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 75: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 76: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Three lines of magic!plain

Java

Page 77: Apocalypse now! Johannes Brodwall Exilesoft Jav a

You can replace AOP with three

lines of plain Java

Page 78: Apocalypse now! Johannes Brodwall Exilesoft Jav a

A better application server

Page 79: Apocalypse now! Johannes Brodwall Exilesoft Jav a

You probably just need to listen to

HTTP requests

Page 80: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 81: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 82: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 83: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Better templates

Page 84: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 85: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 86: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 87: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Eaxy is not meant for public

consumption

Page 88: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Just to show that Java EE solves wrong problem

Page 89: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 90: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 91: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 92: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 93: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Just to show that Java EE solves wrong problem

Page 94: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 95: Apocalypse now! Johannes Brodwall Exilesoft Jav a
Page 96: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Epilogue:

Page 97: Apocalypse now! Johannes Brodwall Exilesoft Jav a

I don’t really mean it, do I?

Page 98: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Frameworks solve 80% of the job…

Page 99: Apocalypse now! Johannes Brodwall Exilesoft Jav a

… and makes the rest 10 times as hard

Page 100: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“Why did Hibernate suddenly slow down?”

Page 101: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“How do I make JBoss behave the way I

want?”

Page 102: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“How do I implement a custom SOAP header

with JAX-WS?”

Page 103: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“Why did my dependencies not inject?”

Page 104: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“How do I do anything with Spring”

Page 105: Apocalypse now! Johannes Brodwall Exilesoft Jav a

“Java EE is a path to the dark side.

Java EE leads to anger.Anger leads to hate.

Hate leads to … suffering”

- Yoda

Page 106: Apocalypse now! Johannes Brodwall Exilesoft Jav a

Thank [email protected]

http://johannesbrodwall.com

http://exilesoft.com/exilee

http://twitter.com/jhannes