SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
JVM Languages Support in Eclipse
 Monkey-patching the JDT for fun and profit?




                   Miles Sabin, Chuusai Ltd.
                    http://www.chuusai.com/
Outline
●
    JVM Languages Need Java-level Tools
●
    The Scala IDE for Eclipse
●
    History
●
    How to Move Forward?
●
    AspectJ and Equinox Aspects
●
    Who is Using This Approach?
●
    Retrospect and Prospects
The Need for Java-level Tools
●
    Many of the new JVM Languages on show
    here offer significant productivity gains
    over Java, but ...
●
    Mainstream adoption requires
    improvements across the entire toolchain
    ●
        A x2 productivity gain at the language level is
        irrelevant if there's a /2 loss at the tool level
●
    Especially so for IDEs
The Need for Java-level Tools
●
    A subset of JVM languages are also “Java-
    compatible”
    ●
        Close source and binary mapping to Java
        –   Scala, Groovy, JavaFX, AspectJ
●
    This holds out hope that many Java tools
    will Just Work, or work with minor
    adaptation
    ●
        eg. Java annotation driven tools generally work
        as expected with Scala
●
    Additional promise of gradual migration
The Need for Java-level Tools
●
    Does this carry over to IDEs?
    ●
        On the positive side there is much common
        infrastructure across languages
        –   This is reflected in IDE extension APIs
    ●
        Buts it's not enough to provide orthogonal
        support
        –   Gradual migration demands that major features of
            the Java tooling be aware of new language artefacts
    ●
        The big value features are the ones which are
        informed by language semantics
        –   Typically private to IDEs language tooling
The Scala IDE for Eclipse
●
    The Scala tooling for Eclipse is an attempt
    to answer the preceeding question in the
    positive
●
    The aim of the project is to achieve tooling
    which approaches that of the Eclipse JDT
    but with vastly less effort
History 1
●
    Started very early on in Scala's timeline
    (early 2005)
●
    Very simple IDE plugin
●
    Little functionality beyond basic syntax
    highlighting and build invocation
●
    Written in Java
●
    There was a least one other similar offering
    at the time: Scaliptor
History 2
●
    Announced December 2005, first release
    February 2006 (2.1.0)
●
    Rewritten in Scala
●
    Some semantic features acquired (eg.
    limited auto-completion)
●
    Even at this early stage requests for the
    ability to mix Java and Scala and JDT
    interop were coming in
History 3
●
    Announced June 2007, first release
    February 2008
●
    Attempted much deeper integration with
    the Scala compiler,
    ●
        Interactive error reporting
    ●
        Semantic highlighting
    ●
        Incremental compilation
    ●
        Dependency management
●
    Many hooks added to scalac
History 4
●
    Start of my involvement (May 2008)
●
    Prompted by very generous sponsorship by
    EDF Trading
●
    Primary goals
    ●
        Ease Java/Scala migation
        –   Mixed Scala/Java compilation in scalac
        –   Mixed Scala/Java projects in Eclipse
    ●
        Improved Eclipse stability and release process
History 4
●
    First commit to trunk in July 2008
●
    Results of the work first visible in
    2.7.2.RC1 in August 2008
●
    Final 2.7.2 release in November
●
    Goals somewhat met,
    ●
        Mixed Scala/Java enabled in scalac and Eclipse
    ●
        Release process dramatically improved
    ●
        However JDT integration limited and stability
        issues remain
How to Move Forward?
●
    Various non-options
    ●
        Fork Eclipse?
        –   It's open source, but too big and too rapidly
            changing. Maintaining a a patch against it would be
            a huge effort
        –   We want users to be able to install our tools into
            their existing eclipse environments
        –   If several JVM languages fork the JDT which one
            wins?
How to Move Forward?
●
    Various non-options
    ●
        Lobby for extensions to the JDT?
        –   Andrew Eisenberg's patch has been languishing in
            Eclipse Bugzilla for 3+ years
        –   JDT team understandably reluctant to see private
            implementation exposed as public API
        –   Alternative JVM languages still a minority interest,
            so little business motivation to make the change
●
    Fortunately AOP provides us with a Plan B
AspectJ and Equinox Aspects
●
    AspectJ is a well-know AOP extension to
    Java
    ●
        Allows behaviour of existing Java classes to be
        modified
        –   Pointcuts specify slices through execution flow
        –   “Advice” is code which is executed before, after or
            completely replacing original specified by pointcuts
AspectJ and Equinox Aspects
●
    Opinions are divided on AOP
    ●
        There are some compelling use cases
        –   Logging, error handling
        –   These cases are typically passive and observational
    ●
        Aspects can also actively modify behaviour, but
        –   It's a gross violation of encapsulation
        –   It can obscure the flow of execution
    ●
        Violating encapsulation is a bad thing ...
        –   ... except when that's exactly what you need to do!
        –   In which case AOP is an industrial strength tool
