490 likes | 617 Vues
In this insightful presentation, Johannes Brodwall, Chief Scientist at Exilesoft Global, explores the philosophy and practical application of learning new technologies, emphasizing the value of test-driven development (TDD) in modern web applications. With an engaging demonstration using a phonebook web app, Brodwall addresses common misconceptions about TDD, clarifies the difference between integration and unit tests, and provides strategies for efficient refactoring and design growth. Join us to unlock the potential of your existing technologies and improve your development practices.
E N D
Bare-knuckle web development DevDay.LK Johannes Brodwall, Chief scientist Exilesoft Global @jhannes
Philosophy Demonstration Ruminations
Learn new technologies OR Learn new things about your technology
Framework light Test-driven No calculators
How much time do you spend In debugger? Waiting for build? On Stackoverflow?
“… 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...)
Test for web applications Specifying requirements with tests The difference betweenrealistic slow tests (aka “integration”)and limited fast tests (aka “unit”) Dependencies in your tests What does the web server do? Refactoring shortcuts Growing design Alternatives to HTML templates (maybe)
Those are my principles, and if you don't like them... well, I have others. - Groucho Marx
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. - George Bernard Shaw
95 % test coverage 5-10 seconds
95 % test coverage 5-10 seconds < 1 day to create «framework»
SOAP: Construct XML POST on HttpURLConnection
@Override public String getCountryByIp(String ipAddress) { Document soapRequest = soapElement("S:Envelope", $("S:Body", wsxElement("wsx:GetGeoIP", $("wsx:IPAddress", ipAddress)))); Document soapResponseendpoint.postRequest(getSOAPAction(), soapRequest); return$(soapResponse).xpath("/Envelope/Body/*") .xpath("GetGeoIPResult/CountryName").text(); }
Don’t just learn new technologies => Learn new approaches, techniques and features about the technology you use
Thank you jbr@exilesoft.com http://johannesbrodwall.com http://exilesoft.com/exilee @jhannes Believe nothing on the faith of traditions.Do not believe a thing because many people speak of it. Do not believe on the faith of the sages of the past. Do not believe what you yourself have imagined. After examination, believe what you yourself have testedand found to be reasonable - Buddha