Wiki source code of WebObjects with Scala

Version 290.1 by Ravi Mendis on 2009/09/15 19:33

Hide last authors
Ravi Mendis 21.1 1 === What is Scala? ===
Ravi Mendis 195.1 2
3 Scala is a modern language not unlike Groovy.
Ravi Mendis 209.1 4 It is said to be more powerful (and faster) than Groovy or Rails which has been the reason for its adoption at sites like Twitter.
Ravi Mendis 195.1 5
6 === Why Use Scala? ===
7
Ravi Mendis 284.1 8 In a Web 2.0, building concurrent WebObjects applications is a must.
Ravi Mendis 195.1 9 Developing and maintaining a concurrent or multi-threaded WebObjects application can be challenging.
10
Ravi Mendis 263.1 11 Scala offers concurrency built into the language.
Ravi Mendis 284.1 12 So it may offer new solutions to WO developers...
Ravi Mendis 195.1 13
Ravi Mendis 247.1 14 === Can WebObjects be Programmed With Scala? ===
Ravi Mendis 195.1 15
Ravi Mendis 288.1 16 Yes. It is very simple.
17 Scala compiles to java bytecode. Hence using it with WebObjects is fairly straightforward.
Ravi Mendis 195.1 18
Ravi Mendis 286.1 19 == How to Develop WebObjects With Scala ==
Ravi Mendis 195.1 20
Ravi Mendis 231.1 21 1. [[Install the Scala eclipse IDE>>http://www.scala-lang.org/node/94]]
Ravi Mendis 286.1 22 1. Add Scala support to your project
23 11. Right-click your project in the WO Explorer
Ravi Mendis 288.1 24 11. In the context menu select Scala -> Add Scala Nature
25 1. Convert or use ##.scala## instead of ##.java## source
Ravi Mendis 195.1 26
27 {{note title="Note"}}
28
Ravi Mendis 263.1 29 This is for Eclipse/WOLips developers
Ravi Mendis 195.1 30
31 {{/note}}
Ravi Mendis 290.1 32
33 == WO Scala Example ==
34
35 {{attachments patterns=".*zip"}}{{/attachments}}