JavaZone TL;DA

Posted by


    A short JavaZone TL;DA (Too Long; Didn't Attend) from the talks i attended.

    Hvordan få en kamel til å danse talks about how they made their new airline travel search. They had to fetch data from 25 different airlines and travel agencies and each of them had their own API. They wanted to streamline the development by using the least amount of code lines while still creating human readable code for each of the 25 API adaptations they had to make. They set out with 3 different teams choosing 3 different technologies. They each implemented one API each. The solution they landed on was Apache Camel as a consumer for the APIs and they wrote it in Groovy (even though Java was a requirement for the assignment).

    TDD with AngularJS and TypeScript

    Sirar Salih talks about the importance of front-end testing, and how we can test AngularJS applications written in TypeScript. His conclusion was to use Jasmine/Karma and make tests before you write code (TDD). Personally i think the use of TypeScript with AngularJS seems like too much overhead, but that may be only because of the examples which seem to require alot of TypeScript code for a simple test.

    Choose the right tools for the job - avoid “hammer first” solutions

    Aksel Gresvig talks about how you shouldn’t just go for the most hip/used framework for any web-application, you should rather focus on picking the one that suits your needs the most. Most of the time you don’t need all the functionality of a larger framework, can you find a smaller one that still fulfills your needs or use none at all? The conclusion was in most cases to use a framework, but pick it carefully.

    Making steaks from sacred cows

    Kevlin Henney takes some established code patterns/standards and reviews them. Should you only use one assert per test method? Should an Exception have a better name? What should the constructor do? What would be a better name for tests?

    Conclusion: A test should test 1 thing and probably shouldnt have many asserts, but one assert can implicitly mean other asserts (no exceptions etc), so saying 1 assert per test case is wrong. However avoid asserts, then more code then more asserts in a test case!

    Exceptions should not include the Exception keyword and be better named (ie: NullPointerException -> NullDeferred, ArithmeticException -> WholeNumberDividedByZero.

    Test-methods should have better names (drop keywords “should” and “test”, name the method after what its actually doing).

    Hvorfor bytter vi ut en webapplikasjon som virker?

    A talk about swapping from server-generated struts HTML to javascript and angularJS onepage-application in Telenor. The advantages is that you can create a much more dynamic website which can lead to an improved user-experience.

    Webutvikling med Clojure

    Odin Hole Standal talks about how we can use Clojure for web development, and what makes it good. Top points:

    • Its immutable, which gives better thread safety

    • It runs on JVM so it can run any Java library you want

    • The syntax is simpler than Java

    • Nice libraries for templating, http and routing makes it easy to start

    Polymer: Shadow DOMS, Custom Components and the Future of Web

    WebComponents is emerging as a new standard to build webapps, however the adaption is slow which is why Google has created PolymerJS to fill the gaps between the future and the present. Brian Sletten talks about how it works and how we can use PolymerJS to create webapps of the future now. Seemed a bit similar to Google’s own Polymer talk on Google I/O.

    Connecting Physical Devices to the Web - Event Driven Architecture using WebSocket for the Internet of Things

    Peter Moskovitz talks about websockets and how we can use it to communicate between physical devices and the web. He brings up examples as sharing the screen with a pc and an iPad on the same webpage, which can be useful for games (see Google Racer) and controlling a RaspberryPi-ed RC car via websockets through the cloud. I can see the point of using tablets for games, and enabling multi-touch on computers, and i agree that its cool to use websockets to run a RC car. It’s cool, as  a proof-of-concept but I’m not sure it is the best way to control a RC car!