SlideShare a Scribd company logo
1 of 29
Isomorphic programming in Scala
and WebDevelopment in Scala.JS
Alberto Maria Angelo Paro
CODEMOTION MILAN - SPECIAL EDITION
10 – 11 NOVEMBER 2017
Alberto Paro
 Master Degree in Computer Science Engineering at Politecnico di
Milano
 Author of 3 books about ElasticSearch from 1 to 5.x + 6 Tech
reviews
 Big Data Trainer, Developer and Consulting on Big data
Technologies (Akka, Playframework, Apache Spark, Reactive
Programming) e NoSQL (Accumulo, Hbase, Cassandra,
ElasticSearch, Kafka and MongoDB)
 Evangelist for Scala e Scala.JS Language
 CTO at Quinnteus PTE LD (Singapore)
Who it’s using Scala
Isomorphic Scala
one language => many target
Scala is a language that is:
• Multi-paradigm
• Strong-typed
• Functional
• Object Oriented
Scala compiler compile code in a special AST (Abstract Syntactic Tree)
There are different byte-cote emitter:
 JVM
 Javascript
 Native (binary based on LLVM)
The same code can be compiled and run in different target based on
your needs.
Javascript issues
A lot of language “defects”:
 Easy to forget var
It’s born a script language, not designed to scale large applications
(SPA or many modules)
 And Web is moving toward very big and complex JS applications
Jquery => AngularJS => React.Js (an hype in complexity)
A lot of language compiles to javascript (Coffeescript, Typescript,
…) due to these issues and more:
https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS
What’s Scala.JS
"Scala.js is a compiler that converts Scala code into the equivalent,
executable Javascript”
Write Scala, not Javascript - the compiler handles the rest.
It brings the advantages of Scala into client web development.
Support of “all” Scala (also macros)
SBT integration - IDE support as “standard” Scala language
Compiled code is reasonable small (GCC => Google Closure Compiler)
SourceMaps for easy debug in Web browser
Interoperability with Javascript (JS => ScalaJS , ScalaJS => JS)
• Scala.js code calls Javascript
• Scala.js can export classes and methods to Javascript
• http://www.scala-js.org/
Scala.js Compiler Pipeline
Main.class
Main$.class
Main.Scala
Main.sjsir
Main$.sjsir
script- fastopt.js
500k - 3000Kb
script- opt.js
100k - 1000kb
Scalac
Scala.js
Plugin
Optimizer
Renderer
Google C
C
On developing Web Apps
No code reuse between client and server
• A least you must learn two languages (Scala + JS)
• Algorithms and models must be rewritten
RCP/Ajax calls with “no type”
No compiler checks
Javascript issues:
Forgot a “var”
Js => [“10”, “10”, “10”, “10”].map(parseInt)
[10, NaN, 2, 3]
['10','10','10','10','10'].map(function(x){return parseInt(x);})
On dev. Web Apps with ScalaJS
Application in only one language
 and the language is Scala
Strong typing in the application and RCP layer
 Autowire library
Scala typesafe
 document.getElementByld(“foo”)
“Standard” behavior
 scala.js> List("10", "10", "10", "10").map(parseInt)
List(10, 10, 10, 10)
…
Some Semantic differences from JS
Javascript VM != Java VM
 Division by 0 doesn’t throw exception
 Checking the type of number is based on its numeric value, not class
instance.
 Scala.Unit is represented as undefined in Javascript
 JavaScript regular expressions are slightly different from Java regular
expressions.
 Different behavior of some exceptions