AspectJ and Equinox Aspects
●
    A collection of aspects is effectively a patch
●
    AspectJ was used to retrofit the desired
    extensibility features to the JDT and
    expose them via public API
●
    The key modification:
    ●
        The JDT's CompilationUnit is the entry point to
        it's internal model, but it assumes Java source
    ●
        An aspect can turn its constructor into a
        factory method
AspectJ and Equinox Aspects
●
    One more piece of the puzzle
    ●
        How to get these aspects applied to an Eclipse
        Installation?
    ●
        We can't require a custom Eclipse build or
        we're back to square one
●
    Enter Equinox Aspects
    ●
        Work of Martin Lippert
    ●
        An OSGi framework extension supporting the
        weaving of aspects into binaries at load time
Who is Using This Approach
●
    Unsurprisingly the AspectJ tooling for
    Eclipse (AJDT) was the first
●
    The Scala tooling picked it up very soon
    after
●
    The Groovy Eclipse tooling came next
●
    JavaFX is the most recent addition
●
    There has been significant collaboration
    and cross-fertilization across these
    projects
Retrospect and Prospects
●
    The results are a qualified success
●
    But the patch was premature,
    ●
        Experience has shown that although the initial
        round of JDT modifications removed the
        biggest hurdles,
        –   There are still many scenarios where Java source
            assumptions are made
        –   The retrofitted public API maps JVM language
            constructs to the JDT's model in a way which best
            fits Java extensions rather than new languages
Retrospect and Prospects
●
    More cross-language collaboration needed
    ●
        We need to draw on the experiences of the
        various groups and factor out common API and
        functionality
    ●
        We need to encourage other languages to
        follow, esp. languages not so close to Java
●
    We need to reconsider the fork option
    ●
        A common framework and shared effort makes
        this easier
Retrospect and Prospects
●
    We need to build a case for this work to be
    rolled into Eclipse
●
    That will only happen if the alternative JVM
    languages ecosystem flourishes
●
    Which brings us back to where we started,
    but hopefully with a clearer picture of the
    the landscape
JVM Languages Support in Eclipse
 Monkey-patching the JDT for fun and profit?




                   Miles Sabin, Chuusai Ltd.
                    http://www.chuusai.com/

Contenu connexe

Tendances

itft-Java evolution
itft-Java evolutionitft-Java evolution
itft-Java evolutionAtul Sehdev
 
20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』
20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』
20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』Ryo RKTM
 
Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.UA Mobile
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionStephen Colebourne
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of JavaFu Cheng
 
Programmatic Load of the Oracle Clinical Global Library
Programmatic Load of the Oracle Clinical Global LibraryProgrammatic Load of the Oracle Clinical Global Library
Programmatic Load of the Oracle Clinical Global LibraryPerficient
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Nuxeo
 
GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28Jorge Hidalgo
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java Hitesh-Java
 
Open Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up IntroOpen Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up IntroSkills Matter
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22Jorge Hidalgo
 
The Journey of Craftmanship – Kotlin in Action
The Journey of Craftmanship – Kotlin in ActionThe Journey of Craftmanship – Kotlin in Action
The Journey of Craftmanship – Kotlin in Actionraditya gumay
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18Jorge Hidalgo
 
#JavaOne What's in an object?
#JavaOne What's in an object?#JavaOne What's in an object?
#JavaOne What's in an object?Charlie Gracie
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Mihail Stoynov
 
40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflowRuben Tan
 
Sakai Technical Future Musings
Sakai Technical Future MusingsSakai Technical Future Musings
Sakai Technical Future MusingsCharles Severance
 
Launchpad: Lessons Learnt
Launchpad: Lessons LearntLaunchpad: Lessons Learnt
Launchpad: Lessons LearntTim Penhey
 

Tendances (20)

History of java
History of javaHistory of java
History of java
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
 
itft-Java evolution
itft-Java evolutionitft-Java evolution
itft-Java evolution
 
20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』
20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』
20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』
 
Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introduction
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
 
Programmatic Load of the Oracle Clinical Global Library
Programmatic Load of the Oracle Clinical Global LibraryProgrammatic Load of the Oracle Clinical Global Library
Programmatic Load of the Oracle Clinical Global Library
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
 
GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
Open Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up IntroOpen Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up Intro
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22
 
The Journey of Craftmanship – Kotlin in Action
The Journey of Craftmanship – Kotlin in ActionThe Journey of Craftmanship – Kotlin in Action
The Journey of Craftmanship – Kotlin in Action
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18
 
#JavaOne What's in an object?
#JavaOne What's in an object?#JavaOne What's in an object?
#JavaOne What's in an object?
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
 
40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflow
 
