SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Mario Fusco
2010
X6
The feel of Scala
Agilité iPhone Java Incubateur
8:15 Accueil des participantsAccueil des participantsAccueil des participantsAccueil des participants
8:40 Mot des organisateurs & Criée des orateursMot des organisateurs & Criée des orateursMot des organisateurs & Criée des orateursMot des organisateurs & Criée des orateurs
9:00 Keynote de Nicolas Martignole (30 minutes)Keynote de Nicolas Martignole (30 minutes)Keynote de Nicolas Martignole (30 minutes)Keynote de Nicolas Martignole (30 minutes)
9:40
10:40
- A1 -
Le terrain Agile
Jean-Philippe Vigniel
- I1-
Hello iPhone
Stephane Tavera
- J1 -
NOSQL also means RDF stores: an
Android case study
Fabrizio Giudci
- X1 -
Le développement durable
Dominic Williams
11:00
12:00
- A2 -
Integration of User Centered Design
in Agile Development of RIA
J. Borkenhagen, J. DesmaziÚres
- I2 -
DĂ©veloppement d'une application
iPhone pilotée par les tests
Emmanuel Etasse, Van-Charles Tran
- J2 -
La Tequila du développement Web
Nicolas Martignole
- X2 -
Cloud Computing: anatomie et
pratique
Marc-Elian BĂ©gin
12:20
13:20
- A3 -
Adoption de l'Agilité par les usages
Xavier Warzee
- I3 -
Distribution d'applications iPhone
en Entreprise: RĂ©alisation d'un
AppStore interne
GĂ©raud de Laval
- J3 -
Vaadin - Rich Web Applications in
Server-side Java without Plug-ins or
JavaScript
Joonas Lehtinen
- X3 -
Les DVCS sont vos amis
SĂ©bastien Douche
Pause repas (50 minutes)Pause repas (50 minutes)Pause repas (50 minutes)Pause repas (50 minutes)
14h10 Keynote de Regis Medina (30 minutes)Keynote de Regis Medina (30 minutes)Keynote de Regis Medina (30 minutes)Keynote de Regis Medina (30 minutes)
14h50
15h50
- A4 -
Scrum, introduction et mise en
oeuvre avec iceScrum
Claude Aubry
- I4 -
Agile iOS Development
JĂ©rĂŽme Layat, Alexander Osterwalder
- J4 -
JAX-RS and Java EE 6
Paul Sandoz
- X4 -
IT Design & Ergonomy
Pascal Petit, Aude Lussigny
16h10
17h10
- A5 -
Agilité : 10 ans déjà
Thierry Cros
- I5 -
Optimizing iOS applications
Marc-Antoine Scheurer
- J5 -
Ecrivez et automatisez vos tests
fonctionnels avec jBehave
Xavier Bourguignon
- X5 -
NoSQL : EnïŹn de la biodiversitĂ©
dans l'Ă©cosystĂšme des BD
Olivier Mallassi
17h30
18h30
- A6 -
Lean engineering
Jean-Christophe Dubail
- I6 -
iPhone et Agile, l'amour vache
Guillaume Duquesnay
- J6 -
Let's make this test suite run faster
David Gageot
- X6 -
The feel of Scala
Mario Fusco
Mot de la ïŹn & tombolaMot de la ïŹn & tombolaMot de la ïŹn & tombolaMot de la ïŹn & tombola
Programme de la Conférence
www.soft-shake.ch
The Feel of
Mario Fusco
mario.fusco@gmail.com
Twitter: @mariofusco
by
Mario Fusco
mario.fusco@gmail.com
Twitter: @mariofusco
lambdaj.googlecode.com
Do we need a new language?
Keep It Simple
Vs.
Do More With Less
Why Scala?
object-oriented
functional
Java compatible
concise
extensible
statically typed
concurrent
scriptable
Functions and Closures
val isPositive = (x: Int) => x > 0
val numbers = List(-10, 5, 3, -2, 0, 1)
val positiveNumber = numbers.filter(isPostive)
val positiveNumber = numbers.filter(x => x > 0)
val positiveNumber = numbers.filter(_ > 0)
Scala Collections
val animals = List(“dog”, “cat”, “horse”, “rabbit”)
val romanNumbers = Map(1 -> “I”, 2 -> “II”, 3 -> “III”)
animals.foreach(s => println(s))
animals.foreach(println _)
animals.foreach(println)
animals.map(s => s + “s”)
animals.mkString(“, “)
animals.count(s => s.length > 3)
animals.remove(s => s.length > 3)
animals.sort((s,t) => s.charAt(1) < t.charAt(1))
Tuples
val pair = (2, “items”)
println(pair._1) // prints 2
println(pair._2) // prints items
Clear distinction between
mutable and immutable data
val msg = “Hello,world!” // constant
var value = 3 // variable
scala.collection
scala.collection.immutable scala.collection.mutable
Named and default parameters
class Person(name: String = "Goofy", age: Int = 30,
location: String = "Milano")
Person(name = "Mario", age = 36, location = "Lugano")
Person(age = 36, location = "Lugano", name = "Mario")
Person(age = 36, name = "Mario")
Person(age = 36)
Person()
Operator overloading
class Rational (n: Int, d: Int) {
def this(n: Int) = this(n, 1)
def + (that: Rational): Rational =
new Rational(n * that.d + that.n * d, d * that.d)
def + (i: Int): Rational = new Rational(n + i * d, d)
}
Implicit conversion
val a = new Rational(2, 3)
val b = a + 2 // = 8/3
val c = 2 + a // Compilation Error
implicit def intToRational(x: Int) = new Rational(x)
Val c = 2 + a // = 8/3
Options
Tony Hoare, who invented the null reference in 1965 while
working on an object oriented language called ALGOL W, called
its invention his “billion dollar mistake”
val capitals = Map("Italy" -> "Rome", "Switzerland" -> "Bern",
"Germany" -> "Berlin" , "France" -> "Paris")
println(capitals.get("Italy")) // Some(Rome)
println(capitals.get("Spain")) // None
println(capitals.get("Italy").get) // Rome
println(capitals.get("Spain").get) // thorws Exception
println(capitals.get("Spain").getOrElse("Unknown")) // Unknown
Traits
class Animal { def eat(): Unit }
trait Mammal extends Animal { def giveBirth(): Mammal }
trait HasWings extends Animal { def fly(): Unit }
trait HasLegs extends Animal { def walk(): Unit }
class Snake extends Animal
class Frog extends Animal with HasLegs
class Cat extends Animal with Mammal with HasLegs
class Bat extends Animal with Mammal with HasWings
class Chimera extends Animal with Mammal with HasWings with HasLegs
Case classes
trait Expr
case class Var(name: String) extends Expr
case class Number(num: Double) extends Expr
case class Unop(op: String, arg: Expr) extends Expr
case class Binop(op: String, l: Expr, r: Expr) extends Expr
Pattern matching
def simplify(expr: Expr): Expr = expr match {
case Unop("-", Unop("-", e)) => e // Double negation
case Binop("+", e, Number(0)) => e // Adding zero
case Binop("*", e, Number(1)) => e // Multiplying by one
case _ => expr
}
// Simplify double negation: simplified = Var("x")
val simplified = simplify(Unop("-", Unop("-", Var("x"))))
Structural Typing
(duck typing done right)
class Duck {
quack() { println "quack" }
}
doQuack(new Duck)
doQuack(d) { d.quack() }
class Dog {
barf() { println "barf" }
}
doQuack(new Dog)
def doQuack(d:{ def quack():Unit }) =
d.quack()
class Duck {
def quack() = println "quack"
}
doQuack(new Duck)
class Dog {
def barf() = println "barf"
}
doQuack(new Dog)runtime error
compilation
error
Duck typing is the dynamic mechanism that allows to discover a dog cannot
say quack only at runtime... in production ... on friday evening
Actors
val printerActor = actor {
loop {
receive {
case s: String => println("I got a String: " + s)
case i: Int => println("I got an Int: " + i.toString)
case _ => println(" I don’t know what I got ")
}
}
}
printerActor ! "hi there“ // prints “I got a String: hi there”
printerActor ! 23 // prints “I got an Int: 23”
printerActor ! 3.33 // prints “I don’t know what I got”
The ecosystem
Who is using Scala ?
Norbert by LinkedIn
‱ Norbert is a framework written in Scala that
allows to write asynchronous, message based,
client/server applications
‱ Built on Apache ZooKeeper and JBoss Netty,
Norbert to make it easy to build a cluster aware
application
‱ Provides out of the box support for notifications
of cluster topology changes, application specific
routing, load balancing and partitioned workload
‱ Akka is a framework that allows to write simpler
concurrent (yet correct) applications
‱ It provides a higher level of abstraction for
writing concurrent and distributed systems
through (remote) actors
‱ It implements Software Transactional Memory
(STM) turning the Java heap into a transactional
data set with begin/commit/rollback semantic
‱ Fault-tolerant adopting the "Let it crash" /
"Embrace failure" model
SBT (simple-build-tool)
‱ Sbt is a build tool written in Scala
‱ Uses the same directory structure as
Maven for source files
‱ Uses Ivy to resolve dependencies
‱ Compatible with Maven configuration files
‱ Supports testing with ScalaTest
‱ Parallel task execution, including parallel
test execution
Happy Scala programming!
Thanks a lot
Mario Fusco
mario.fusco@gmail.com
Twitter: @mariofusco

