Changes for page WebObjects with Scala

Last modified by Ravi Mendis on 2011/05/10 02:10

From version 429.1
edited by Ravi Mendis
on 2009/12/16 00:07
Change comment: There is no comment for this version
To version 432.1
edited by Ravi Mendis
on 2010/01/18 00:11
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,10 +1,13 @@
1 1  === What is Scala? ===
2 2  
3 -Scala is a modern language not unlike Groovy.
4 -It is said to be more powerful (and faster) than Groovy or Ruby which has been the reason for its adoption at sites like Twitter.
3 +Scala is a language for concurrent computing.
4 +In this day and age of multi-core processors, concurrent computing can't be ignored.
5 5  
6 -Many of its features and paradigms favor multi-threading and concurrency. Some of these may not be unfamiliar to Objective-C and WebObjects developers. Here's a summary:
6 +Many of Scala's features have been designed with concurrency in mind.
7 +Some of these may not be unfamiliar to Objective-C or WebObjects developers.
7 7  
9 +Here's a quick summary:
10 +
8 8  |= |= Objective-C |= Java |= Scala
9 9  |= Mutable/Immuable Datatypes | Collections //e.g: NSArray/NSMutableArray// | No | Yes
10 10  |= Closures | Blocks (//Extension//) | No | Anonymous Functions
... ... @@ -23,14 +23,11 @@
23 23  
24 24  === Why Use Scala? ===
25 25  
26 -With Web 2.0, building concurrent WebObjects applications is a must.
27 -Developing and maintaining a concurrent or multi-threaded WebObjects application can be challenging.
29 +Scala is inherently thread-safe.
30 +It has concurrency that is effectively built-in to the language.
28 28  
29 -Scala offers concurrency that is (effectively) built-in to the language and is inherently thread-safe.
30 -In other words, developing Ajax (i.e asynchronous communication) with WO will require concurrent request handling and thread-safe code, for which Scala is a better choice than Java.
32 +So for WebObjects developers, Scala offers itself as a powerful, safe and easy-to-use solution for concurrent applications. (In other words, Scala Actors can be used for problems that would have normally required threads).
31 31  
32 -In addition it may offer new solutions for concurrency in WebObjects and EOF.
33 -
34 34  === Can WebObjects be Programmed In Scala? ===
35 35  
36 36  Yes. It is very simple.
... ... @@ -117,7 +117,7 @@
117 117  ==== Simplified Exception Handling ====
118 118  
119 119  Scala doesn't force you to catch exceptions unlike in Java.
120 -In addition, the syntax employs Scala's very powerful pattern matching to handle different exceptions.
120 +In addition, the syntax employs Scala's very powerful **pattern matching** to handle exceptions.
121 121  
122 122  In Java:
123 123