Sakai Technical Future Musings
Sakai Technical Future MusingsSakai Technical Future Musings
Sakai Technical Future Musings
 
Launchpad: Lessons Learnt
Launchpad: Lessons LearntLaunchpad: Lessons Learnt
Launchpad: Lessons Learnt
 

Similaire à JVM Languages Support in Eclipse - Monkey-patching the JDT for fun and profit?

Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...
Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...
Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...Miles Sabin
 
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!Voxxed Athens
 
Java Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateJava Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateAnton Keks
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"GlobalLogic Ukraine
 
Lecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 FastLecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 FastUzairSaeed18
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Martijn Verburg
 
Java Course 1: Introduction
Java Course 1: IntroductionJava Course 1: Introduction
Java Course 1: IntroductionAnton Keks
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaLevent YILDIZ
 
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Raffi Khatchadourian
 
Web development in JavaEE7 with JSF, does it still matter?
Web development in JavaEE7 with JSF, does it still matter?Web development in JavaEE7 with JSF, does it still matter?
Web development in JavaEE7 with JSF, does it still matter?Paris Apostolopoulos
 
Java Introduction
Java IntroductionJava Introduction
Java Introductionjaveed_mhd
 
Java: Rumours of my demise are greatly exaggerated
Java: Rumours of my demise are greatly exaggeratedJava: Rumours of my demise are greatly exaggerated
Java: Rumours of my demise are greatly exaggeratedSteve Dalton
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Codecamp Romania
 
Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack
Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack
Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack Suren Konathala
 
Projects in Enterprise Java (Java EE)
Projects in Enterprise Java (Java EE)Projects in Enterprise Java (Java EE)
Projects in Enterprise Java (Java EE)Sam Dias
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with GradleWei Chen
 

Similaire à JVM Languages Support in Eclipse - Monkey-patching the JDT for fun and profit? (20)

Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...
Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...
Scaladays 2010 - The Scala IDE for Eclipse - Retrospect and Prospect for 2.8 ...
 
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
 
Java Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateJava Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, Hibernate
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Java. converted (2)
Java. converted (2)Java. converted (2)
Java. converted (2)
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
 
Lecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 FastLecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 Fast
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)Introduction to Java 7 (OSCON 2012)
Introduction to Java 7 (OSCON 2012)
 
Java Course 1: Introduction
Java Course 1: IntroductionJava Course 1: Introduction
Java Course 1: Introduction
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
 
Web development in JavaEE7 with JSF, does it still matter?
Web development in JavaEE7 with JSF, does it still matter?Web development in JavaEE7 with JSF, does it still matter?
Web development in JavaEE7 with JSF, does it still matter?
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Java: Rumours of my demise are greatly exaggerated
Java: Rumours of my demise are greatly exaggeratedJava: Rumours of my demise are greatly exaggerated
Java: Rumours of my demise are greatly exaggerated
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack
Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack
Introducing the JAQ (Java, Angular, Sql/NoSQL) Stack
 
Projects in Enterprise Java (Java EE)
Projects in Enterprise Java (Java EE)Projects in Enterprise Java (Java EE)
Projects in Enterprise Java (Java EE)
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
 

