Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 430.1
edited by Ravi Mendis
on 2009/12/16 00:07
on 2009/12/16 00:07
Change comment:
There is no comment for this version
To version 434.1
edited by Ravi Mendis
on 2010/01/20 00:31
on 2010/01/20 00:31
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,15 +1,18 @@ 1 1 === What is Scala? === 2 2 3 -Scala is a modernlanguagenotunlikeGroovy.4 -I tissaidto be more powerful (andfaster)than Groovyor Ruby which has beenthereasonforitsadoption atsiteslike 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 11 11 |= Static variables | Yes | Yes | No 12 -|= Static methods /functions15 +|= Static methods or functions| Yes | Yes | No 13 13 |= Concurrency | [[Grand Central Dispatch>>http://en.wikipedia.org/wiki/Grand_Central_Dispatch]] (//Extension//)| //Threads// |[[Actors>>http://en.wikipedia.org/wiki/Actor_model]] 14 14 |= |= Weakly Typed |=--Strongly Typed--|= Strongly Typed 15 15 ... ... @@ -23,14 +23,11 @@ 23 23 24 24 === Why Use Scala? === 25 25 26 - WithWeb 2.0, building concurrentWebObjectsapplicationsisamust.27 - Developing and maintaininga concurrentor multi-threadedWebObjects applicationcanbechallenging.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