name := "Foo root project”
lazy val root = project.in(file(".")).
aggregate(fooJS, fooJVM).
settings(publish := {},
publishLocal := {})
lazy val foo = crossProject.in(file(".")).
settings(
name := "foo",
version := "0.1-SNAPSHOT",
scalaVersion := "2.12.3”,
libraryDependencies += "com.lihaoyi" %%% "scalatags" % "0.4.3"
).
jvmSettings(
// Add JVM-specific settings here
).
jsSettings(
// Add JS-specific settings here )
lazy val fooJVM = foo.jvm
lazy val fooJS = foo.js
Simple multi target JS/JVM
<project root>
+- jvm
| +- src/main/scala
+- js
| +- src/main/scala
+- shared
+- src/main/scala
SBT configuration JS/JVM
Libraries
When using REST in themes, my code can break due to:
 Model changes:
• Who removed a field from …?
• Who renamed the field …?
• Who changed the type of the field …?
 Endpoints changes:
• A new parameter is required
• You changed my endpoint name!
o /item/executeNLP => /item/execute-nlp
• Changed return type: i.e. models
 This situation becomes more evident in large teams
or in very fast development cycles.
Safe Server-Client Communication
Issues
Type safe RPC between client and server
API trait in shared code
Server code implement the backend code
Client calls in a type safe way
// shared interface
trait Api{
def add(x: Int, y: Int, z: Int): Int
}
Safe Server Client Communication
// server-side router and implementation
object Server extends autowire.Server...
object ApiImpl extends Api
def add(x: Int, y: Int, z: Int) = x + y + z
}
// client-side callsite
import autowire._ // needed for correct macro application
object Client extends autowire.Client...
Client[Api].add(1, 2, 3).call(): Future[Int]
// | | |
// | | The T is pickled and wrapped in a Future[T]
// | The arguments to that method are pickled automatically
// Call a method on the `Api` trait
Autowire
https://github.com/lihaoyi/scalatags
libraryDependencies += "com.lihaoyi" %%% "scalatags" % "0.6.7”
ScalaTags is a small XML/HTML construction library for Scala.
Since ScalaTags is pure Scala, any editor that understands Scala will understand
scalatags.
Not only do you get syntax highlighting, you also get code completion:
 Autocomplete
 Error Highlighting
 In-editor documentation:
And all the other good things (jump to definition, extract method, etc.) you're used to in
a statically typed language.
No more digging around in templates which mess up the highlighting of your HTML
editor, or waiting months for the correct plugin to materialize.
Strong Typed HTML Syntax for JVM/JS
ScalaTags
Strong Typed HTML Syntax for JVM/JS
html(
head(
script(src:="..."),
script(
"alert('Hello World')"
)
),
body(
div(
h1(id:="title", "This is a title"),
p("This is a big paragraph of text")
)
)
)
<html>
<head>
<script src="..."></script>
<script>alert('Hello World')</script>
</head>
<body>
<div>
<h1 id="title">This is a title</h1>
<p>This is a big paragraph of text</p>
</div>
</body>
</html>
ScalaTags - Example
https://github.com/greencatsoft/scalajs-angular
libraryDependencies += "com.greencatsoft" %%% "scalajs-angular" % "0.7”
“scalajs-angular aims to help developers build AngularJS based applications in type safe
manner with Scala language.”
Schermata 2015-04-26 alle 10.56.47.png
AngularJS – 1/2
It provides annotation helper for AngularJS Services, Controllers, Directives, and Filters.
It wraps ngRoute for routing in your SPA.
AngularJS – 2/2
I love ReactJS because:
 Your code is clear. It is arranged into components, each with its own defined
responsibility. (Web component, better dividi-et-impera approach)
 Your app is predictable. It’s very clear where data flows, and what happens when a
user does something.
 Your app is fast. React is really, really fast, creating a better experience for users,
even if you have a ton of data. (Virtual DOM, …)
 Your app is standards-based. React adds layers only when it needs to. You feel like
you are actually writing JavaScript and HTML, not some magic template language.
 Surprise, you’re an app developer. React breaks down barriers across platforms, by
