Skip to content

tflander/Java7OrScala

Repository files navigation

Java7OrScala

Overview

This project supports a presentation for exposing the pain of Java. It contains code examples written in both Scala and Java. Observe how much cleaner the Scala code is compared to Java. Although 3rd party Java libraries exist to clean up awkward Java code, it seems more fair to compare core Java7 to core Scala.

The Examples

  • Musical Fruit: Beans (aka Value Objects, Data Transfer Objects)
  • Only the Lonely: Singletons
  • To Be or Not To Be: Optional Things
  • Hollywood: Inversion of control
  • Cake Boss: List Decorating
  • Family Ties: Polymorphic Behavior
  • After-Market Parts: Java / Scala Interoperability
  • Censorship: Filtering data
  • Mob Rule: Grouping data