• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Lessons learned: Use of Modern JVM Languages besides Java - JavaOne 2012
 

Lessons learned: Use of Modern JVM Languages besides Java - JavaOne 2012

on

  • 8,666 views

Learn when to use which language? What are the benefits? What is the added business value?

Learn when to use which language? What are the benefits? What is the added business value?

Statistics

Views

Total Views
8,666
Views on SlideShare
3,237
Embed Views
5,429

Actions

Likes
5
Downloads
33
Comments
0

7 Embeds 5,429

http://www.kai-waehner.de 5414
https://twitter.com 8
http://webcache.googleusercontent.com 3
https://si0.twimg.com 1
http://seoautomated.com 1
http://www.linkedin.com 1
http://www.google.co.uk 1
More...

Accessibility

Categories

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

    Lessons learned: Use of Modern JVM Languages besides Java - JavaOne 2012 Lessons learned: Use of Modern JVM Languages besides Java - JavaOne 2012 Presentation Transcript

    • Lessons Learned:Use of Modern JVM Languages Besides Java
    • Kai Wähner (MaibornWolff et al GmbH) Main Tasks Evaluation of Technologies and Products Requirements Engineering Enterprise Architecture Management Business Process Management Architecture and Development of Applications Planning and Introduction of SOA Integration of Legacy Applications Cloud Computing Big Data Consulting Contact Developing Email: kontakt@kai-waehner.de Speaking Blog: www.kai-waehner.de/blog Coaching Twitter: @KaiWaehner Social Networks: Xing, LinkedIn Writingwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner
    • Java platformwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Variety of languages on the .NET platform C C++ C# F# .NET Silverlight Scalawww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Variety of languages on the Java platform Java Java Java Java Java Javawww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Characteristics of the Java language „It’s not all rainbows and unicorns in the land of Java“ http://batsov.com/Java/Groovy/2011/05/06/jvm-langs-groovy.htmlwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Java platformwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Java Virtual Machine (JVM) Java Runtime Environment (JVM + Java Standard Libraries) => JVM Bytecode -> VM-specific internal representation -> Native machine codewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Java Virtual Machine (JVM) Ahead-of-time compiled Java Bytecode (.class) Java Runtime Environment (JVM + Java Standard Libraries) => JVM Bytecode -> VM-specific internal representation -> Native machine codewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Java Virtual Machine (JVM) Ahead-of-time compiled Ahead-of-time compiled Java Bytecode (.class) Scala Bytecode (.class) Java Runtime Environment (JVM + Java Standard Libraries) => JVM Bytecode -> VM-specific internal representation -> Native machine codewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Java Virtual Machine (JVM) Ahead-of-time compiled Ahead-of-time compiled Java Bytecode (.class) Scala Bytecode (.class) Java Runtime Environment (JVM + Java Standard Libraries) => JVM Bytecode -> VM-specific internal representation -> Native machine code Ahead-of-time compiled Groovy Bytecode (.class)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Java Virtual Machine (JVM) Ahead-of-time compiled Ahead-of-time compiled Java Bytecode (.class) Scala Bytecode (.class) Java Runtime Environment (JVM + Java Standard Libraries) => JVM Bytecode -> VM-specific internal representation -> Native machine code Interpreted or Just-in-time compiled Groovy Bytecode Ahead-of-time compiled (In-memory) Groovy Bytecode (.class) Groovy Script Codewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform 240+ further languages: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • "Escape from the Java language prison"www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • What is the key message?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Key message Java is still the most important programming platformwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Key message Java is still the most important programming platform Java is not the new Cobolwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Key message Java is still the most important programming platform Java is not the new Cobol Modern JVM languages besides Java create added valuewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility 3.  Reduced Complexity 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems 8.  Getting Startedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility Business 3.  Reduced Complexity Value 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems 8.  Getting Startedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility 3.  Reduced Complexity 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems Lessons 8.  Getting Started learnedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility Business 3.  Reduced Complexity Value 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems 8.  Getting Startedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Lines of code (Java) employees.sort ( new Comparator{ public int compare(Object emp1, Object emp2){ int emp1Age = ( (Employee) emp1).getAge(); int emp2Age = ( (Employee) emp2).getAge(); if( emp1Age > emp2Age ) return 1; else if( emp1Age < emp2Age ) return -1; else return 0; } Javawww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Lines of code (Scala) employees.sort ( employees.sort (_.age > _.age) new Comparator{ public int compare(Object emp1, Object emp2){ int emp1Age = ( (Employee) emp1).getAge(); int emp2Age = ( (Employee) emp2).getAge(); if( emp1Age > emp2Age ) return 1; else if( emp1Age < emp2Age ) return -1; else return 0; } Java Scalawww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Lines of code (Scala) employees.sort (_.age > _.age) Scala API: Scalawww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Lines of code <books> <book isbn="…"> <title>Groovy in Action</title> <author>Dierk Koenig</author> <author>Paul King</author> … </book> <book isbn="…"> <title>Grails in Action</title> <author>Glen Smith</author> <author>Peter Ledbrook</author> </book> ... </books> (Making Java Groovy, Kenneth A. Kousen)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Lines of code <books> <book isbn="…"> <title>Groovy in Action</title> <author>Dierk Koenig</author> <author>Paul King</author> … </book> <book isbn="…"> <title>Grails in Action</title> <author>Glen Smith</author> <author>Peter Ledbrook</author> </book> ... </books> (Making Java Groovy, Kenneth A. Kousen) Task: Get the title of the second book!www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Lines of code (Java) <books> DocumentBuilderFactory factory = <book isbn="…"> DocumentBuilderFactory.newInstance(); <title>Groovy in Action</title> Document doc = null; <author>Dierk Koenig</author> <author>Paul King</author> try {DocumentBuilder b = factory.newDocumentBuilder(); … doc = b.parse("src/jag/xml/books.xml"); </book> } catch (Exception e) { // Parser, SAX, IO <book isbn="…"> <title>Grails in Action</title> e.printStackTrace();} <author>Glen Smith</author> if (doc == null) return; <author>Peter Ledbrook</author> NodeList titles = doc.getElementsByTagName("title"); </book> ... Element titleNode = (Element) titles.item(1); </books> String title = titleNode.getFirstChild().getNodeValue(); System.out.println("The second title is " + title); (Making Java Groovy, Kenneth A. Kousen) Task: Get the title of the second book!www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Lines of code (Groovy) <books> <book isbn="…"> <title>Groovy in Action</title> <author>Dierk Koenig</author> <author>Paul King</author> … root = new XmlSlurper().parse(books.xml) </book> println root.book[1].title <book isbn="…"> <title>Grails in Action</title> <author>Glen Smith</author> <author>Peter Ledbrook</author> </book> ... </books> (Making Java Groovy, Kenneth A. Kousen) Task: Get the title of the second book!www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility Business 3.  Reduced Complexity Value 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems 8.  Getting Startedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Increased flexibility Modularisationwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Modularisation http://www.artima.com/scalazine/articles/package_objects.htmlwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Increased flexibility Scriptingwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Scripting Change behaviour of an application dynamically at runtime Direct execution vs. JSR 233 Scripting for the Java Platformwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Increased flexibility Meta programmingwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Meta programming (Runtime) // Java Code public class ABC() { public static ABC factory() { return new ABC(); } public static void main(String[] args) { ABC abc = ABC.factory()); } }www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Meta programming (Runtime) // A little bit of (Groovy-) Magic: Class.metaClass.factory = { Object[] args -> delegate.metaClass.invokeConstructor(*args) }www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Meta programming (Runtime) // A little bit of (Groovy-) Magic: Class.metaClass.factory = { Object[] args -> delegate.metaClass.invokeConstructor(*args) } // Now, all Java classes have a „factory()“ method: HashMap hashmap = HashMap. factory () Integer integer = Integer. factory (42) Dimension dimension = Dimension. factory (2, 3)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Meta programming (Runtime) In Practice: „Finder“ in Grailswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Meta programming replacement in Scala: Implicit Conversionswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Meta programming replacement in Scala: Implicit Conversions Attention: Use it wisely!www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Increased flexibility Build managementwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Build tools Ant vs. Mavenwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Build tools Ant Gradle vs. Mavenwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Build tools Ant Gradle vs. Mavenwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Build tools Ant Gradle vs. Mavenwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Build tools Further advantages (e.g. Scripting) Ant Gradle vs. Mavenwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility Business 3.  Reduced Complexity Value 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems 8.  Getting Startedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Reduced complexitywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Reduced complexity Concurrencywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Concurrency Current situation?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Current situation „The Gigahertz Race is over!“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • The industry has an answer Multicore CPUswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Concurrency The problem?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • The problem Process A Shared State Process Bwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • The problem Thread-API   Deadlocks   Race Conditions   Exceptionswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Reduced complexity Solution?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Attempted rescuewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Good books! However, the Thread API is still complex ...www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Reduced complexity Better solution?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Alternatives* for dealing with state (instead of Thread API) Shared Mutability => Software Transactional Memory (STM) versus Isolated Mutability => Actors * Purely Immutability => Tough to realizewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Shared Mutability: Software Transactional Memory (STM) „Clojure does not replace the Java thread system, rather it works with it. [But there are] no locks! “ => An alternative to lock-based synchronization! http://www.heise.de/developer/artikel/Benefits-1030160.htmlwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Isolated Mutability: Actors „Communicate by passing immutable Messages“ http://www.infoq.com/presentations/Actor-based-Programming (Jamie Ridgway)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Actors in Scala val chatRoom = actor { while (true) { receive { case Subscribe(user) => // do something case Unsubscribe(user) => // do something case UserPost(user, post) => // do something }}} // send a asynchronous message to the Actor: chatRoom ! Subscribe(User("Bob")) No Thread API, Locks, Synchronisation (and therefore lower threat to deadlocks or race conditions)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Actors in Groovy with GPars (Groovy Parallel Systems) „Give Actors an OO facade“ @ActiveObject class Decryptor { @ActiveMethod // asynchronous => return a Future object def decrypt(String encryptedText) { return encryptedText.reverse() } @ActiveMethod def decrypt(Integer encryptedNumber) { return -1*encryptedNumber + 142 } } final Decryptor decryptor = new Decryptor() def part1 = decryptor.decrypt( noitcA ni yvoorG) def part2 = decryptor.decrypt(140) print part1.get() // == Groovy in Action print part2.get() // == 2www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Reduced complexity Domain Specific Languages (DSL)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Domain Specific Languages (DSL) A [internal] DSL is a programming language that mimics the terms, idioms, and expressions used among experts in the targeted domain. Code written in a DSL reads like structured prose for the domain. Ideally, a domain expert with little experience in programming can read, understand, and validate this code. Sometimes, a domain expert might be able to write DSL code, even if he isn’t a professional programmer. http://ofps.oreilly.com/titles/9780596155957/DomainSpecificLanguages.htmlwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Internal DSL in test frameworkswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • ScalaTest (Scala) Which code is easier to understand?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • ScalaTest (Scala) Which code is easier to understand? Java: assertTrue(map.containsKey(‘a’));www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • ScalaTest (Scala) Which code is easier to understand? Java: assertTrue(map.containsKey(‘a’)); Scala: map should contain key ‘a’www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Example for an internal Scala DSL Baysick DSL (simulates BASIC) http://blog.fogus.me/2009/03/26/ baysick-a-scala-dsl-implementing-basic/www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility Business 3.  Reduced Complexity Value 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems 8.  Getting Startedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Reduced heterogeneity Install Source code script (Java) (Shell) Dynamic database script Build (JRuby) (XML)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Reduced heterogeneity Source code Dynamic database script Install script Build (Groovy)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility Business 3.  Reduced Complexity Value 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems 8.  Getting Startedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Innovationwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Innovation New Technologies Concepts Solutionswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Innovation New Technologies Concepts Solutions Marketing Article, blogs, conference sessionswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Innovation New Technologies Concepts Solutions New Projects MarketingConsulting, Coaching, Development Article, blogs, conference sessionswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Marketing „War for Talents“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Marketing „War for Talents“ „Follow the Leader“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Conclusion "business value" Reduced efforts Reduced complexity Increased flexibility Reduced Innovation Heterogeneitywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Conclusion "business value" Reduced efforts Reduced complexity Increased flexibility Reduced Innovation Heterogeneitywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility 3.  Reduced Complexity 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems Lessons 8.  Getting Started learnedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform 240+ further languages: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Language selection <Excursus>www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Excursus: Typing Dynamically typed Complexity languague Statically typed language Powerwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Excursus: Programming concepts Scala in Depth, Joshua D. Suerethwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Language selection </Excursus>www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform Which language(s) shall we use?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Conclusion „language selection" The language has to be „Java Friendly“ and „Feature Rich“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform 240+ further languages: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform Maturity?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Maturity 240+ further languages: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Maturity 240+ further languages: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform Prevalence?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Prevalence? 240+ further languages: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Prevalence? 240+ further languages: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform Platform integration?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Syntax alignment import java.util.*; // Java Date today = new Date(); // Javawww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Syntax alignment import java.util.*; // Java Date today = new Date(); // Java today = new Date() // Groovywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Syntax alignment import java.util.*; // Java Date today = new Date(); // Java today = new Date() // Groovy import java.util._ // Scala var today = new Date // Scalawww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Syntax alignment import java.util.*; // Java Date today = new Date(); // Java today = new Date() // Groovy import java.util._ // Scala var today = new Date // Scala java_import ‘java.util.Date # JRuby today = Date.new # JRubywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Syntax alignment import java.util.*; // Java Date today = new Date(); // Java today = new Date() // Groovy import java.util._ // Scala var today = new Date // Scala java_import ‘java.util.Date # JRuby today = Date.new # JRuby (import (java.util Date)) ; Clojure (def today (new Date)) ; Clojure (def today (Date.)) ; Clojure alternativewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Good IDE-support: The Paranthesis Generator? (import (java.util Date)) ; Clojure (def today (new Date)) ; Clojure (def today (Date.)) ; Clojure alternativewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Plattform integration? => No syntax alignment! JRuby Feature Rich Clojure Jython JavaScript Java Friendlywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless integration? Java Groovy? „Other“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless Integration? (Groovy) public class Article {     private String name;     private String price;     public Article(String name, String price) {         this.name = name;         this.price = price;     } class Article {     public String getName() {     String name         return name;     String price     } }     public void setName(String name) {         this.name = name;     }     public String getPrice() {         return price;     }     public void setPrice(String price) {         this.price = price;     } } Java Groovywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless Integration? (Groovy) public class Article { public class Article {     private String name;     private String name;     private String price;     private String price;     public Article(String name, String price) {     public Article(String name, String price) {         this.name = name;         this.name = name;         this.price = price;         this.price = price;     }     }     public String getName() {     public String getName() {         return name;         return name;     }     }     public void setName(String name) {     public void setName(String name) {         this.name = name;         this.name = name;     }     }     public String getPrice() {     public String getPrice() {         return price;         return price;     }     }     public void setPrice(String price) {     public void setPrice(String price) {         this.price = price;         this.price = price;     }     } } } Java Groovywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless integration? Java Groovy „Other“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Plattform integration? JRuby Groovy Feature Rich Clojure Jython JavaScript Java Friendlywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless integration? Java „Other“ Scala?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless integration? (Scala) => Bytecode != Bytecode Implicit Conversions Inexpressible vs. Language Object Identity / Equality Features Objects vs. Primitives Uniform Access Principle Java Bytecode Analysiswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless integration? (Scala) => Bytecode != Bytecode „Usually, it just works ... ... if not, define a Java Interface.“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Seamless integration? Java „Other“ „Scala“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Plattform integration? JRuby Scala Groovy Feature Rich Clojure Jython JavaScript Java Friendlywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform 240+ Weitere: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Languages for the Java platform 240+ Weitere: http://tinyurl.com/3ql5m98www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Conclusion „language selection" The language has to be „Java Friendly“ and „Feature Rich“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Conclusion „language selection" „The dynamic One“ „The functional One“ The language has to be „Java Friendly“ and „Feature Rich“ (Other JVM languages only if „forced“)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Conclusion „language selection"www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility 3.  Reduced Complexity 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems Lessons 8.  Getting Started learnedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Why use new languages? Java does the job, right? IT vs. Politicswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Why use new languages? Java does the job, right? Cloud Computing will be requested by the customer...www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Why use new languages? Java does the job, right? Cloud Computing will be requested by the customer... NoSQL will be required for big data and high scalability...www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Why use new languages? Java does the job, right? Cloud Computing will be requested by the customer... NoSQL will be required for big data and high scalability...... but modern JVM languages will probably never be demanded www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Problems with modern JVM Languages ‚Real life‘ problemswww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Problems with modern JVM Languages -  New Concepts for Java / OO Developers -  Powerful vs. Ease of Use -  Confusion due to Meta Programming -  Bytecode != Bytecode -  Trouble with Debugging -  Total Cost of Ownership (Skills, Training, Refactoring, Maintenance)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Problems with modern JVM Languages -  New Concepts for Java / OO Developers -  Powerful vs. Ease of Use -  Confusion due to Meta Programming -  Bytecode != Bytecode -  Trouble with Debugging -  Total Cost of Ownership (Skills, Training, Refactoring, Maintenance) BUT: „Dont let yourself be fooled!“ (you also use a JAXB compiler, a GWT compiler, a WSDL compiler, etc., right?)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Bytecode != Bytecode Java + Groovy = Good Java + Scala = Ok Non-Java + Non-Java = ???www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Bytecode != Bytecode Ruby Scala JRuby + Scala: www.codecommit.com/blog/ruby/integrating-scala-into-jrubywww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • IDEs do not have AS-GOOD maturity as Java (yet?)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • IDEs do not have AS-GOOD maturity as Java (yet?)www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Agenda 1.  Reduced Efforts 2.  Increased Flexibility 3.  Reduced Complexity 4.  Reduced Heterogeneity 5.  Innovation 6.  Language Selection 7.  Problems Lessons 8.  Getting Started learnedwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Getting started...You cant make something out of nothing.www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Getting started... Use new languages! Marketing Looking back at Channels finished projects Think about it BEFORE starting new projects Internal Projects Testingwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Conclusion „lessons learned“www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Did the key message arrive?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Key message Java is still the most important programming platform Java is not the new Cobol Modern JVM languages besides Java create added valuewww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Did the key message arrive?www.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012
    • Thank you for your attention... Questions? Contact Kai Wähner MaibornWolff et al GmbH Mobile +49 151 544 277 88 IT Consultant Theresienhöhe 13 Email kontakt@kai-waehner.de D-80339 München Twitter @KaiWaehnerwww.mwea.de Lessones learned: Use of modern JVM Languages besides Java - Kai Wähner 01.10.2012