applying its same model across the board. This means that once you learn the React
way of structuring an web application, you have a huge head start on developing a
native iOS or Android app, thanks to react-native. Surely this will happen to other
platforms. Schermata 2015-04-26alle 10.56.47.png
http://aspiringwebdev.com/why-react-js-matters-for-developers/
ScalaJs - React
I love ScalaJS ReactJS because:
• It composed by simple concepts:
• Properties (Props) are immutable
• State is mutable
• a render method
• Everything is strong typed: VDOM, Components
• Easy to extend components• Schermata 2015-04-26 alle 10.56.47.png
Javascript
var HelloMessage = React.createClass({displayName:
'HelloMessage',
render: function() {
return React.createElement("div", null, "Hello ",
this.props.name);
}
});
React.render(React.createElement(HelloMessage, {name:
”Alberto"}), mountNode);• Schermata 2015-04-26 alle 10.56.47.png
Scala
val HelloMessage = ScalaComponent.builder[String]("HelloMessage")
.render($ => <.div("Hello ", $.props))
.build
HelloMessage(”Alberto") .renderIntoDOM(mountNode)Schermata 2015-04-26 alle 10.56.47.
https://github.com/japgolly/scalajs-react
http://japgolly.github.io/scalajs-react/
ScalaJs - React
Scala
https://github.com/japgolly/scalajs-react
http://japgolly.github.io/scalajs-react/
ScalaJS React provide also many extra:
• Scalaz support ("com.github.japgolly.scalajs-react" %%% "ext-scalaz71" % ”1.1.1")
• Monocle support (Lens for case class) ("com.github.japgolly.scalajs-react" %%% "ext-
monocle" % ”1.1.1")
• Testing support ("com.github.japgolly.scalajs-react" %%% "test" % ”1.1.1" % "test")
val s = Simulation.focus >> ChangeEventData("hi").simulation >> Simulation.blur
• Module extra ("com.github.japgolly.scalajs-react" %%% "extra" % ”1.1.1") with
 Router
 Component Mixins:
 Broadcaster and Listenable
 ExternalVar
 LogLifecycle
 OnUmount
 SetInterval
ScalaJs - React
Scala
https://github.com/japgolly/scalacss
http://japgolly.github.io/scalacss/book/
ScalaCSS aims to bring type-safety and clarity to:
• creating CSS
• using CSS
• maintaining CSS
• correctness of CSS
You can create standalone CSS like SCSS/LESS, or you can create inline styles to be
applied to directly without the need to manually manage class names.
Being 100% Scala, you benefit from all the normal type-aware advantages like jump-to-
definition of a style, type-safe keys and values, worry-free refactoring, etc.
Example: http://japgolly.github.io/scalacss/book/quickstart/standalone.html
ScalaCSS – CSS typesafe
Links
Scala
A lot of libraries are linked in Scala.js Homepage (http://www.scala-js.org/)
For a complete projects, the best resources are:
 SPA Tutorial (https://github.com/ochrons/scalajs-spa-tutorial) with doc
(http://ochrons.github.io/scalajs-spa-tutorial/css-in-scala.html):
 Play Scala.Js Example (https://github.com/hussachai/play-scalajs-showcase)
 https://scalafiddle.io/sf/4beVrVc/1 Rendering
 https://scalafiddle.io/sf/n6lR8Xh/2 Some samples
 https://github.com/circe/circe JSON as a Pro!
 https://twitter.github.io/scala_school/ Scala Course from twitter
Scala Native
 http://www.scala-native.org/en/latest/
Useful Links
Questions
Thank You Alberto Paro
alberto.paro@gmail.com
@aparo77We are hiring (IT, GB, SG)!
Tip & Tricks
To manage the javascript library, Scala needs the code signature of the Javascript methods.
First search on scala.js site or github scalajs
trait JQuery extends js.Object {
/**
* Adds the specified class(es) to each of the set of matched elements.
*/
def addClass(classNames:String):JQuery = js.native
def addClass(func:js.ThisFunction2[Element, Int, String, String]):JQuery = js.native
@JSName("after")
def afterInternal(content:js.Any):JQuery = js.native
@JSName("append")
def appendInternal(content:js.Any*):JQuery = js.native
@JSName("appendTo")
def appendToInternal(target:js.Any):JQuery = js.native
@JSName("attr")
def attrInternal(attributeName:String):UndefOr[String] = js.native
$(“div#myId”).addClass("myclass")
Facading Javascript Libraries
“Automatically” bootstrap your façade from a typescript definition
(https://github.com/borisyankov/DefinitelyTyped): ~900 library already “typed”.
The process is not 100 % accurate, so manual editing is often needed afterwards. This can
be improved, but not to perfection, because the features offered by the type systems of
TypeScript and Scala.js differ in some subtle ways.
Usage
$ sbt 'run somelib.d.ts SomeLib.scala'
https://github.com/sjrd/scala-js-ts-importer
Facading Javascript Libraries

More Related Content

What's hot

Integration Testing with Selenium
Integration Testing with SeleniumIntegration Testing with Selenium
Integration Testing with SeleniumAll Things Open
 
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaAndrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaScala Italy
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsScala Italy
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016takezoe
 
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Codemotion
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Matthew Groves
 
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...Codemotion
 
Scal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and AngularScal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and AngularKnoldus Inc.
 
Why scala - executive overview
Why scala - executive overviewWhy scala - executive overview
Why scala - executive overviewRazvan Cojocaru
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS LimitationsValeri Karpov
 
Scala.js & friends: SCALA ALL THE THINGS
Scala.js & friends: SCALA ALL THE THINGSScala.js & friends: SCALA ALL THE THINGS
Scala.js & friends: SCALA ALL THE THINGSChris Birchall
 
Logging in Scala
Logging in ScalaLogging in Scala
Logging in ScalaJohn Nestor
 
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Codemotion
 
The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015jbandi
 
NoSQL design pitfalls with Java
NoSQL design pitfalls with JavaNoSQL design pitfalls with Java
NoSQL design pitfalls with JavaOtávio Santana
 

What's hot (20)

Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad PečanacJavantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
 
Integration Testing with Selenium
Integration Testing with SeleniumIntegration Testing with Selenium
Integration Testing with Selenium
 
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaAndrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.js
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016
 
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Scal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and AngularScal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and Angular
 
Why scala - executive overview
Why scala - executive overviewWhy scala - executive overview
Why scala - executive overview
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
 
Scala.js & friends: SCALA ALL THE THINGS
Scala.js & friends: SCALA ALL THE THINGSScala.js & friends: SCALA ALL THE THINGS
Scala.js & friends: SCALA ALL THE THINGS
 
Logging in Scala
Logging in ScalaLogging in Scala
Logging in Scala
 
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
 
The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015
 
NoSQL design pitfalls with Java
NoSQL design pitfalls with JavaNoSQL design pitfalls with Java
NoSQL design pitfalls with Java
 
Automate Thyself
Automate ThyselfAutomate Thyself
Automate Thyself
 

Viewers also liked

James Williams - Demystifying Constraint Layout - Codemotion Milan 2017
James Williams - Demystifying Constraint Layout - Codemotion Milan 2017James Williams - Demystifying Constraint Layout - Codemotion Milan 2017
James Williams - Demystifying Constraint Layout - Codemotion Milan 2017Codemotion
 
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017Vincenzo Chianese - REST, for real! - Codemotion Milan 2017
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017Codemotion
 
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...Codemotion
 
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017Codemotion
 
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...Matteo Valoriani - How Augment your Reality: different perspective on the Rea...
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...Codemotion
 
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...Codemotion
 
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...Codemotion
 
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017Codemotion
 
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...Codemotion
 
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017Codemotion
 
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...Codemotion
 
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...Codemotion
 
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...Codemotion
 
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017Codemotion
 
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...Codemotion
 
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Codemotion
 
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017Codemotion
 
Engineering Design for Facebook
Engineering Design for FacebookEngineering Design for Facebook
Engineering Design for FacebookCodemotion
 

Viewers also liked (20)

James Williams - Demystifying Constraint Layout - Codemotion Milan 2017
James Williams - Demystifying Constraint Layout - Codemotion Milan 2017James Williams - Demystifying Constraint Layout - Codemotion Milan 2017
James Williams - Demystifying Constraint Layout - Codemotion Milan 2017
 
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017Vincenzo Chianese - REST, for real! - Codemotion Milan 2017
Vincenzo Chianese - REST, for real! - Codemotion Milan 2017
 
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
 
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017
Giovanni Laquidara - Hello ARCore - Codemotion Milan 2017
 
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...Matteo Valoriani - How Augment your Reality: different perspective on the Rea...
Matteo Valoriani - How Augment your Reality: different perspective on the Rea...
 
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...
Claudio Carboni - ArcGIS platformthe foundation of your idea - Codemotion Mil...
 
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...
Anna Makarudze - Django Girls: Inspiring women to fall in love with programmi...
 
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
 
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...
Gabriele Petronella - Mythical trees and where to find them - Codemotion Mila...
 
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
 
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...
Tiffany Conroy - Remote device sign-in – Authenticating without a keyboard - ...
 
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
 
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...
Massimo Bonanni - L'approccio ai microservizi secondo Service Fabric - Codemo...
 
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017
Maurizio Moriconi - ARKit: Augmented Reality made simple - Codemotion Milan 2017
 
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...
Erik Tiengo - Embedding Cisco Spark and Location applications (ESRI) into bus...
 
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
 
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
 
5
55
5
 
Engineering Design for Facebook
Engineering Design for FacebookEngineering Design for Facebook
Engineering Design for Facebook
 
9
99
9
 

Similar to Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopment in Scala.JS - Codemotion Milan 2017

Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSAlberto Paro
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS Hamed Farag
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsSebastian Springer
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Java script Basic
Java script BasicJava script Basic
Java script BasicJaya Kumari
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksJuho Vepsäläinen
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkAlex Zeltov
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java DevelopersYakov Fain
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17GreeceJS
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationAndrew Rota
 

Similar to Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopment in Scala.JS - Codemotion Milan 2017 (20)

Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJS
 
Full Stack Scala
Full Stack ScalaFull Stack Scala
Full Stack Scala
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
10 jsp-scripting-elements
10 jsp-scripting-elements10 jsp-scripting-elements
10 jsp-scripting-elements
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.js
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and Tricks
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with spark
 
Ml2
Ml2Ml2
Ml2
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Node.js vs Play Framework
Node.js vs Play FrameworkNode.js vs Play Framework
Node.js vs Play Framework
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
Jet presentation
Jet presentationJet presentation
Jet presentation
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
 
JavaScript Basics with baby steps
JavaScript Basics with baby stepsJavaScript Basics with baby steps
JavaScript Basics with baby steps
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 

More from Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

More from Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Recently uploaded

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopment in Scala.JS - Codemotion Milan 2017

  • 1. Isomorphic programming in Scala and WebDevelopment in Scala.JS Alberto Maria Angelo Paro CODEMOTION MILAN - SPECIAL EDITION 10 – 11 NOVEMBER 2017
  • 2. Alberto Paro  Master Degree in Computer Science Engineering at Politecnico di Milano  Author of 3 books about ElasticSearch from 1 to 5.x + 6 Tech reviews  Big Data Trainer, Developer and Consulting on Big data Technologies (Akka, Playframework, Apache Spark, Reactive Programming) e NoSQL (Accumulo, Hbase, Cassandra, ElasticSearch, Kafka and MongoDB)  Evangelist for Scala e Scala.JS Language  CTO at Quinnteus PTE LD (Singapore)
  • 4. Isomorphic Scala one language => many target Scala is a language that is: • Multi-paradigm • Strong-typed • Functional • Object Oriented Scala compiler compile code in a special AST (Abstract Syntactic Tree) There are different byte-cote emitter:  JVM  Javascript  Native (binary based on LLVM) The same code can be compiled and run in different target based on your needs.
  • 5. Javascript issues A lot of language “defects”:  Easy to forget var It’s born a script language, not designed to scale large applications (SPA or many modules)  And Web is moving toward very big and complex JS applications Jquery => AngularJS => React.Js (an hype in complexity) A lot of language compiles to javascript (Coffeescript, Typescript, …) due to these issues and more: https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS
  • 6. What’s Scala.JS "Scala.js is a compiler that converts Scala code into the equivalent, executable Javascript” Write Scala, not Javascript - the compiler handles the rest. It brings the advantages of Scala into client web development. Support of “all” Scala (also macros) SBT integration - IDE support as “standard” Scala language Compiled code is reasonable small (GCC => Google Closure Compiler) SourceMaps for easy debug in Web browser Interoperability with Javascript (JS => ScalaJS , ScalaJS => JS) • Scala.js code calls Javascript • Scala.js can export classes and methods to Javascript • http://www.scala-js.org/
  • 7. Scala.js Compiler Pipeline Main.class Main$.class Main.Scala Main.sjsir Main$.sjsir script- fastopt.js 500k - 3000Kb script- opt.js 100k - 1000kb Scalac Scala.js Plugin Optimizer Renderer Google C C
  • 8. On developing Web Apps No code reuse between client and server • A least you must learn two languages (Scala + JS) • Algorithms and models must be rewritten RCP/Ajax calls with “no type” No compiler checks Javascript issues: Forgot a “var” Js => [“10”, “10”, “10”, “10”].map(parseInt) [10, NaN, 2, 3] ['10','10','10','10','10'].map(function(x){return parseInt(x);})
  • 9. On dev. Web Apps with ScalaJS Application in only one language  and the language is Scala Strong typing in the application and RCP layer  Autowire library Scala typesafe  document.getElementByld(“foo”) “Standard” behavior  scala.js> List("10", "10", "10", "10").map(parseInt) List(10, 10, 10, 10) …
  • 10. Some Semantic differences from JS Javascript VM != Java VM  Division by 0 doesn’t throw exception  Checking the type of number is based on its numeric value, not class instance.  Scala.Unit is represented as undefined in Javascript  JavaScript regular expressions are slightly different from Java regular expressions.  Different behavior of some exceptions
  • 11. name := "Foo root project” lazy val root = project.in(file(".")). aggregate(fooJS, fooJVM). settings(publish := {}, publishLocal := {}) lazy val foo = crossProject.in(file(".")). settings( name := "foo", version := "0.1-SNAPSHOT", scalaVersion := "2.12.3”, libraryDependencies += "com.lihaoyi" %%% "scalatags" % "0.4.3" ). jvmSettings( // Add JVM-specific settings here ). jsSettings( // Add JS-specific settings here ) lazy val fooJVM = foo.jvm lazy val fooJS = foo.js Simple multi target JS/JVM <project root> +- jvm | +- src/main/scala +- js | +- src/main/scala +- shared +- src/main/scala SBT configuration JS/JVM
  • 13. When using REST in themes, my code can break due to:  Model changes: • Who removed a field from …? • Who renamed the field …? • Who changed the type of the field …?  Endpoints changes: • A new parameter is required • You changed my endpoint name! o /item/executeNLP => /item/execute-nlp • Changed return type: i.e. models  This situation becomes more evident in large teams or in very fast development cycles. Safe Server-Client Communication Issues
  • 14. Type safe RPC between client and server API trait in shared code Server code implement the backend code Client calls in a type safe way // shared interface trait Api{ def add(x: Int, y: Int, z: Int): Int } Safe Server Client Communication // server-side router and implementation object Server extends autowire.Server... object ApiImpl extends Api def add(x: Int, y: Int, z: Int) = x + y + z } // client-side callsite import autowire._ // needed for correct macro application object Client extends autowire.Client... Client[Api].add(1, 2, 3).call(): Future[Int] // | | | // | | The T is pickled and wrapped in a Future[T] // | The arguments to that method are pickled automatically // Call a method on the `Api` trait Autowire
  • 15. https://github.com/lihaoyi/scalatags libraryDependencies += "com.lihaoyi" %%% "scalatags" % "0.6.7” ScalaTags is a small XML/HTML construction library for Scala. Since ScalaTags is pure Scala, any editor that understands Scala will understand scalatags. Not only do you get syntax highlighting, you also get code completion:  Autocomplete  Error Highlighting  In-editor documentation: And all the other good things (jump to definition, extract method, etc.) you're used to in a statically typed language. No more digging around in templates which mess up the highlighting of your HTML editor, or waiting months for the correct plugin to materialize. Strong Typed HTML Syntax for JVM/JS ScalaTags
  • 16. Strong Typed HTML Syntax for JVM/JS html( head( script(src:="..."), script( "alert('Hello World')" ) ), body( div( h1(id:="title", "This is a title"), p("This is a big paragraph of text") ) ) ) <html> <head> <script src="..."></script> <script>alert('Hello World')</script> </head> <body> <div> <h1 id="title">This is a title</h1> <p>This is a big paragraph of text</p> </div> </body> </html> ScalaTags - Example
  • 17. https://github.com/greencatsoft/scalajs-angular libraryDependencies += "com.greencatsoft" %%% "scalajs-angular" % "0.7” “scalajs-angular aims to help developers build AngularJS based applications in type safe manner with Scala language.” Schermata 2015-04-26 alle 10.56.47.png AngularJS – 1/2
  • 18. It provides annotation helper for AngularJS Services, Controllers, Directives, and Filters. It wraps ngRoute for routing in your SPA. AngularJS – 2/2
  • 19. I love ReactJS because:  Your code is clear. It is arranged into components, each with its own defined responsibility. (Web component, better dividi-et-impera approach)  Your app is predictable. It’s very clear where data flows, and what happens when a user does something.  Your app is fast. React is really, really fast, creating a better experience for users, even if you have a ton of data. (Virtual DOM, …)  Your app is standards-based. React adds layers only when it needs to. You feel like you are actually writing JavaScript and HTML, not some magic template language.  Surprise, you’re an app developer. React breaks down barriers across platforms, by applying its same model across the board. This means that once you learn the React way of structuring an web application, you have a huge head start on developing a native iOS or Android app, thanks to react-native. Surely this will happen to other platforms. Schermata 2015-04-26alle 10.56.47.png http://aspiringwebdev.com/why-react-js-matters-for-developers/ ScalaJs - React
  • 20. I love ScalaJS ReactJS because: • It composed by simple concepts: • Properties (Props) are immutable • State is mutable • a render method • Everything is strong typed: VDOM, Components • Easy to extend components• Schermata 2015-04-26 alle 10.56.47.png Javascript var HelloMessage = React.createClass({displayName: 'HelloMessage', render: function() { return React.createElement("div", null, "Hello ", this.props.name); } }); React.render(React.createElement(HelloMessage, {name: ”Alberto"}), mountNode);• Schermata 2015-04-26 alle 10.56.47.png Scala val HelloMessage = ScalaComponent.builder[String]("HelloMessage") .render($ => <.div("Hello ", $.props)) .build HelloMessage(”Alberto") .renderIntoDOM(mountNode)Schermata 2015-04-26 alle 10.56.47. https://github.com/japgolly/scalajs-react http://japgolly.github.io/scalajs-react/ ScalaJs - React
  • 21. Scala https://github.com/japgolly/scalajs-react http://japgolly.github.io/scalajs-react/ ScalaJS React provide also many extra: • Scalaz support ("com.github.japgolly.scalajs-react" %%% "ext-scalaz71" % ”1.1.1") • Monocle support (Lens for case class) ("com.github.japgolly.scalajs-react" %%% "ext- monocle" % ”1.1.1") • Testing support ("com.github.japgolly.scalajs-react" %%% "test" % ”1.1.1" % "test") val s = Simulation.focus >> ChangeEventData("hi").simulation >> Simulation.blur • Module extra ("com.github.japgolly.scalajs-react" %%% "extra" % ”1.1.1") with  Router  Component Mixins:  Broadcaster and Listenable  ExternalVar  LogLifecycle  OnUmount  SetInterval ScalaJs - React
  • 22. Scala https://github.com/japgolly/scalacss http://japgolly.github.io/scalacss/book/ ScalaCSS aims to bring type-safety and clarity to: • creating CSS • using CSS • maintaining CSS • correctness of CSS You can create standalone CSS like SCSS/LESS, or you can create inline styles to be applied to directly without the need to manually manage class names. Being 100% Scala, you benefit from all the normal type-aware advantages like jump-to- definition of a style, type-safe keys and values, worry-free refactoring, etc. Example: http://japgolly.github.io/scalacss/book/quickstart/standalone.html ScalaCSS – CSS typesafe
  • 23. Links
  • 24. Scala A lot of libraries are linked in Scala.js Homepage (http://www.scala-js.org/) For a complete projects, the best resources are:  SPA Tutorial (https://github.com/ochrons/scalajs-spa-tutorial) with doc (http://ochrons.github.io/scalajs-spa-tutorial/css-in-scala.html):  Play Scala.Js Example (https://github.com/hussachai/play-scalajs-showcase)  https://scalafiddle.io/sf/4beVrVc/1 Rendering  https://scalafiddle.io/sf/n6lR8Xh/2 Some samples  https://github.com/circe/circe JSON as a Pro!  https://twitter.github.io/scala_school/ Scala Course from twitter Scala Native  http://www.scala-native.org/en/latest/ Useful Links
  • 26. Thank You Alberto Paro alberto.paro@gmail.com @aparo77We are hiring (IT, GB, SG)!
  • 28. To manage the javascript library, Scala needs the code signature of the Javascript methods. First search on scala.js site or github scalajs trait JQuery extends js.Object { /** * Adds the specified class(es) to each of the set of matched elements. */ def addClass(classNames:String):JQuery = js.native def addClass(func:js.ThisFunction2[Element, Int, String, String]):JQuery = js.native @JSName("after") def afterInternal(content:js.Any):JQuery = js.native @JSName("append") def appendInternal(content:js.Any*):JQuery = js.native @JSName("appendTo") def appendToInternal(target:js.Any):JQuery = js.native @JSName("attr") def attrInternal(attributeName:String):UndefOr[String] = js.native $(“div#myId”).addClass("myclass") Facading Javascript Libraries
  • 29. “Automatically” bootstrap your façade from a typescript definition (https://github.com/borisyankov/DefinitelyTyped): ~900 library already “typed”. The process is not 100 % accurate, so manual editing is often needed afterwards. This can be improved, but not to perfection, because the features offered by the type systems of TypeScript and Scala.js differ in some subtle ways. Usage $ sbt 'run somelib.d.ts SomeLib.scala' https://github.com/sjrd/scala-js-ts-importer Facading Javascript Libraries

Editor's Notes

  1. It works very well with small projects, but big projects are difficult to manage
  2. It works very well with small projects, but big projects are difficult to manage
  3. It works very well with small projects, but big projects are difficult to manage
  4. It allows you to write your web application entirely in Scala!. Scala.js compiles full-fledged Scala code down to JavaScript, which can be integrated in your Web application. It provides very good interoperability with JavaScript code, both from Scala.js to JavaScript and vice versa. E.g., use jQuery and HTML5 from your Scala.js code.Since scala as a language and also its library rely on java standard library, so it is impossible to support all of scala without supporting some of java. hence scala.js includes partial part of java standard library , written in scala itself If you are developing rich internet application in scala and you are using all goodness of scala but you are sacrificing javascript interoperability, then you can use scala.js , a scala to javascript compiler. So that you can build entire web application in scala. A javascript backend for scala It allows you to write your web application entirely in Scala!. Scala.js compiles full-fledged Scala code down to JavaScript, which can be integrated in your Web application. It provides very good interoperability with JavaScript code, both from Scala.js to JavaScript and vice versa. E.g., use jQuery and HTML5 from your Scala.js code.Since scala as a language and also its library rely on java standard library, so it is impossible to support all of scala without supporting some of java. hence scala.js includes partial part of java standard library , written in scala itself If you are developing rich internet application in scala and you are using all goodness of scala but you are sacrificing javascript interoperability, then you can use scala.js , a scala to javascript compiler. So that you can build entire web application in scala. A javascript backend for scala
  5. scala.js compiles your scala code to javascript code. its just a usual scala compiler that takes scala code and produces javascript code instead of JVM byte code. on the other hand, js-scala is a scala library providing composable javascript code generator. You can use them in your usual scala program to write javascript program generator. your scala program will be compile into JVM byte code using scala compiler and executing of this program generates javascript program. The main difference is that js-scala is a library while scala.js is a compiler. Suppose that you want to write a JavaScript program solving a given problem. In js-scala you write aScala program generating a JavaScript program solving the given problem. In scala.js you write a Scala program solving the given problem
  6. parseInt receives two arguments: string and radix: var intValue = parseInt(string[, radix]); while map handler's second argument is index: ... callback is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed. ['10','10','10','10','10'].map(function(x){return parseInt(x);})
  7. Number and characters have same semantices on JVM except 4 exceptionSince JavaScript doesn't have a native float type, we sometimes represent Floats using doubles/numbers, rather than with lower-precision 32-bit floatsUnlike the JVM where dividing an integer type by 0 throws an exception, in Scala.js integer division by 0 is undefined. Instance tests (and consequently pattern matching) on any of Byte, Short, Int, Float, Double are based on the value and not the type they were created with. Calling toString on a Float or a Double that holds an integral value, will not append ".0" to that value. This is due to how numeric values are represented at runtime in Scala.js scala.Unit is represented using JavaScript's undefined. Therefore, calling toString() on Unit will returnundefined rather than (). JavaScript regular expressions are slightly different from Java regular expressions. The support for regular expressions in Scala.js is implemented on top of JavaScript regexes. StackOverFlowError is unsupported NullPointerException is reported as Type error ArrayIndexOutOfBoundsException is never throw
  8. Since ScalaTags is pure Scala, any editor that understands Scala will understand scalatags.Text. Not only do you get syntax highlighting, you also get code completion: Autocomplete and Error Highlighting: Error Highlighting and in-editor documentation: Inline Documentation And all the other good things (jump to definition, extract method, etc.) you're used to in a statically typed language. No more digging around in templates which mess up the highlighting of your HTML editor, or waiting months for the correct plugin to materialize.
  9. Since ScalaTags is pure Scala, any editor that understands Scala will understand scalatags.Text. Not only do you get syntax highlighting, you also get code completion: Autocomplete and Error Highlighting: Error Highlighting and in-editor documentation: Inline Documentation And all the other good things (jump to definition, extract method, etc.) you're used to in a statically typed language. No more digging around in templates which mess up the highlighting of your HTML editor, or waiting months for the correct plugin to materialize.
  10. Since ScalaTags is pure Scala, any editor that understands Scala will understand scalatags.Text. Not only do you get syntax highlighting, you also get code completion: Autocomplete and Error Highlighting: Error Highlighting and in-editor documentation: Inline Documentation And all the other good things (jump to definition, extract method, etc.) you're used to in a statically typed language. No more digging around in templates which mess up the highlighting of your HTML editor, or waiting months for the correct plugin to materialize.
  11. It can be tempting to think of React JS as just another JavaScript framework, along the lines of Angular JS and Ember JS. This entirely misses why it was created and the problems it solves. React is not designed to solve problems specific to web applications. Rather, it is designed to solve problems for all applications. This sounds like buzz until you look at where React is going. Its first uses were in web applications, specifically Facebook and Instagram. Now, though, it’s rapidly moving past that: Facebook used it to build a native iOS mobile app, and is open sourcing react-native to allow anyone to do the same for iOS and Android. Learn more from Facebook’s recent React conference: overview, deep dive. Flipboard used it to power canvas graphics on its web site, which unlike the traditional browser DOM can operate with video-like smoothness. They open sourced this add-on to React. Netflix uses it to create TV interfaces. Hear about it in their own words. It’s used on both the server-side and the client-side. React doesn’t need a web browser to work. Why is React gaining traction on so many platforms, unlike other JavaScript frameworks? It’s simple: React presents a better model for development, generally. React’s impact is best explained by its side effects: Your code is clear. It is arranged into components, each with its own defined responsibility. Learn more about structure. Your app is predictable. It’s very clear where data flows, and what happens when a user does something. Learn more about data flow. Your app is fast. React is really, really fast, creating a better experience for users, even if you have a ton of data. See this example. Your app is standards-based. React adds layers only when it needs to. You feel like you are actually writing JavaScript and HTML, not some magic template language. Surprise, you’re an app developer. React breaks down barriers across platforms, by applying its same model across the board. This means that once you learn the React way of structuring an web application, you have a huge head start on developing a native iOS or Android app, thanks to react-native. Surely this will happen to other platforms. So, get to know React, even if you don’t see a need for it in your current projects. Far more than a shiny new JavaScript framework, it could represent a new standard for structuring applications. See also, the benefits of adding React to a real-world Rails app, and a deep dive into React in Rails.
  12. Spray Autowire Scala.JS React Scala CSS Deploy