Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Lutz Hühnken11.09.2015
SCALA.JS
Lutz Hühnken
JavaScript
Über mich
• Java seit ~1997
• Im Laufe der Zeit verschiedenste Rollen: Consultant, Architekt, IT
Projektleiter, IT Manager...
Front-End / JavaScript Erfahrungen
scala.js code.talks 2014 3
• Backoffice für Reise-Website mit GWT
• Migration umfangrei...
JavaScript
JavaScript ist so eine Sache..
scala.js code.talks 2014 5
• Eine moderne Web-Anwendung ist im wesentlichen eine JavaScript...
JavaScript ist so eine Sache..
scala.js code.talks 2014 6
• Andererseits betreiben viele Leute einigen Aufwand, um nicht i...
Und jetzt auch noch Scala..
scala.js code.talks 2014 7
Wenn man Scala mag, warum es nicht auch für das Front-End verwenden...
Scala.js
Überblick
scala.js code.talks 2014 9
Bild von Sébastien Doeraene
Compiler Plug-in
• scala-js sbt Plug-In erweitert Scala-Compiler um ein Compiler-Plug-
In
• Compiliert den AST nach JavaSc...
Pipeline
scala.js code.talks 2014 11
Bild von Sébastien Doeraene
Scala.js Eigenschaften
• uneingeschränkter DOM Zugriff
• sbt Integration
• Source Maps
• Statische Typisierung
• Closure C...
(Umschalten zu Source Code)
Schön und gut.. was noch?
Java-VM vs. JS-Runtime
• Ziel: Bekannte Abstraktionen aus Scala auch auf JS-Runtime
verwenden.
• Vieles (HOF, Patter match...
Nebenläufigkeit
• JVM: Threads.
• JavaScript: Callbacks.
• Gemeinsame Abstraktion?
scala.js code.talks 2014 16
Akka
scala.js code.talks 2014 17
Was ist ein Aktor?
• Hat eine Mailbox (Queue)
• Empfängt Nachrichten
• Nachrichten werden sequentiell abgearbeiten
• Aktor...
Akka.js
• Akka-Implementierung in Scala.js
• Läuft leider noch nicht, kann nichts zeigen 
• Aber ist in Arbeit (Kooperati...
Li Haoyi
• https://github.com/lihaoyi/scalatags
• https://github.com/lihaoyi/scala.rx
• http://www.scala-js-fiddle.com
sca...
Danke schön!
Scala JS Hompage
http://www.scala-js.org
Bitte folgt mir auf Twitter:
https://twitter.com/lutzhuehnken
scala....
Upcoming SlideShare
Loading in …5
×

Scala.js at code.talks 2014, Hamburg

808 views

Published on

Scala.js at a glance - a quick overview of what Scala.js is and how it works.

Published in: Technology
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Scala.js at code.talks 2014, Hamburg

  1. 1. Lutz Hühnken11.09.2015 SCALA.JS Lutz Hühnken JavaScript
  2. 2. Über mich • Java seit ~1997 • Im Laufe der Zeit verschiedenste Rollen: Consultant, Architekt, IT Projektleiter, IT Manager, Scrum Master. • Meine “Entdeckung” von Scala (ca. 2011) hat mich wieder zum Programmieren gebracht • Seit 2012 Entwicklung mit Scala (vor allem REST-Services für mobile Anwendungen) • Seit April 2014 Trainer und Consultant bei Typesafe scala.js code.talks 2014 2
  3. 3. Front-End / JavaScript Erfahrungen scala.js code.talks 2014 3 • Backoffice für Reise-Website mit GWT • Migration umfangreicher Set-Top-Box / TV Applikation von Flash nach “HTML5” (JavaScript/jQuery) • PhoneGap-Applikation mit jqMobi, require.js, underscore.js, backbone.js
  4. 4. JavaScript
  5. 5. JavaScript ist so eine Sache.. scala.js code.talks 2014 5 • Eine moderne Web-Anwendung ist im wesentlichen eine JavaScript- Anwendung • JavaScript ist plattformübergreifend verfügbar, erfordert keinerlei Installation, ist von Nutzern akzeptiert • Aber…
  6. 6. JavaScript ist so eine Sache.. scala.js code.talks 2014 6 • Andererseits betreiben viele Leute einigen Aufwand, um nicht in JavaScript programmieren zu müssen • CoffeeScript, TypeScript, Dart, ClojureScript, Haste, Ceylon, emscripten… • Platform ja, Sprache nein?
  7. 7. Und jetzt auch noch Scala.. scala.js code.talks 2014 7 Wenn man Scala mag, warum es nicht auch für das Front-End verwenden? Scala.js ermöglicht dies.
  8. 8. Scala.js
  9. 9. Überblick scala.js code.talks 2014 9 Bild von Sébastien Doeraene
  10. 10. Compiler Plug-in • scala-js sbt Plug-In erweitert Scala-Compiler um ein Compiler-Plug- In • Compiliert den AST nach JavaScript • erzeugt auch “Source Map” • optimiert Code (Google Closure) • bester Startpunkt: sbt sample project scala.js code.talks 2014 10
  11. 11. Pipeline scala.js code.talks 2014 11 Bild von Sébastien Doeraene
  12. 12. Scala.js Eigenschaften • uneingeschränkter DOM Zugriff • sbt Integration • Source Maps • Statische Typisierung • Closure Compiler scala.js code.talks 2014 12
  13. 13. (Umschalten zu Source Code)
  14. 14. Schön und gut.. was noch?
  15. 15. Java-VM vs. JS-Runtime • Ziel: Bekannte Abstraktionen aus Scala auch auf JS-Runtime verwenden. • Vieles (HOF, Patter matching etc.) lässt sich übersetzen, vergl. Code, den wir gerade gesehen haben. • Aber nicht alles.. scala.js code.talks 2014 15
  16. 16. Nebenläufigkeit • JVM: Threads. • JavaScript: Callbacks. • Gemeinsame Abstraktion? scala.js code.talks 2014 16
  17. 17. Akka scala.js code.talks 2014 17
  18. 18. Was ist ein Aktor? • Hat eine Mailbox (Queue) • Empfängt Nachrichten • Nachrichten werden sequentiell abgearbeiten • Aktoren-Framework für die JVM: Akka scala.js code.talks 2014 18
  19. 19. Akka.js • Akka-Implementierung in Scala.js • Läuft leider noch nicht, kann nichts zeigen  • Aber ist in Arbeit (Kooperation EPFL/Typesafe)! • Prototyp (veraltet): https://github.com/sjrd/scala-js-actors scala.js code.talks 2014 19
  20. 20. Li Haoyi • https://github.com/lihaoyi/scalatags • https://github.com/lihaoyi/scala.rx • http://www.scala-js-fiddle.com scala.js code.talks 2014 20
  21. 21. Danke schön! Scala JS Hompage http://www.scala-js.org Bitte folgt mir auf Twitter: https://twitter.com/lutzhuehnken scala.js code.talks 2014 21

×