Weitere Àhnliche Inhalte

Ähnlich wie soft-shake.ch - The feel of Scala

xlwings - For Python Quants Conference (London 2014)
xlwings - For Python Quants Conference (London 2014)xlwings - For Python Quants Conference (London 2014)
xlwings - For Python Quants Conference (London 2014)xlwings
 
A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9Marcus Lagergren
 
Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)Daniel Luxemburg
 
MacRuby, an introduction
MacRuby, an introductionMacRuby, an introduction
MacRuby, an introductionOlivier Gutknecht
 
Being Expressive in Code
Being Expressive in CodeBeing Expressive in Code
Being Expressive in CodeEamonn Boyle
 
He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!François-Guillaume Ribreau
 
Real-World Functional Programming @ Incubaid
Real-World Functional Programming @ IncubaidReal-World Functional Programming @ Incubaid
Real-World Functional Programming @ IncubaidNicolas Trangez
 
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Christian Schneider
 
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael VaroquauxBuilding a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael VaroquauxPyData
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemGuardSquare
 
PySpark with Juypter
PySpark with JuypterPySpark with Juypter
PySpark with JuypterLi Ming Tsai
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisC4Media
 
Why Kotlin is your next language?
Why Kotlin is your next language? Why Kotlin is your next language?
Why Kotlin is your next language? Aliaksei Zhynhiarouski
 
