4. • nvented by Martin Odersky.
I
• izza Into Java http://bit.ly/cudrM4
P
• hen GJ
T
• tarted 2001, First release 2003
S
• cala Hybrid (Functional and OOP)
S
Programming Language
• tatically typed.
S
• very value an object (var a = 2)
E
• very operation a method call ( 1 + (2))
E
• ompiles to java byte code and runs on
C
the JVM
• println (“Hello, World”)
• ariable with var or val… encouraging
V
immutability.
• ethod with def keyword
M
• Traits instead of interface
• attern matching (eg: exceptions)
P
• igh Order Function
H
• ML easier parsing
X
• omain Specific Language(DSL)
D
5. Basic Scala Code on REPL:
object Ljc extends Application{ ---------------------- 1
println("Hello, London Java Community!”)
}
val group = “London Java Community” ------------- 2
def ljc (group: String ) :Unit = println(group)
List(3.5, 2.5, 1.5) map(_* 2) -------------3
6. Basic Scala Code on REPL:
trait LjcTrait { ---------------- 4
def doSomething() {
println(“Which Group is this: “)}
def computeSomething = “London Java Community” .length * 10
}
class Ljc extends LjcTrait {-----------5
override def toString = “London Java Community”
override def dosomething (){
println(“Which Group is this: “+toString+”!”)
}
7. “Apache Wicket” is component based
Java web framework, originally created
Jonathan Locke In 2004.
8. Why Wicket ?
- Wicket encourages total separation between plain Java code and HTML, with
the help of meaningful abstractions. (i.e. allows the java code to handle all the
logic)
- Wicket provides excellent support and management of server side state
transparently.
- Very little XML configuration is required to get your web application going. this
is not the case when compared to some other frameworks that are largely
dependent on XML config kind of files.
- And finally, it does not have any special mark up that you would have to learn
afresh (i.e. just HTML tags are marked with a simple and very unnoticeable
“wicket:id” tag, and you are done).