• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
The Adventurous Developers Guide to JVM Languages
 

The Adventurous Developers Guide to JVM Languages

on

  • 1,774 views

There are more than 50 actively worked JVM languages in existence today. Some have been ported to the JVM, whereas others were written specifically for the JVM. This hands-on session takes an ...

There are more than 50 actively worked JVM languages in existence today. Some have been ported to the JVM, whereas others were written specifically for the JVM. This hands-on session takes an introductory (but non-Hello, World) look at several JVM languages, including Java 8, Scala, Groovy, Kotlin, Ceylon, Xtend, and Clojure. It covers ZeroTurnaround’s initial experiences, including what rocked and sucked in learning each one. You don’t need any prior knowledge of these languages to attend the session. You will learn whether they are for you and will hear about some real-life experiences of trying these languages for the first time.

Statistics

Views

Total Views
1,774
Views on SlideShare
1,712
Embed Views
62

Actions

Likes
1
Downloads
14
Comments
0

2 Embeds 62

http://mj89sp3sau2k7lj1eg3k40hkeppguj6j-a-sites-opensocial.googleusercontent.com 55
https://twitter.com 7

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    The Adventurous Developers Guide to JVM Languages The Adventurous Developers Guide to JVM Languages Presentation Transcript

    • THE ADVENTUROUS DEVELOPERS GUIDE TO JVM LANGUAGES SIMON MAPLE @SJMAPLE Monday, 30 September 13
    • Monday, 30 September 13
    • YOUR SPEAKER SIMON MAPLE @SJMAPLE Monday, 30 September 13
    • MY AUDIENCE 0 25 50 75 100 Heard of the Language Used the language Java Scala Groovy Clojure Ceylon Kotlin Xtend Monday, 30 September 13
    • JAVA “Most people talk about Java the language, and this may sound odd coming from me, but I could hardly care less. At the core of the Java ecosystem is the JVM.” James Gosling, creator of the Java programming language (2011, TheServerSide) Monday, 30 September 13
    • JAVA THE JVM “Most people talk about Java the language, and this may sound odd coming from me, but I could hardly care less. At the core of the Java ecosystem is the JVM.” James Gosling, creator of the Java programming language (2011, TheServerSide) Monday, 30 September 13
    • LANGUAGES BUILT FOR THE JVM Monday, 30 September 13
    • LANGUAGES PORTED TO THE JVM Monday, 30 September 13
    • R.I.P ? Monday, 30 September 13
    • Monday, 30 September 13
    • Monday, 30 September 13
    • JAVA 8 1. DON’T BREAK BINARY COMPATIBILITY 2.AVOID INTRODUCING SOURCE INCOMPATIBILITIES 3. MANAGE BEHAVIORAL COMPATIBILITY CHANGES Monday, 30 September 13
    • LET’S EXPERIMENT Monday, 30 September 13
    • Monday, 30 September 13
    • COMPANION CLASS THERE IS NO STATIC import HttpServer._ // import statics from companion object Monday, 30 September 13
    • VARIABLES THERE IS NO FINAL val name: Type = initializer // immutable value var name: Type = initializer // mutable variable Monday, 30 September 13
    • CASE CLASS case class Status(code: Int, text: String) case method @ ("GET" | "HEAD") => ... case method => respondWithHtml( Status(501, "Not Implemented"), title = "501 Not Implemented", ) body = <H2>501 Not Implemented: { method } method</H2> ... Monday, 30 September 13
    • STRINGS val header = s""" |HTTP/1.1 ${status.code} ${status.text} |Server: Scala HTTP Server 1.0 |Date: ${new Date()} |Content-type: ${contentType} |Content-length: ${content.length} """.trim.stripMargin + LineSep + LineSep Monday, 30 September 13
    • NULL def toFile(file: File, isRetry: Boolean = false): Option[File] = if (file.isDirectory && !isRetry) toFile(new File(file, DefaultFile), true) else if (file.isFile) Some(file) else None Monday, 30 September 13
    • COMPLEXITY Monday, 30 September 13
    • Monday, 30 September 13
    • Monday, 30 September 13
    • Monday, 30 September 13
    • Monday, 30 September 13
    • JAVA SUPERCHARGED! Monday, 30 September 13
    • NULL def streetName = user?.address?.street Monday, 30 September 13
    • ELVIS LIVES def displayName = user.name ?: "Anonymous" Monday, 30 September 13
    • CLOSURES square = { it * it } [ 1, 2, 3, 4 ].collect(square) // [1, 4, 9, 16] Monday, 30 September 13
    • COLLECTIONS def names = ["Ted", "Fred", "Jed", "Ned"] 5p[5 println names //[Ted, Fred, Jed, Ned] def shortNames = names.findAll { it.size() <= 3 } shortNames.each { println it } // Ted // Jed // Ned Monday, 30 September 13
    • GROOVY 2.0 - DYNATIC void someMethod() {} void test() { sommeeMethod() } Monday, 30 September 13
    • GROOVY 2.0 - DYNATIC void someMethod() {} void test() { sommeeMethod() } import groovy.transform.TypeChecked @TypeChecked Monday, 30 September 13
    • GROOVY 2.0 - DYNATIC void someMethod() {} void test() { sommeeMethod() } // compilation error: // cannot find matching method sommeeMethod() import groovy.transform.TypeChecked @TypeChecked Monday, 30 September 13
    • Monday, 30 September 13
    • Founder/CEO Jevgeni “Hosselhuff” Kabanov gets ready to save more Java developers from redeploy madness with JRebel YEH, WE SAVE LIVES Monday, 30 September 13
    • Monday, 30 September 13
    • REPL <Python user> Can you believe these JVM geeks think this is impressive? <Perl user> Tell me about it! Welcome to the 90s <Python user> Yeh, “Hey the 20th century called to say they wanted their code back”! <Groovy user> Hey, we do this too! Monday, 30 September 13
    • FUNCTIONAL PRINCIPLES 1. LITTLE OR NO SIDE EFFECTS 2. FUNCTIONS SHOULD ALWAYS RETURN THE SAME RESULT IF CALLED WITH THE SAME PARAMETERS 3. NO GLOBALVARIABLES 4. FUNCTIONS AS FIRST ORDER CITIZENS 5. LAZY EVALUATION OF EXPRESSIONS Monday, 30 September 13
    • WHOA! (defn send-html-response "Html response" [client-socket status title body] (let [html (str "<HTML><HEAD><TITLE>" title "</TITLE></HEAD><BODY>" body "</BODY></HTML>")] send-http-response client-socket status "text/html" (.getBytes html "UTF-8")) )) Monday, 30 September 13
    • LET’S GET FUNCTIONAL (defn process-request "Parse the HTTP request and decide what to do" [client-socket] (let [reader (get-reader client-socket) first-line (.readLine reader) tokens (clojure.string/split first-line #"s+")] (let [http-method (clojure.string/upper-case (get tokens 0 "unknown"))] (if (or (= http-method "GET") (= http-method "HEAD")) (let [file-requested-name (get tokens 1 "not-existing") [...] Monday, 30 September 13
    • INTEROP (ns clojure-http-server.core (:require [clojure.string]) (:import (java.net ServerSocket SocketException) (java.util Date) (java.io PrintWriter BufferedReader InputStreamReader BufferedOutputStream))) Monday, 30 September 13
    • Monday, 30 September 13
    • LET’S EXPERIMENT Monday, 30 September 13
    • Monday, 30 September 13
    • LET’S EXPERIMENT Monday, 30 September 13
    • Monday, 30 September 13
    • LET’S EXPERIMENT Monday, 30 September 13
    • SUMMARY FUNCTIONS ARE FIRST CLASS CITIZENS AND SHOULD BE TREATED AS SUCH! Monday, 30 September 13
    • SUMMARY STATICALLY TYPED LANGUAGES ROCK Monday, 30 September 13
    • SUMMARY EVERYONE’S SYNTAX SUCKS... Monday, 30 September 13
    • SUMMARY EVERYONE’S SYNTAX SUCKS... TO SOMEONE ELSE. Monday, 30 September 13
    • SUMMARY THE JVM IS AWESOME Monday, 30 September 13
    • BE ADVENTUROUS! Monday, 30 September 13
    • YOU, ONE HOUR LATER 0 25 50 75 100 Heard of the Lang Java Scala Groovy Clojure Ceylon Kotlin Xtend Monday, 30 September 13
    • REBEL LABS == AWESOME 99.9% NON-PRODUCT RELATED TECH REPORTS WRITTEN BY OUR DEVELOPERS Monday, 30 September 13
    • REBEL LABS == AWESOME JAVA 8, CONTINUOUS DELIVERY, APP SERVER DEBATE, JVM WEB FRAMEWORKS, PRODUCTIVITY REPORTS... Monday, 30 September 13
    • REBEL LABS == AWESOME AND... THE ADVENTUROUS DEVELOPERS GUIDE TO JVM LANGUAGES Monday, 30 September 13
    • RESOURCES HTTPSERVER EXAMPLES OF EACH LANGUAGE ON GITHUB https://github.com/zeroturnaround/jvm-languages-report THE ADVENTUROUS DEVELOPERS GUIDE TO JVM LANGUAGES http://zeroturnaround.com/rebellabs/devs/the- adventurous-developers-guide-to-jvm-languages/ Monday, 30 September 13
    • RESOURCES SIMON MAPLE @SJMAPLE Monday, 30 September 13
    • Monday, 30 September 13