The things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and AkkaThe things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and AkkaKonrad Malawski
 
Controlando o windows like a boss com o Intel RealSense SDK
Controlando o windows like a boss com o Intel RealSense SDKControlando o windows like a boss com o Intel RealSense SDK
Controlando o windows like a boss com o Intel RealSense SDKAndre Carlucci
 
NYU Hacknight: iOS and OSX ABI
NYU Hacknight: iOS and OSX ABINYU Hacknight: iOS and OSX ABI
NYU Hacknight: iOS and OSX ABIMikhail Sosonkin
 
Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017 Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017 Codemotion
 
Python for System Administrators
Python for System AdministratorsPython for System Administrators
Python for System AdministratorsRoberto Polli
 

Ähnlich wie soft-shake.ch - The feel of Scala (20)

xlwings - For Python Quants Conference (London 2014)
xlwings - For Python Quants Conference (London 2014)xlwings - For Python Quants Conference (London 2014)
xlwings - For Python Quants Conference (London 2014)
 
A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9
 
Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)
 
MacRuby, an introduction
MacRuby, an introductionMacRuby, an introduction
MacRuby, an introduction
 
Being Expressive in Code
Being Expressive in CodeBeing Expressive in Code
Being Expressive in Code
 
He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!
 
Real-World Functional Programming @ Incubaid
Real-World Functional Programming @ IncubaidReal-World Functional Programming @ Incubaid
Real-World Functional Programming @ Incubaid
 
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
 
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael VaroquauxBuilding a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
 
PySpark with Juypter
PySpark with JuypterPySpark with Juypter
PySpark with Juypter
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Why Kotlin is your next language?
Why Kotlin is your next language? Why Kotlin is your next language?
Why Kotlin is your next language?
 
Entering the Fourth Dimension of OCR with Tesseract
Entering the Fourth Dimension of OCR with TesseractEntering the Fourth Dimension of OCR with Tesseract
Entering the Fourth Dimension of OCR with Tesseract
 
The things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and AkkaThe things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and Akka
 
