apocalypse now! johannes brodwall exilesoft jav a
TRANSCRIPT
Apocalypse now!
Johannes BrodwallExilesoft
Java
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.
I love the smell of XML in the morning.
It smells like… victory.
Prelude:
Where are the Java projects going?
Maybe it is just me…
… but customers: “Java = meh”
… and I surprised myself by agreeing
Java is my favorite language, but…
… Oracle is ruining it… JBoss is ruining it
… SpringSource is ruining it… you guys are ruining it
«Don’t reinvent the wheel»
- «Everywhere», 20XX by Everyone
Part I:
The nightmare
XML APIs gone wild
A simple XML file
Parsing with DOM
Whops – right this time!
But the file may vary
And the Java gets… worse
And worse
Making it worse
I know!Let’s use JAXB!
Just need to deal with this null
pointer…
And this other one…
But wait – they didn’t follow the
XSD!
(Of course they didn’t)
And we need to map it to a domain
object
There must be a tool for that!
Running away
The Java EE software development process
Exception
Stack overflow
TweakDeploy
Waaaaait
Poke
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
Are you using technology to solve
your problems?
Or so that you don’t have to face your
problems?
… yet
Part II:
The dream
Java’s greatest gift
The IDE
“I can see how TDD works for toy examples…”
“… but how can we use it when we have all these
really complicated technologies???”
(Hint:“all these complicated technologies”
I think I see your problem right here...)
How to make real problems more like
toy problems?
(Tip: Not by getting more toys)
He who gives up compilation time for
refactoring menu options deserves neither
- Benjamin Franklin
Less magic!
Parsing a file
Oh, that could be null!
Mapping to a domain object
A SOAP service is just a retarded REST service
Part III:
The road to a better place
A better framework
No calculator until…
Don’t use a framework you couldn’t have
written yourself
“But what about transactions?”
“We need an annotation for
that!”
Have you ever misconfigured
@Transaction?
Three lines of magic!
Three lines of magic!plain
Java
You can replace AOP with three
lines of plain Java
A better application server
You probably just need to listen to
HTTP requests
Better templates
Eaxy is not meant for public
consumption
Just to show that Java EE solves wrong problem
Just to show that Java EE solves wrong problem
Epilogue:
I don’t really mean it, do I?
Frameworks solve 80% of the job…
… and makes the rest 10 times as hard
“Why did Hibernate suddenly slow down?”
“How do I make JBoss behave the way I
want?”
“How do I implement a custom SOAP header
with JAX-WS?”
“Why did my dependencies not inject?”
“How do I do anything with Spring”
“Java EE is a path to the dark side.
Java EE leads to anger.Anger leads to hate.
Hate leads to … suffering”
- Yoda
Thank [email protected]
http://johannesbrodwall.com
http://exilesoft.com/exilee
http://twitter.com/jhannes