Dernier

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Dernier (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

JVM Languages Support in Eclipse - Monkey-patching the JDT for fun and profit?

  • 1. JVM Languages Support in Eclipse Monkey-patching the JDT for fun and profit? Miles Sabin, Chuusai Ltd. http://www.chuusai.com/
  • 2. Outline ● JVM Languages Need Java-level Tools ● The Scala IDE for Eclipse ● History ● How to Move Forward? ● AspectJ and Equinox Aspects ● Who is Using This Approach? ● Retrospect and Prospects
  • 3. The Need for Java-level Tools ● Many of the new JVM Languages on show here offer significant productivity gains over Java, but ... ● Mainstream adoption requires improvements across the entire toolchain ● A x2 productivity gain at the language level is irrelevant if there's a /2 loss at the tool level ● Especially so for IDEs
  • 4. The Need for Java-level Tools ● A subset of JVM languages are also “Java- compatible” ● Close source and binary mapping to Java – Scala, Groovy, JavaFX, AspectJ ● This holds out hope that many Java tools will Just Work, or work with minor adaptation ● eg. Java annotation driven tools generally work as expected with Scala ● Additional promise of gradual migration
  • 5. The Need for Java-level Tools ● Does this carry over to IDEs? ● On the positive side there is much common infrastructure across languages – This is reflected in IDE extension APIs ● Buts it's not enough to provide orthogonal support – Gradual migration demands that major features of the Java tooling be aware of new language artefacts ● The big value features are the ones which are informed by language semantics – Typically private to IDEs language tooling
  • 6. The Scala IDE for Eclipse ● The Scala tooling for Eclipse is an attempt to answer the preceeding question in the positive ● The aim of the project is to achieve tooling which approaches that of the Eclipse JDT but with vastly less effort
  • 7. History 1 ● Started very early on in Scala's timeline (early 2005) ● Very simple IDE plugin ● Little functionality beyond basic syntax highlighting and build invocation ● Written in Java ● There was a least one other similar offering at the time: Scaliptor
  • 8. History 2 ● Announced December 2005, first release February 2006 (2.1.0) ● Rewritten in Scala ● Some semantic features acquired (eg. limited auto-completion) ● Even at this early stage requests for the ability to mix Java and Scala and JDT interop were coming in
  • 9. History 3 ● Announced June 2007, first release February 2008 ● Attempted much deeper integration with the Scala compiler, ● Interactive error reporting ● Semantic highlighting ● Incremental compilation ● Dependency management ● Many hooks added to scalac
  • 10. History 4 ● Start of my involvement (May 2008) ● Prompted by very generous sponsorship by EDF Trading ● Primary goals ● Ease Java/Scala migation – Mixed Scala/Java compilation in scalac – Mixed Scala/Java projects in Eclipse ● Improved Eclipse stability and release process
  • 11. History 4 ● First commit to trunk in July 2008 ● Results of the work first visible in 2.7.2.RC1 in August 2008 ● Final 2.7.2 release in November ● Goals somewhat met, ● Mixed Scala/Java enabled in scalac and Eclipse ● Release process dramatically improved ● However JDT integration limited and stability issues remain
  • 12. How to Move Forward? ● Various non-options ● Fork Eclipse? – It's open source, but too big and too rapidly changing. Maintaining a a patch against it would be a huge effort – We want users to be able to install our tools into their existing eclipse environments – If several JVM languages fork the JDT which one wins?
  • 13. How to Move Forward? ● Various non-options ● Lobby for extensions to the JDT? – Andrew Eisenberg's patch has been languishing in Eclipse Bugzilla for 3+ years – JDT team understandably reluctant to see private implementation exposed as public API – Alternative JVM languages still a minority interest, so little business motivation to make the change ● Fortunately AOP provides us with a Plan B
  • 14. AspectJ and Equinox Aspects ● AspectJ is a well-know AOP extension to Java ● Allows behaviour of existing Java classes to be modified – Pointcuts specify slices through execution flow – “Advice” is code which is executed before, after or completely replacing original specified by pointcuts
  • 15. AspectJ and Equinox Aspects ● Opinions are divided on AOP ● There are some compelling use cases – Logging, error handling – These cases are typically passive and observational ● Aspects can also actively modify behaviour, but – It's a gross violation of encapsulation – It can obscure the flow of execution ● Violating encapsulation is a bad thing ... – ... except when that's exactly what you need to do! – In which case AOP is an industrial strength tool
  • 16. AspectJ and Equinox Aspects ● A collection of aspects is effectively a patch ● AspectJ was used to retrofit the desired extensibility features to the JDT and expose them via public API ● The key modification: ● The JDT's CompilationUnit is the entry point to it's internal model, but it assumes Java source ● An aspect can turn its constructor into a factory method
  • 17. AspectJ and Equinox Aspects ● One more piece of the puzzle ● How to get these aspects applied to an Eclipse Installation? ● We can't require a custom Eclipse build or we're back to square one ● Enter Equinox Aspects ● Work of Martin Lippert ● An OSGi framework extension supporting the weaving of aspects into binaries at load time
  • 18. Who is Using This Approach ● Unsurprisingly the AspectJ tooling for Eclipse (AJDT) was the first ● The Scala tooling picked it up very soon after ● The Groovy Eclipse tooling came next ● JavaFX is the most recent addition ● There has been significant collaboration and cross-fertilization across these projects
  • 19. Retrospect and Prospects ● The results are a qualified success ● But the patch was premature, ● Experience has shown that although the initial round of JDT modifications removed the biggest hurdles, – There are still many scenarios where Java source assumptions are made – The retrofitted public API maps JVM language constructs to the JDT's model in a way which best fits Java extensions rather than new languages
  • 20. Retrospect and Prospects ● More cross-language collaboration needed ● We need to draw on the experiences of the various groups and factor out common API and functionality ● We need to encourage other languages to follow, esp. languages not so close to Java ● We need to reconsider the fork option ● A common framework and shared effort makes this easier
  • 21. Retrospect and Prospects ● We need to build a case for this work to be rolled into Eclipse ● That will only happen if the alternative JVM languages ecosystem flourishes ● Which brings us back to where we started, but hopefully with a clearer picture of the the landscape
  • 22. JVM Languages Support in Eclipse Monkey-patching the JDT for fun and profit? Miles Sabin, Chuusai Ltd. http://www.chuusai.com/