Controlando o windows like a boss com o Intel RealSense SDK
Controlando o windows like a boss com o Intel RealSense SDKControlando o windows like a boss com o Intel RealSense SDK
Controlando o windows like a boss com o Intel RealSense SDK
 
NYU Hacknight: iOS and OSX ABI
NYU Hacknight: iOS and OSX ABINYU Hacknight: iOS and OSX ABI
NYU Hacknight: iOS and OSX ABI
 
Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017 Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse Ăš la volta buona - Codemotion Milan 2017
 
Python for System Administrators
Python for System AdministratorsPython for System Administrators
Python for System Administrators
 

Mehr von soft-shake.ch

soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?soft-shake.ch
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch
 
soft-shake.ch - WebMatrix: Your Web Made Easy
soft-shake.ch - WebMatrix: Your Web Made Easysoft-shake.ch - WebMatrix: Your Web Made Easy
soft-shake.ch - WebMatrix: Your Web Made Easysoft-shake.ch
 
soft-shake.ch - Domotique et robotique avec le micro Framework .NET
soft-shake.ch - Domotique et robotique avec le micro Framework .NETsoft-shake.ch - Domotique et robotique avec le micro Framework .NET
soft-shake.ch - Domotique et robotique avec le micro Framework .NETsoft-shake.ch
 
soft-shake.ch - Clojure Values
soft-shake.ch - Clojure Valuessoft-shake.ch - Clojure Values
soft-shake.ch - Clojure Valuessoft-shake.ch
 
soft-shake.ch - Data grids and Data Grids
soft-shake.ch - Data grids and Data Gridssoft-shake.ch - Data grids and Data Grids
soft-shake.ch - Data grids and Data Gridssoft-shake.ch
 
soft-shake.ch - Data grids and Data Caching
soft-shake.ch - Data grids and Data Cachingsoft-shake.ch - Data grids and Data Caching
soft-shake.ch - Data grids and Data Cachingsoft-shake.ch
 
soft-shake.ch - JBoss AS 7, la révolution
soft-shake.ch - JBoss AS 7, la révolutionsoft-shake.ch - JBoss AS 7, la révolution
soft-shake.ch - JBoss AS 7, la révolutionsoft-shake.ch
 
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch
 
soft-shake.ch - Tests d'intégration JavaEE avec Arquillian
soft-shake.ch - Tests d'intégration JavaEE avec Arquilliansoft-shake.ch - Tests d'intégration JavaEE avec Arquillian
soft-shake.ch - Tests d'intégration JavaEE avec Arquilliansoft-shake.ch
 
soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!soft-shake.ch
 
soft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStream
soft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStreamsoft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStream
soft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStreamsoft-shake.ch
 
soft-shake.ch - An introduction to social architecture
soft-shake.ch - An introduction to social architecturesoft-shake.ch - An introduction to social architecture
soft-shake.ch - An introduction to social architecturesoft-shake.ch
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 
soft-shake.ch - De Hermes RUP Ă  Hermes Scrum
soft-shake.ch - De Hermes RUP Ă  Hermes Scrumsoft-shake.ch - De Hermes RUP Ă  Hermes Scrum
soft-shake.ch - De Hermes RUP Ă  Hermes Scrumsoft-shake.ch
 
soft-shake.ch - Stewardship et motivation
soft-shake.ch - Stewardship et motivationsoft-shake.ch - Stewardship et motivation
soft-shake.ch - Stewardship et motivationsoft-shake.ch
 
soft-shake.ch - Agile qu'es aco : scrum xp lean
soft-shake.ch - Agile qu'es aco : scrum xp leansoft-shake.ch - Agile qu'es aco : scrum xp lean
soft-shake.ch - Agile qu'es aco : scrum xp leansoft-shake.ch
 
soft-shake.ch - Documentation et agilité
soft-shake.ch - Documentation et agilitésoft-shake.ch - Documentation et agilité
soft-shake.ch - Documentation et agilitésoft-shake.ch
 
soft-shake.ch - Agilité = discipline et rigueur ?
soft-shake.ch - Agilité = discipline et rigueur ?soft-shake.ch - Agilité = discipline et rigueur ?
soft-shake.ch - Agilité = discipline et rigueur ?soft-shake.ch
 
