the scala programming language
TRANSCRIPT
Introduction to Scala
Haim MichaelNovember 22th, 2015
All logos, trademarks and brand names used in this presentation, such as the logo of Scalaor any of its frameworks, belong to their respective owners. Haim Michael and LifeMichael are independent and not related, affiliated or connected neither with Scala, EPFL, TypeSafe or any of the companies and the technologies mentioned in this presentation.
Li fe M
ic hae l .c o
m
Table of ContentLi fe M
ic hae l .c o
m● What is Scala?
● The Scala Story
● Scala Strengths
● Scala in The Industry
● Scala Comparison
● IDEs for Scala
● The Main Documentation
● Learning Resources
● Questions & Answers
What is Scala?● Scala is a blend of object oriented programming and a
functional one. This mixture is the source of its strength.
● Scala is compatible with Java. The two languages are
interoperable with each other. We can integrate the code
we write in Scala with our code in Java and vice verso.
● Scala is kind of an improvement to Java. Not only that
Scala re-uses Java's types it also “dresses them up”.
scala-lang.org
Li fe M
ic hae l .c o
m
The Scala Story● The development of Scala started in 2003 at EPFL by
Martin Odersky, who had previously worked on
developing the first Java compilers.
● Typesafe was founded in 2011 in order to assist
companies with the development of software
applications using the Scala programming language and
its frameworks.
www.typesafe.com
Li fe M
ic hae l .c o
m
The Scala Story● HIT is one of the first academic institutions in the world in
which students learn Scala.
Li fe M
ic hae l .c o
m
http://www.scala-lang.org/old/node/203.html
Scala StrengthsLi fe M
ic hae l .c o
mScala
Java
● Comparing with Java, when using Scala our code
becomes significantly shorter.
class Rectangle {
private double width;
private double height;
public Rectangle (double width, double height) {
this.width = width;
this.height = height;
}
}
class Rectangle(var width: Double, var height: Double)
Scala Strengths Li fe M
ic hae l .c o
m
● Scala runs on top of the JVM. We can seamlessly
integrate the code we write in Scala with code written in
Java.
● We can integrate Scala with .NET. The code in Scala
can be compiled into CLR byte code.
● The Scala compiler inferences the static types been
used. We don't need to tell it the types of our variables.
Scala Strengths Li fe M
ic hae l .c o
m
● Revolutionary frameworks (e.g. AKKA, Finagle) that
were developed in Scala allow us to develop reactive
systems. Check www.reactivemanifesto.org for more info
about reactive programming.
● Scala provides us with sophisticated patterns matching
capabilities. The switch statement on steroids.
● Functions in Scala are first class objects. In Scala we
can easily develop and use higher order functions.
Scala Strengths Li fe M
ic hae l .c o
m
● The operators in Scala are functions. We can easily
overload operators that already exist and invent new
ones.
● Scala allows us to define either objects, classes or traits.
The use of traits puts a new flexibility to the use of
interfaces.
● Scala provides us with futures and promises, simplifying
the development of concurrent and distributed programs.
Scala in The Industry● Scala is highly popular on the server side. Many of the
companies that use Scala are either startup based with
highly talented people or very big companies with the
required budget.
Li fe M
ic hae l .c o
m
Scala ComparisonLi fe M
ic hae l .c o
m
Learning Curve
Pop
ular
ity
Java
Scala
Easy Difficult
Low
H
igh
PHP
JavaScriptC#
Scala ComparisonLi fe M
ic hae l .c o
m
Object Oriented
Fu
nctio
nal
Java
Scala
Weak Strong
Wea
k
Str
ong
PHPJavaScript
C#
Scala ComparisonLi fe M
ic hae l .c o
m
Development Process
Pla
tform
Dep
ende
ncy
Java
Scala
Easy Difficult
Low
Hig
h
PHP
JavaScript
C#
Scala ComparisonLi fe M
ic hae l .c o
m
Hosting Services
Ope
n S
ourc
e C
omm
unity Java
Scala
Few Many
Sm
all
Big
PHP
JavaScript
C#
IDEs for Scala Development● You can develop in Scala using the command line. You
can alternatively use one of the available Java IDEs. You
will need to install a plugin that allows coding in Scala.
Li fe M
ic hae l .c o
m
scala-ide.org www.netbeans.org
www.jetbrains.com/idea/
The Main Documentation● You can find the complete API documentation online at
http://www.scala-lang.org/documentation/.
Li fe M
ic hae l .c o
m
Learning Resources● In order to start developing in Scala the minimum would be
installing JDK and the Scala SDK right after.
● You can find the Scala SDK available for free at
http://www.scala-lang.org/download/.
Li fe M
ic hae l .c o
m
Learning Resources● You can find an excellent free course by Martin Odersky
available for free at www.coursera.org.
Li fe M
ic hae l .c o
m
Learning Resources● You can find the following excellent books written by Martin
Odersky.
Li fe M
ic hae l .c o
m
Learning Resources● You can find the Israeli Guide to Scala available for free
personal use at http://www.scalabook.co.il.
Li fe M
ic hae l .c o
m
Learning Resources● You can find a growing number of online free courses about
various topics in the Scala at http://abelski.lifemichael.com.
Li fe M
ic hae l .c o
m
Learning Resources● You can find the biggest professional group about Scala on
Facebook at
https://www.facebook.com/groups/203788593023488
Li fe M
ic hae l .c o
m
Questions & Answers
If you enjoyed my seminar please leave me a comment
at http://speakerpedia.com/speakers/life-michael.
Thanks for your time!
Haim.
Li fe M
ic hae l .c o
m