Code Examples

Scala features

Introducing Scala

  • Step 1 - An example that should be understandable for Java and Ruby programmers alike
  • Step 2 - A few functional concepts like immutable objects and Actors
  • Particle swarm optimization - Putting basic Scala constructs together in an example of biologically inspired optimization

Data structures

Concurrent Programming

Logic Programming

Calling Java

  • JAXB schemagen - Annotate a Scala class to get an XML Schema from JAXB
  • Wrapping JMX - One technique for wrapping JMX
  • Defining Bean Properties - stop writing those setX(...) and getX() methods
  • Hello Swing - Tiny ‘Hello World’ program using swing
  • Basic Web Applet - Simple Scala web-applet, with Java version for comparison.
  • JUnit Tests - using the JUnit test framework for Scala code
  • Simplifying JDBC - Scala’s smart type system and shorthands make it easy
  • ScalaGUI - A Scala framework wrapping Swing. It uses event loops to solve the inversion-of-control problem of Swing’s callback events. It uses multiple-inheritance for clean composition of widget properties.
  • Integrating with Jaxen - Implements a Jaxen Navigator so XPath expressions can easily be used to navigate through Scala objects.

Compressed Deployment

Compared to OCaml

  • Sudoku Solver - Using Scala to write a brute-force succinct Sudoku Solver

Compared to Common Lisp

External code examples sites

  • Literate Programs - A wiki site that wants to present algorithms in different programming languages.
  • Book examples - “Structure and Interpretation of Computer Programs” (Hal Abelson, Jerry Sussman and Julie Sussman, MIT Press) examples in Scala and other p.l.
  • Scala servlet with Maven and Jetty - example how to create ever simplest Web app

 
code/start.txt · Last modified: 2010/02/11 09:10
 
Recent changes RSS feed Valid XHTML 1.0 Driven by DokuWiki