soft-shake.ch - Transition agile & Accompagnement au changement
soft-shake.ch - Transition agile & Accompagnement au changementsoft-shake.ch - Transition agile & Accompagnement au changement
soft-shake.ch - Transition agile & Accompagnement au changementsoft-shake.ch
 

Mehr von soft-shake.ch (20)

soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
soft-shake.ch - WebMatrix: Your Web Made Easy
soft-shake.ch - WebMatrix: Your Web Made Easysoft-shake.ch - WebMatrix: Your Web Made Easy
soft-shake.ch - WebMatrix: Your Web Made Easy
 
soft-shake.ch - Domotique et robotique avec le micro Framework .NET
soft-shake.ch - Domotique et robotique avec le micro Framework .NETsoft-shake.ch - Domotique et robotique avec le micro Framework .NET
soft-shake.ch - Domotique et robotique avec le micro Framework .NET
 
soft-shake.ch - Clojure Values
soft-shake.ch - Clojure Valuessoft-shake.ch - Clojure Values
soft-shake.ch - Clojure Values
 
soft-shake.ch - Data grids and Data Grids
soft-shake.ch - Data grids and Data Gridssoft-shake.ch - Data grids and Data Grids
soft-shake.ch - Data grids and Data Grids
 
soft-shake.ch - Data grids and Data Caching
soft-shake.ch - Data grids and Data Cachingsoft-shake.ch - Data grids and Data Caching
soft-shake.ch - Data grids and Data Caching
 
soft-shake.ch - JBoss AS 7, la révolution
soft-shake.ch - JBoss AS 7, la révolutionsoft-shake.ch - JBoss AS 7, la révolution
soft-shake.ch - JBoss AS 7, la révolution
 
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coin
 
soft-shake.ch - Tests d'intégration JavaEE avec Arquillian
soft-shake.ch - Tests d'intégration JavaEE avec Arquilliansoft-shake.ch - Tests d'intégration JavaEE avec Arquillian
soft-shake.ch - Tests d'intégration JavaEE avec Arquillian
 
soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!
 
soft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStream
soft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStreamsoft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStream
soft-shake.ch - DĂ©ploiement continu sur le cloud avec SlipStream
 
soft-shake.ch - An introduction to social architecture
soft-shake.ch - An introduction to social architecturesoft-shake.ch - An introduction to social architecture
soft-shake.ch - An introduction to social architecture
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
soft-shake.ch - De Hermes RUP Ă  Hermes Scrum
soft-shake.ch - De Hermes RUP Ă  Hermes Scrumsoft-shake.ch - De Hermes RUP Ă  Hermes Scrum
soft-shake.ch - De Hermes RUP Ă  Hermes Scrum
 
soft-shake.ch - Stewardship et motivation
soft-shake.ch - Stewardship et motivationsoft-shake.ch - Stewardship et motivation
soft-shake.ch - Stewardship et motivation
 
soft-shake.ch - Agile qu'es aco : scrum xp lean
soft-shake.ch - Agile qu'es aco : scrum xp leansoft-shake.ch - Agile qu'es aco : scrum xp lean
soft-shake.ch - Agile qu'es aco : scrum xp lean
 
soft-shake.ch - Documentation et agilité
soft-shake.ch - Documentation et agilitésoft-shake.ch - Documentation et agilité
soft-shake.ch - Documentation et agilité
 
soft-shake.ch - Agilité = discipline et rigueur ?
soft-shake.ch - Agilité = discipline et rigueur ?soft-shake.ch - Agilité = discipline et rigueur ?
soft-shake.ch - Agilité = discipline et rigueur ?
 
soft-shake.ch - Transition agile & Accompagnement au changement
soft-shake.ch - Transition agile & Accompagnement au changementsoft-shake.ch - Transition agile & Accompagnement au changement
soft-shake.ch - Transition agile & Accompagnement au changement
 

KĂŒrzlich hochgeladen

Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi GonzĂĄlez
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 

KĂŒrzlich hochgeladen (20)

Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 

