bare-knuckle web development agile prague johannes brodwall, chief scientist exilesoft global

56
Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Upload: merilyn-parker

Post on 05-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Bare-knuckle web development

Agile PragueJohannes Brodwall, Chief scientist

Exilesoft Global

Page 2: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

• Philosophy• Demonstration

• Ruminations

Page 3: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Part I:

Page 4: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

The bare-knuckle philosophy

Page 5: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

• Fear => Pair• Hubris => Speed (and fun)

Page 6: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

High impact with low ceremony

Page 7: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

• Framework light• Test-driven

• No calculators

Page 8: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Light on framework

Page 9: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Frameworks solve 80% of the job…

Page 10: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

… and makes the rest 10 times as hard

Page 11: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

“Why did Hibernate suddenly slow down?”

Page 12: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

“How do I make JBoss behave the way I

want?”

Page 13: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

“How do I implement a custom SOAP header

with JAX-WS?”

Page 14: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

“Why did my dependencies not inject?”

Page 15: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

“How do I do anything with Spring”

Page 16: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Test-driven

Page 17: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Fast feedback cycle

Page 18: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

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

Page 19: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

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

really complicated technologies???”

Page 20: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

(Hint:“all these complicated technologies”

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

Page 21: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Don’t use a calculator…

Page 22: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Part II:

Page 23: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Demo: Phonebook web app

Page 24: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Part III:

Page 25: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

The real world

Page 26: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Build your app this way?

Page 27: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Probably not

Page 28: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Well, why not?

Page 29: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

I am most likely insane

Page 30: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Understand what’s going on

Page 31: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

«Don’t reinvent the wheel»

Page 32: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global
Page 33: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Are you using technology to solve

your problems?

Page 34: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Or so that you don’t have to face your

problems?

Page 35: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

... yet.

Page 36: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Overheated brain

Page 37: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

95 % test coverage

Page 38: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

95 % test coverage

5-10 seconds

Page 39: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

95 % test coverage

5-10 seconds

< 1 day to create «framework»

Page 40: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

SOAP:1. Construct XML

2. POST on HttpURLConnection

Page 41: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

@Overridepublic String getCountryByIp(String ipAddress) { Document soapRequest = soapElement("S:Envelope", $("S:Body", wsxElement("wsx:GetGeoIP", $("wsx:IPAddress", ipAddress)))); Document soapResponse endpoint.postRequest(getSOAPAction(), soapRequest); return $(soapResponse).xpath("/Envelope/Body/*") .xpath("GetGeoIPResult/CountryName").text();}

Page 42: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

No friction

Page 43: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Thinking in tests

Page 44: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

1.

Page 45: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Guiding test/

Web tests/

Acceptance test/

Usage Flow test

Page 46: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

2.

Page 47: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Get the infrastructure to work =>

separate out responsibility

Page 48: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

3.

Page 49: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Fine grained tests for internal logic

Page 50: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Shallow, then deep

Page 51: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Shallow, then deep

(without changing tests)

Page 52: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Conclusion:

Page 53: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

YAGNI

Page 54: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

No calculator until…

Page 55: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Don’t use a framework you couldn’t have

written yourself

Page 56: Bare-knuckle web development Agile Prague Johannes Brodwall, Chief scientist Exilesoft Global

Thank [email protected]

http://johannesbrodwall.com

http://exilesoft.com/exilee

http://twitter.com/jhannes