Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 428.1
edited by Ravi Mendis
on 2010/01/14 22:54
on 2010/01/14 22:54
Change comment:
There is no comment for this version
To version 431.1
edited by Ravi Mendis
on 2010/01/18 00:11
on 2010/01/18 00:11
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,13 +1,12 @@ 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 Rub. 5 -This 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. 6 6 7 -Many of its features andparadigmsfavor multi-threadingandconcurrency.8 - It could besaidthat Scala was designedfrom theground upforconcurrency.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. 9 9 10 - Someof thesemaynot beunfamiliar to Objective-Cand WebObjectsdevelopers. Here's a summary:9 +Here's a quick summary: 11 11 12 12 |= |= Objective-C |= Java |= Scala 13 13 |= Mutable/Immuable Datatypes | Collections //e.g: NSArray/NSMutableArray// | No | Yes ... ... @@ -27,14 +27,11 @@ 27 27 28 28 === Why Use Scala? === 29 29 30 - WithWeb 2.0, building concurrentWebObjectsapplicationsisamust.31 - 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. 32 32 33 -Scala offers concurrency that is (effectively) built-in to the language and is inherently thread-safe. 34 -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). 35 35 36 -In addition Scala offers itself as a solution for tasks that typically would have involved threads in a WebObjects application 37 - 38 38 === Can WebObjects be Programmed In Scala? === 39 39 40 40 Yes. It is very simple. ... ... @@ -121,7 +121,7 @@ 121 121 ==== Simplified Exception Handling ==== 122 122 123 123 Scala doesn't force you to catch exceptions unlike in Java. 124 -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. 125 125 126 126 In Java: 127 127