soft-shake.ch - The feel of Scala

  • 2. AgilitĂ© iPhone Java Incubateur 8:15 Accueil des participantsAccueil des participantsAccueil des participantsAccueil des participants 8:40 Mot des organisateurs & CriĂ©e des orateursMot des organisateurs & CriĂ©e des orateursMot des organisateurs & CriĂ©e des orateursMot des organisateurs & CriĂ©e des orateurs 9:00 Keynote de Nicolas Martignole (30 minutes)Keynote de Nicolas Martignole (30 minutes)Keynote de Nicolas Martignole (30 minutes)Keynote de Nicolas Martignole (30 minutes) 9:40 10:40 - A1 - Le terrain Agile Jean-Philippe Vigniel - I1- Hello iPhone Stephane Tavera - J1 - NOSQL also means RDF stores: an Android case study Fabrizio Giudci - X1 - Le dĂ©veloppement durable Dominic Williams 11:00 12:00 - A2 - Integration of User Centered Design in Agile Development of RIA J. Borkenhagen, J. DesmaziĂšres - I2 - DĂ©veloppement d'une application iPhone pilotĂ©e par les tests Emmanuel Etasse, Van-Charles Tran - J2 - La Tequila du dĂ©veloppement Web Nicolas Martignole - X2 - Cloud Computing: anatomie et pratique Marc-Elian BĂ©gin 12:20 13:20 - A3 - Adoption de l'AgilitĂ© par les usages Xavier Warzee - I3 - Distribution d'applications iPhone en Entreprise: RĂ©alisation d'un AppStore interne GĂ©raud de Laval - J3 - Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaScript Joonas Lehtinen - X3 - Les DVCS sont vos amis SĂ©bastien Douche Pause repas (50 minutes)Pause repas (50 minutes)Pause repas (50 minutes)Pause repas (50 minutes) 14h10 Keynote de Regis Medina (30 minutes)Keynote de Regis Medina (30 minutes)Keynote de Regis Medina (30 minutes)Keynote de Regis Medina (30 minutes) 14h50 15h50 - A4 - Scrum, introduction et mise en oeuvre avec iceScrum Claude Aubry - I4 - Agile iOS Development JĂ©rĂŽme Layat, Alexander Osterwalder - J4 - JAX-RS and Java EE 6 Paul Sandoz - X4 - IT Design & Ergonomy Pascal Petit, Aude Lussigny 16h10 17h10 - A5 - AgilitĂ© : 10 ans dĂ©jĂ  Thierry Cros - I5 - Optimizing iOS applications Marc-Antoine Scheurer - J5 - Ecrivez et automatisez vos tests fonctionnels avec jBehave Xavier Bourguignon - X5 - NoSQL : EnïŹn de la biodiversitĂ© dans l'Ă©cosystĂšme des BD Olivier Mallassi 17h30 18h30 - A6 - Lean engineering Jean-Christophe Dubail - I6 - iPhone et Agile, l'amour vache Guillaume Duquesnay - J6 - Let's make this test suite run faster David Gageot - X6 - The feel of Scala Mario Fusco Mot de la ïŹn & tombolaMot de la ïŹn & tombolaMot de la ïŹn & tombolaMot de la ïŹn & tombola Programme de la ConfĂ©rence www.soft-shake.ch
  • 3. The Feel of Mario Fusco mario.fusco@gmail.com Twitter: @mariofusco by
  • 5. Do we need a new language? Keep It Simple Vs. Do More With Less
  • 7. Functions and Closures val isPositive = (x: Int) => x > 0 val numbers = List(-10, 5, 3, -2, 0, 1) val positiveNumber = numbers.filter(isPostive) val positiveNumber = numbers.filter(x => x > 0) val positiveNumber = numbers.filter(_ > 0)
  • 8. Scala Collections val animals = List(“dog”, “cat”, “horse”, “rabbit”) val romanNumbers = Map(1 -> “I”, 2 -> “II”, 3 -> “III”) animals.foreach(s => println(s)) animals.foreach(println _) animals.foreach(println) animals.map(s => s + “s”) animals.mkString(“, “) animals.count(s => s.length > 3) animals.remove(s => s.length > 3) animals.sort((s,t) => s.charAt(1) < t.charAt(1))
  • 9. Tuples val pair = (2, “items”) println(pair._1) // prints 2 println(pair._2) // prints items
  • 10. Clear distinction between mutable and immutable data val msg = “Hello,world!” // constant var value = 3 // variable scala.collection scala.collection.immutable scala.collection.mutable
  • 11. Named and default parameters class Person(name: String = "Goofy", age: Int = 30, location: String = "Milano") Person(name = "Mario", age = 36, location = "Lugano") Person(age = 36, location = "Lugano", name = "Mario") Person(age = 36, name = "Mario") Person(age = 36) Person()
  • 12. Operator overloading class Rational (n: Int, d: Int) { def this(n: Int) = this(n, 1) def + (that: Rational): Rational = new Rational(n * that.d + that.n * d, d * that.d) def + (i: Int): Rational = new Rational(n + i * d, d) }
  • 13. Implicit conversion val a = new Rational(2, 3) val b = a + 2 // = 8/3 val c = 2 + a // Compilation Error implicit def intToRational(x: Int) = new Rational(x) Val c = 2 + a // = 8/3
  • 14. Options Tony Hoare, who invented the null reference in 1965 while working on an object oriented language called ALGOL W, called its invention his “billion dollar mistake” val capitals = Map("Italy" -> "Rome", "Switzerland" -> "Bern", "Germany" -> "Berlin" , "France" -> "Paris") println(capitals.get("Italy")) // Some(Rome) println(capitals.get("Spain")) // None println(capitals.get("Italy").get) // Rome println(capitals.get("Spain").get) // thorws Exception println(capitals.get("Spain").getOrElse("Unknown")) // Unknown
  • 15. Traits class Animal { def eat(): Unit } trait Mammal extends Animal { def giveBirth(): Mammal } trait HasWings extends Animal { def fly(): Unit } trait HasLegs extends Animal { def walk(): Unit } class Snake extends Animal class Frog extends Animal with HasLegs class Cat extends Animal with Mammal with HasLegs class Bat extends Animal with Mammal with HasWings class Chimera extends Animal with Mammal with HasWings with HasLegs
  • 16. Case classes trait Expr case class Var(name: String) extends Expr case class Number(num: Double) extends Expr case class Unop(op: String, arg: Expr) extends Expr case class Binop(op: String, l: Expr, r: Expr) extends Expr
  • 17. Pattern matching def simplify(expr: Expr): Expr = expr match { case Unop("-", Unop("-", e)) => e // Double negation case Binop("+", e, Number(0)) => e // Adding zero case Binop("*", e, Number(1)) => e // Multiplying by one case _ => expr } // Simplify double negation: simplified = Var("x") val simplified = simplify(Unop("-", Unop("-", Var("x"))))
  • 18. Structural Typing (duck typing done right) class Duck { quack() { println "quack" } } doQuack(new Duck) doQuack(d) { d.quack() } class Dog { barf() { println "barf" } } doQuack(new Dog) def doQuack(d:{ def quack():Unit }) = d.quack() class Duck { def quack() = println "quack" } doQuack(new Duck) class Dog { def barf() = println "barf" } doQuack(new Dog)runtime error compilation error Duck typing is the dynamic mechanism that allows to discover a dog cannot say quack only at runtime... in production ... on friday evening
  • 19. Actors val printerActor = actor { loop { receive { case s: String => println("I got a String: " + s) case i: Int => println("I got an Int: " + i.toString) case _ => println(" I don’t know what I got ") } } } printerActor ! "hi there“ // prints “I got a String: hi there” printerActor ! 23 // prints “I got an Int: 23” printerActor ! 3.33 // prints “I don’t know what I got”
  • 21. Who is using Scala ?
  • 22. Norbert by LinkedIn ‱ Norbert is a framework written in Scala that allows to write asynchronous, message based, client/server applications ‱ Built on Apache ZooKeeper and JBoss Netty, Norbert to make it easy to build a cluster aware application ‱ Provides out of the box support for notifications of cluster topology changes, application specific routing, load balancing and partitioned workload
  • 23. ‱ Akka is a framework that allows to write simpler concurrent (yet correct) applications ‱ It provides a higher level of abstraction for writing concurrent and distributed systems through (remote) actors ‱ It implements Software Transactional Memory (STM) turning the Java heap into a transactional data set with begin/commit/rollback semantic ‱ Fault-tolerant adopting the "Let it crash" / "Embrace failure" model
  • 24. SBT (simple-build-tool) ‱ Sbt is a build tool written in Scala ‱ Uses the same directory structure as Maven for source files ‱ Uses Ivy to resolve dependencies ‱ Compatible with Maven configuration files ‱ Supports testing with ScalaTest ‱ Parallel task execution, including parallel test execution
  • 25. Happy Scala programming! Thanks a lot Mario Fusco mario.fusco@gmail.com Twitter: @mariofusco