JavaFX is more than a language. It is also a platform for building immersive applications with graphics, animation, and rich media. In this session, you will see how you can leverage JavaFX from a host of different JVM languages, including Java, JRuby, Groovy, Scala, and Clojure.
The document compares and contrasts features of the Scala and Ruby programming languages, including type systems, pattern matching, monkey patching, dynamic calls, traits/modules, and more. It discusses how each language handles the given features, often providing code examples, and notes similarities and differences between the two approaches. The overall assessment is that a draw is the best way to characterize the comparison between Scala and Ruby, as both languages have their merits for different use cases and preferences.
1. The document discusses polyglot programming using multiple languages on the Java Virtual Machine (JVM), including Java, Groovy, Scala, and Clojure.
2. It notes that while Java has matured, other JVM languages have evolved faster with features like closures, operator overloading, and richer type systems.
3. Interoperability between JVM languages is seamless, allowing code written in different languages to easily call each other. The document promotes experimenting with multiple JVM languages for polyglot programming.
Scala is becoming the language of choice for many development teams. This talk highlights how Scala excels in the world of multi-core processing and explores how it compares to Java 8.
Video Presentation: http://youtu.be/8vxTowBXJSg
This document provides an introduction to the Scala programming language for Java programmers. It discusses Scala's motivation as a scalable and more productive alternative to Java. Key features covered include static typing, object-oriented and functional programming, traits, pattern matching, and actors. Examples are provided to illustrate concepts like functions as first-class values, partially applied functions, and collection operations. The document concludes by mentioning additional Scala concepts and providing references for further reading.
This document discusses using multiple programming languages with Grails, known as polyglot programming. It describes how to use Clojure, Scala, and Ruby with Grails through plugins. For each language, it covers why you would use it with Grails, how to set up the plugin, examples of usage, and limitations. The goal is to push Grails towards being more polyglot and leverage different languages' strengths.
The document compares and contrasts features of the Scala and Ruby programming languages, including type systems, pattern matching, monkey patching, dynamic calls, traits/modules, and more. It discusses how each language handles the given features, often providing code examples, and notes similarities and differences between the two approaches. The overall assessment is that a draw is the best way to characterize the comparison between Scala and Ruby, as both languages have their merits for different use cases and preferences.
1. The document discusses polyglot programming using multiple languages on the Java Virtual Machine (JVM), including Java, Groovy, Scala, and Clojure.
2. It notes that while Java has matured, other JVM languages have evolved faster with features like closures, operator overloading, and richer type systems.
3. Interoperability between JVM languages is seamless, allowing code written in different languages to easily call each other. The document promotes experimenting with multiple JVM languages for polyglot programming.
Scala is becoming the language of choice for many development teams. This talk highlights how Scala excels in the world of multi-core processing and explores how it compares to Java 8.
Video Presentation: http://youtu.be/8vxTowBXJSg
This document provides an introduction to the Scala programming language for Java programmers. It discusses Scala's motivation as a scalable and more productive alternative to Java. Key features covered include static typing, object-oriented and functional programming, traits, pattern matching, and actors. Examples are provided to illustrate concepts like functions as first-class values, partially applied functions, and collection operations. The document concludes by mentioning additional Scala concepts and providing references for further reading.
This document discusses using multiple programming languages with Grails, known as polyglot programming. It describes how to use Clojure, Scala, and Ruby with Grails through plugins. For each language, it covers why you would use it with Grails, how to set up the plugin, examples of usage, and limitations. The goal is to push Grails towards being more polyglot and leverage different languages' strengths.
November Camp - Spec BDD with PHPSpec 2Kacper Gunia
My slides on PHPSpec 2 from Symfony November Camp Stockholm.
www.symfony.se/november-camp/
More Domain-Driven Design related content at: https://domaincentric.net/
Beyond Breakpoints: Advanced Debugging with XCodeAijaz Ansari
This document contains code snippets and notes from a presentation or workshop about debugging techniques using tools like NSLog, LLDB, and jq. It discusses debugging crashes, testing hypotheses, and examining memory usage. It also demonstrates using the jq tool to parse and filter JSON data within the LLDB debugger. Code examples show setting breakpoints, accessing variables, and calling jq from a Python lldb command to apply jq filters to JSON strings from the debugger.
This document provides an introduction to Groovy for Java developers. It discusses Groovy's features such as closures, optional typing and syntax, and how it compiles to Java bytecode. It then provides examples of writing a simple Groovy script to generate XML, using closures, mocking objects in tests, and building projects with Ant.
This document provides an overview of Scala and compares it to Java. It discusses Scala's object-oriented and functional capabilities, how it compiles to JVM bytecode, and benefits like less boilerplate code and support for functional programming. Examples are given of implementing a simple Property class in both Java and Scala to illustrate concepts like case classes, immutable fields, and less lines of code in Scala. The document also touches on Java interoperability, learning Scala gradually, XML processing capabilities, testing frameworks, and tool/library support.
Declarative Internal DSLs in Lua: A Game Changing ExperienceAlexander Gladysh
The document discusses using internal domain-specific languages (DSLs) in Lua and provides examples of how to implement them. It describes loading DSL data into a tree structure, validating the data through tree traversal, and generating outputs by traversing the tree a second time. The document argues that this approach provides reusability across different DSLs and output targets with good error reporting. It also gives examples of where internal DSLs are used, such as for HTTP APIs, configuration files, databases, and visual editors.
The Future of Java: Records, Sealed Classes and Pattern MatchingJosé Paumard
The release of the JDK 17 brings interesting features in the Java language: sealed types and pattern matching for switch. Along with the introduction of records, the implementation of pattern matching in the Java language begins to take shape. This presentation shows you how records, sealed types, and pattern matching can change the way we write Java code, on real patterns. It also shows you what we can expect to see on this topic in the future. It is mostly a live coding presentation, with some slides when the code is shown cannot be executed.
Kotlin is a better alternative to Java that fixes many of Java's weaknesses. It removes unnecessary syntax like semicolons and checked exceptions, adds powerful features like type inference, lambdas, and when expressions, and compiles to JVM bytecode so it can interoperate with existing Java code and libraries. Kotlin is fully supported by JetBrains and can also target JavaScript, making it a practical and modern option for JVM development.
This talk discusses various issues of low-level PHP performance, such as: When is it more efficient to use arrays or objects? What causes catastrophic garbage collection? Does adding type annotations make PHP faster or slower?
I will answer these types of question with a (shallow) dive into PHP internals, touching on various topics like value representation, bytecode optimization and GC.
PHP 8.0 is expected to be released by the end of the year, so it’s time to take a first look at the next major version of PHP. Attributes, union types, and a just-in-time compiler are likely the flagship features of this release, but there are many more improvements to be excited about. As PHP 8.0 is a major version, this release also includes backwards-incompatible changes, many of which are centered around stricter error handling and more type safety.
This talk will discuss new features already implemented in PHP 8, backwards-compatibility breaks to watch out for, as well as some features that are still under discussion.
Starting with Scala : Frontier Developer's Meetup December 2010Derek Chen-Becker
This document provides an overview of the Scala programming language presented at a meetup event. It discusses Scala's history and pedigree, being created by Martin Odersky. It outlines some key aspects of Scala like being object-oriented, functional, and working on the JVM. The talk covers Scala fundamentals like immutable values, mutable variables, functions, and objects. It also discusses traits, classes, case classes and more Scala concepts.
This document summarizes the London Dart Hackathon. It discusses that Dart is a programming language designed for complex applications and team development. It is easily compilable to JavaScript. The document provides examples of Dart code showing functions, classes, interfaces, libraries, and optional typing. It also discusses Dart libraries for HTML, JSON, and server-side IO. In conclusion, it encourages trying Dart and provides links for more information.
Diving into HHVM Extensions (PHPNW Conference 2015)James Titcumb
HHVM is currently gaining popularity at quite a pace, and it's a pretty exciting time for PHP runtimes. Have you ever wondered what is going on beneath this slick and super-speedy engine? I wondered that myself, so I dived into the internals of HHVM, discovering a treasure trove of awesome stuff. In this talk, I'll show you how HHVM itself works with a guided tour of the codebase, demonstrating how it all pieces together. I'll also show you a couple of ways to write your own incredible HHVM extension. You don't need to know C++ to understand this talk - just PHP language knowledge is enough.
If you thought Monads are a mystery, then this demonstration would show you how to evolve your code towards a Monad without knowing about it. This demo will neither go into any Category Theory nor begin with monadic laws. Instead, we will start with typical code that you see in your daily life as a developer, attempt to DRY (Don't Repeat Yourself) it up and eventually use Monad to remove duplication and verbosity. You'll also see how Monads make your code more declarative and succinct by sequencing the steps in your domain logic.
Also, we know in Java8 Checked Exceptions + λ == Pain! To be more precise, we will evolve a Try<t> (exception handling monad) which is missing in Java8, similar to one found in Scala.
This document discusses socket programming in Java. It begins by explaining the key classes for socket programming - InetAddress, Socket, ServerSocket, DatagramSocket, DatagramPacket, and MulticastSocket. It then provides examples of TCP client-server applications using Sockets and ServerSockets, UDP client-server applications using DatagramSockets and DatagramPackets, and multicast applications using MulticastSockets. The examples demonstrate how to send and receive data over sockets in both text and binary formats.
Avec la version 9 sortie en septembre 2017, Java appuie sur la pédale ! Le rythme des livraisons passe à une version majeure tous les 6 mois. Java 10 est sorti en mars, prochaine version en septembre. Java 10 apporte le 'var' et l'inférence de type pour les variables locales. D'autres nouveautés sont en préparation : les constantes dynamiques, les classes de données, un nouveau switch à base de lambda, des interfaces fermées, de nouvelles choses du coté des génériques et bien plus encore.
Cela viendra-t-il en 11, 12, 15 ? Ne spéculons pas, mais quand ces nouveautés seront prêtes, elles sortiront en quelques mois. On se propose de présenter ces nouveautés, celles qui sont presque prêtes, celles qui seront prêtes bientôt, et celles qui ne seront pas prêtes avant un moment. Quels seront les impacts sur le langage, sur la JVM et donc sur les performances ? Que cela va-t-il nous apporter au quotidien, en tant que développeurs ? Quels seront les nouveaux patterns ? Voici le programme de cette présentation, avec des slides, du code, de la joie et de la bonne humeur !
This document provides an overview of JavaFX, including:
- What JavaFX is and its main components like the JavaFX Framework and JavaFX Script language
- Demos of shapes, animations, and other graphics capabilities in JavaFX
- An overview of the JavaFX architecture and scene graph project for building user interfaces
- Resources for learning more about and getting started with JavaFX development
Bind is a DNS server that translates domain names like "example.com" into IP addresses like 192.0.2.1 so that web browsers and other internet applications can locate internet resources. Bind is open source software maintained by the Internet Systems Consortium (ISC) and is the most widely used DNS server on the internet today. It runs on Unix-like operating systems such as Linux and macOS and provides both authoritative name servers for zones as well as caching servers to improve DNS performance.
November Camp - Spec BDD with PHPSpec 2Kacper Gunia
My slides on PHPSpec 2 from Symfony November Camp Stockholm.
www.symfony.se/november-camp/
More Domain-Driven Design related content at: https://domaincentric.net/
Beyond Breakpoints: Advanced Debugging with XCodeAijaz Ansari
This document contains code snippets and notes from a presentation or workshop about debugging techniques using tools like NSLog, LLDB, and jq. It discusses debugging crashes, testing hypotheses, and examining memory usage. It also demonstrates using the jq tool to parse and filter JSON data within the LLDB debugger. Code examples show setting breakpoints, accessing variables, and calling jq from a Python lldb command to apply jq filters to JSON strings from the debugger.
This document provides an introduction to Groovy for Java developers. It discusses Groovy's features such as closures, optional typing and syntax, and how it compiles to Java bytecode. It then provides examples of writing a simple Groovy script to generate XML, using closures, mocking objects in tests, and building projects with Ant.
This document provides an overview of Scala and compares it to Java. It discusses Scala's object-oriented and functional capabilities, how it compiles to JVM bytecode, and benefits like less boilerplate code and support for functional programming. Examples are given of implementing a simple Property class in both Java and Scala to illustrate concepts like case classes, immutable fields, and less lines of code in Scala. The document also touches on Java interoperability, learning Scala gradually, XML processing capabilities, testing frameworks, and tool/library support.
Declarative Internal DSLs in Lua: A Game Changing ExperienceAlexander Gladysh
The document discusses using internal domain-specific languages (DSLs) in Lua and provides examples of how to implement them. It describes loading DSL data into a tree structure, validating the data through tree traversal, and generating outputs by traversing the tree a second time. The document argues that this approach provides reusability across different DSLs and output targets with good error reporting. It also gives examples of where internal DSLs are used, such as for HTTP APIs, configuration files, databases, and visual editors.
The Future of Java: Records, Sealed Classes and Pattern MatchingJosé Paumard
The release of the JDK 17 brings interesting features in the Java language: sealed types and pattern matching for switch. Along with the introduction of records, the implementation of pattern matching in the Java language begins to take shape. This presentation shows you how records, sealed types, and pattern matching can change the way we write Java code, on real patterns. It also shows you what we can expect to see on this topic in the future. It is mostly a live coding presentation, with some slides when the code is shown cannot be executed.
Kotlin is a better alternative to Java that fixes many of Java's weaknesses. It removes unnecessary syntax like semicolons and checked exceptions, adds powerful features like type inference, lambdas, and when expressions, and compiles to JVM bytecode so it can interoperate with existing Java code and libraries. Kotlin is fully supported by JetBrains and can also target JavaScript, making it a practical and modern option for JVM development.
This talk discusses various issues of low-level PHP performance, such as: When is it more efficient to use arrays or objects? What causes catastrophic garbage collection? Does adding type annotations make PHP faster or slower?
I will answer these types of question with a (shallow) dive into PHP internals, touching on various topics like value representation, bytecode optimization and GC.
PHP 8.0 is expected to be released by the end of the year, so it’s time to take a first look at the next major version of PHP. Attributes, union types, and a just-in-time compiler are likely the flagship features of this release, but there are many more improvements to be excited about. As PHP 8.0 is a major version, this release also includes backwards-incompatible changes, many of which are centered around stricter error handling and more type safety.
This talk will discuss new features already implemented in PHP 8, backwards-compatibility breaks to watch out for, as well as some features that are still under discussion.
Starting with Scala : Frontier Developer's Meetup December 2010Derek Chen-Becker
This document provides an overview of the Scala programming language presented at a meetup event. It discusses Scala's history and pedigree, being created by Martin Odersky. It outlines some key aspects of Scala like being object-oriented, functional, and working on the JVM. The talk covers Scala fundamentals like immutable values, mutable variables, functions, and objects. It also discusses traits, classes, case classes and more Scala concepts.
This document summarizes the London Dart Hackathon. It discusses that Dart is a programming language designed for complex applications and team development. It is easily compilable to JavaScript. The document provides examples of Dart code showing functions, classes, interfaces, libraries, and optional typing. It also discusses Dart libraries for HTML, JSON, and server-side IO. In conclusion, it encourages trying Dart and provides links for more information.
Diving into HHVM Extensions (PHPNW Conference 2015)James Titcumb
HHVM is currently gaining popularity at quite a pace, and it's a pretty exciting time for PHP runtimes. Have you ever wondered what is going on beneath this slick and super-speedy engine? I wondered that myself, so I dived into the internals of HHVM, discovering a treasure trove of awesome stuff. In this talk, I'll show you how HHVM itself works with a guided tour of the codebase, demonstrating how it all pieces together. I'll also show you a couple of ways to write your own incredible HHVM extension. You don't need to know C++ to understand this talk - just PHP language knowledge is enough.
If you thought Monads are a mystery, then this demonstration would show you how to evolve your code towards a Monad without knowing about it. This demo will neither go into any Category Theory nor begin with monadic laws. Instead, we will start with typical code that you see in your daily life as a developer, attempt to DRY (Don't Repeat Yourself) it up and eventually use Monad to remove duplication and verbosity. You'll also see how Monads make your code more declarative and succinct by sequencing the steps in your domain logic.
Also, we know in Java8 Checked Exceptions + λ == Pain! To be more precise, we will evolve a Try<t> (exception handling monad) which is missing in Java8, similar to one found in Scala.
This document discusses socket programming in Java. It begins by explaining the key classes for socket programming - InetAddress, Socket, ServerSocket, DatagramSocket, DatagramPacket, and MulticastSocket. It then provides examples of TCP client-server applications using Sockets and ServerSockets, UDP client-server applications using DatagramSockets and DatagramPackets, and multicast applications using MulticastSockets. The examples demonstrate how to send and receive data over sockets in both text and binary formats.
Avec la version 9 sortie en septembre 2017, Java appuie sur la pédale ! Le rythme des livraisons passe à une version majeure tous les 6 mois. Java 10 est sorti en mars, prochaine version en septembre. Java 10 apporte le 'var' et l'inférence de type pour les variables locales. D'autres nouveautés sont en préparation : les constantes dynamiques, les classes de données, un nouveau switch à base de lambda, des interfaces fermées, de nouvelles choses du coté des génériques et bien plus encore.
Cela viendra-t-il en 11, 12, 15 ? Ne spéculons pas, mais quand ces nouveautés seront prêtes, elles sortiront en quelques mois. On se propose de présenter ces nouveautés, celles qui sont presque prêtes, celles qui seront prêtes bientôt, et celles qui ne seront pas prêtes avant un moment. Quels seront les impacts sur le langage, sur la JVM et donc sur les performances ? Que cela va-t-il nous apporter au quotidien, en tant que développeurs ? Quels seront les nouveaux patterns ? Voici le programme de cette présentation, avec des slides, du code, de la joie et de la bonne humeur !
This document provides an overview of JavaFX, including:
- What JavaFX is and its main components like the JavaFX Framework and JavaFX Script language
- Demos of shapes, animations, and other graphics capabilities in JavaFX
- An overview of the JavaFX architecture and scene graph project for building user interfaces
- Resources for learning more about and getting started with JavaFX development
Bind is a DNS server that translates domain names like "example.com" into IP addresses like 192.0.2.1 so that web browsers and other internet applications can locate internet resources. Bind is open source software maintained by the Internet Systems Consortium (ISC) and is the most widely used DNS server on the internet today. It runs on Unix-like operating systems such as Linux and macOS and provides both authoritative name servers for zones as well as caching servers to improve DNS performance.
This document provides an introduction and overview of JavaFX. It discusses that JavaFX is an API included in Java SE 7/8 for building rich internet applications with a familiar Java programming model. JavaFX allows developing cross-platform applications for Windows, Mac, and Linux. It highlights benefits like rapid application development using tools like NetBeans and SceneBuilder, CSS styling, and building user interfaces with FXML. The document provides examples of basic JavaFX components like containers, controls, shapes, and charts and recommends resources to get started with JavaFX.
The document discusses 3D modeling in JavaFX and describes how to create a basic cube shape using a Box primitive. Code is provided to instantiate a new Box object with dimensions of 150 units each way and add it to the scene graph as a child of the parent node. Additional 3D primitives like sphere and cylinder are listed, as well as options for custom meshes, importing models, and viewing 3D content in JavaFX.
The document discusses the JavaFX ecosystem, including layout managers like MigLayout and Medusa, widgets like JideFX and ControlsFX, styling libraries like JFoenix and BootstrapFX, testing tools like TestFX, frameworks like Afterburner.fx and MvvmFX, integration platforms like e(fx)clipse, libraries like AnchorFX and ReactFX, and GroovyFX for writing JavaFX applications in Groovy. It provides an overview of the various options available for building JavaFX user interfaces, styling applications, testing, and developing full applications.
This dynamic session was presented in JavaOne 2015. It shows examples to clarify the use of JavaFX technology in business application development. We will also share a test-oriented design solution using the Model-View-Presenter (MVP) functionality and the multithread feature. Other topics covered will include the use of ExecutorService to manage multithread behavior as well as Guice as the AOP and dependency injection.
- Java FX is a software platform for creating and delivering desktop applications, as well as rich internet applications (RIAs) that can run across a wide variety of connected devices.
- It allows developers to write user interface code once in Java FX Script and deploy to Windows, Linux, Mac, and embedded devices without rewriting code.
- Java FX provides tools and APIs for building RIAs with rich media and graphics beyond what HTML5 can currently offer, competing with technologies like Flash and Silverlight.
This document discusses migrating from Swing to JavaFX. It presents 3 migration scenarios: 1) embedding JavaFX in Swing, 2) rewriting Swing apps without FXML, and 3) rewriting with FXML. Key similarities and differences between Swing and JavaFX concepts like buttons, layouts, and tables are outlined. FXML is described as a way to declaratively describe JavaFX scene graphs using XML. The document also briefly mentions tools like Scene Builder and concludes without covering advanced JavaFX topics like CSS, animation, and effects.
This document provides an overview of DataFX, a JavaFX framework that facilitates interaction between JavaFX applications and enterprise data. It discusses how DataFX handles reading external data sources via protocols like REST, SSE, and WebSockets. It also covers how DataFX integrates with JavaFX concepts like Observables and leverages the concurrency API to avoid blocking the JavaFX application thread. Additionally, it introduces the Flow API for defining navigation between views and linking controller actions. Finally, it mentions related projects in DataFX Labs for validation, EJB support, and feature toggling.
JavaFX is a software platform for creating and delivering desktop applications, as well as rich internet applications that can run across a wide variety of devices. JavaFX started development in 2007 and provides features like vector graphics, drag and drop functionality, and a declarative language. It allows developers to write once and deploy applications across multiple platforms like Windows, Mac OS X, Linux, iOS and Android. Compared to other platforms, JavaFX is free to develop and deploy, uses open standards, and has good support across operating systems.
Cleaner APIs, Cleaner UIs with Visage (33rd Degrees)Stephen Chin
Visage is a JVM language designed specifically for UI development, with special syntax for hierarchically describing UIs, binding data and behavior, and representing UI specific concepts such as animation, layout, and styles. It also is a full-featured language with a full compiler tool-chain, static compilation to JVM bytecodes, and IDE plug-ins. This talk will demonstrate how to use the Visage language to build UIs for JavaFX 2.0, Vaadin, and Android. Find out how you can take control of your UI development by writing cleaner, more maintainable UI code using the Visage language in your existing Java projects.
This document discusses an experiment to use PostgreSQL as the sole data access layer for a web application by replacing a traditional RESTful API server with PostgREST. PostgREST is a framework that provides a RESTful interface to any PostgreSQL database without requiring additional code or configuration. The document demonstrates PostgREST by connecting to a sample Pagila database and allowing full CRUD operations and filtering through SQL queries alone. It also shows how PostgREST handles authentication, authorization, relations, and versioning directly through PostgreSQL features.
This document discusses JavaFX layout fundamentals, including changes coming in version 1.3. It covers the layout mechanism, resizable vs non-resizable nodes, layout bounds, app-managed vs container-managed layout, common layout containers like Stack and HBox, and concepts like growing, shrinking, and filling. The document also provides 10 commandments for working with JavaFX layout.
1. The document discusses 10 things the author likes about JavaFX, which is a Java UI toolkit.
2. It provides examples of JavaFX capabilities like data binding, FXML, CSS, effects, animations, multi-touch support, charts, and integration with web views.
3. The author encourages using JavaFX instead of older toolkits like Swing, argues it is efficient and modern, and offers to provide more information to those interested in migrating from Swing to JavaFX.
The document discusses the introduction of an HTTP plugin for MySQL. Key points:
- The plugin allows MySQL to communicate over HTTP and return data in JSON format, making it more accessible to web developers.
- It provides three HTTP APIs - SQL, CRUD, and key-document - that all return JSON and leverage the power of SQL.
- The initial release has some limitations but demonstrates the concept, with the goal of getting feedback to improve the APIs.
- The plugin acts as a proxy between HTTP and SQL, translating requests and allowing full access to MySQL's features via the SQL endpoint.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive functioning. Exercise causes chemical changes in the brain that may help boost feelings of calmness, happiness and focus.
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...Stephen Chin
Presented at GeeCON 2011: JavaFX Script is going away, but the JavaFX Platform is getting a new face with pure Java APIs. In this session, you will see how you can leverage the new JavaFX 2.0 APIs from a host of different JVM languages, including JRuby, Clojure, Groovy, and Scala.
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chinjaxconf
JavaFX 2 is the next version of a revolutionary rich client platform for developing immersive desktop applications. One of the new features in JavaFX 2 is a set of pure Java APIs that can be used from any JVM language, opening up tremendous possibilities. This presentation demonstrates the potential of using JavaFX 2 together with alternative languages such as Groovy, Clojure, and Scala. It also will showcase the successor to JavaFX Script, Visage, a DSL with features specifically targeted at helping create clean UIs.
Clojure and Swing – a new productivity sweet spot? discusses how Clojure, a Lisp dialect that runs on the JVM, can be used to develop graphical user interfaces (GUIs) using Java Swing in a more productive way than plain Java. It presents several advantages of Clojure for Swing development, such as reducing boilerplate code, easier definition of actions and event bindings, and increased flexibility and reusability through functional programming techniques. Examples are provided of common Swing programming tasks implemented more concisely and readably in Clojure compared to Java. The document concludes that Clojure is a powerful and flexible language that offers opportunities to apply Lisp concepts to Swing GUI development
This document provides an introduction and overview of JavaFX. It discusses what JavaFX is, its scene graph and stack, scripting language features, basic data types, and animation framework. It also provides resources for downloading JavaFX, tutorials, forums and projects.
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)Stephen Chin
JavaFX 2.0 is the next version of a revolutionary rich client platform for developing immersive desktop applications. One of the new features in JavaFX 2.0 is a set of pure Java APIs that can be used from any JVM language, opening up tremendous possibilities. This presentation demonstrates the benefits of using JavaFX 2.0 together with the Scala programming language to provide a type-safe declarative syntax with support for lazy bindings and collections. Advanced language features, such as DelayedInit and @specialized will be discussed, as will ways of forcing prioritization of implicit conversions for n-level cases. Those who survive the pure technical geekiness of this talk will be rewarded with plenty of JavaFX UI eye candy.
Apresentação em português dos motivos para escolher ScalaFX para criar aplicativos nativos para as plataformas Mac OS X, Linux e Windows. Explico em português minha caminhada atrás das alternativas no mundo do JavaFX2 após a retirada do JavaFX Script em setembro de 2010. Descubra aqui por que eu fiquei com ScalaFX como alternativa mais elegante e fácil de programar.
Clojure is a Lisp dialect that runs on the Java Virtual Machine (JVM) and provides excellent concurrency support and tight integration with Java. It retains the advantages of Lisp such as being simple, expressive, and flexible while also allowing access to existing Java code and libraries. Clojure makes concurrency easy through features like transactional memory and agents. It can be used to create both Java and Clojure libraries and extends the Java platform.
Here are the key points about closure arguments in Groovy:
- Closures can take arguments like regular methods
- Arguments are specified inside the closure definition between parentheses ()
- Argument names are specified like method parameters (e.g. num, id)
- If no arguments are needed, the parentheses can be omitted
- The last argument can optionally be a special variable called "it" which represents the argument passed to the closure
- Closures are first-class and can be passed to methods like regular arguments
So in summary:
Closures in Groovy allow defining inline anonymous functions that can take arguments like regular methods. The arguments are specified in the closure definition between parentheses and represent the values passed when calling
Fast Web Applications Development with Ruby on Rails on OracleRaimonds Simanovskis
This document provides an overview of Ruby on Rails and how it can be used to develop fast web applications with an Oracle database backend. It discusses key Rails concepts like MVC architecture and Active Record. It also demonstrates how to connect Rails to Oracle using gems like ruby-oci8, activerecord-oracle_enhanced-adapter, and ruby-plsql to access Oracle data types, stored procedures, and full-text search capabilities. The document concludes with deployment options and pointers to related sessions.
JavaScript is evolving with the addition of modules, platform consistency, and harmony features. Modules allow JavaScript code to be organized and avoid naming collisions. CommonJS and AMD module formats are used widely. Platform consistency is improved through polyfills that mimic future APIs for older browsers. Harmony brings language-level modules and features like destructuring assignment, default parameters, and promises to JavaScript. Traceur compiles Harmony code to existing JavaScript.
Spring Boot Revisited with KoFu and JaFuVMware Tanzu
This document summarizes a presentation on Spring Boot revisited with KoFu and JaFu. KoFu and JaFu are new flavors of Spring Boot that use functional programming approaches. KoFu uses Kotlin and functional bean registration, while JaFu uses Java and a lambda-based infrastructure. The presentation discusses the benefits of Kotlin and Java evolutions, an overview of Spring Fu which is an incubator for KoFu and JaFu, examples of applications written in each flavor, efficiency gains from using Kotlin and KoFu, the team working on the project, and a roadmap for upcoming features including native application support and automated transformation between configurations.
Polyglot Programming in the JVM - 33rd DegreeAndres Almiray
The document discusses polyglot programming on the Java Virtual Machine (JVM). It begins by introducing the speaker, Andres Almiray, and providing some background on Java. It then notes issues with Java like verbosity and lack of language upgrades. Alternative JVM languages like Groovy, Scala, and Clojure are presented as having features like closures, enhanced switch statements, and reduced verbosity. The document demonstrates how these languages interoperate with Java and highlights areas like web development and build systems where polyglot programming is common. It concludes by encouraging experimenting with different JVM languages.
This document provides an overview of the Scala programming language. Some key points:
- Scala runs on the Java Virtual Machine and was created by Martin Odersky at EPFL.
- It has been around since 2003 and the current stable release is 2.7.7. Release 2.8 beta 1 is due out soon.
- Scala combines object-oriented and functional programming. It has features like pattern matching, actors, XML literals, and more that differ from Java. Everything in Scala is an object.
Explains how to make use of ruby in java-based work environments. There are some hints at .NET equivalents along the way.
This is part 3 of a trilogy of Star Wars-themed ruby talks given at Protegra's SDEC 2011 in Winnipeg, Canada.
Similar to JavaFX Your Way: Building JavaFX Applications with Alternative Languages (20)
With the rise of DevOps, Cloud Computing, and Container technologies, how you approach development has dramatically changed. Learn how to take advantage of microservices, serverless, and cloud-native technologies with the latest DevOps techniques to create hyperproductive teams.
10 Ways Everyone Can Support the Java CommunityStephen Chin
Foojay is all about the community helping to take Java forward, so as an attendee of the Friends of OpenJDK FOSDEM devroom you are already on your way towards making the Java community better!
But what can we all encourage our friends and colleagues to do in order to make the Java community more vibrant, active, and welcoming.
In this presentation, you will learn all of the insider secrets on how to support the worldwide community of 12 million Java developers.
Java Clients and JavaFX: The Definitive GuideStephen Chin
This talk is for professionals building Java applications for desktop, mobile, and embedded devices in the cloud age. It will help you build enhanced visual experiences and deploy modern, easy-to-maintain client applications across a variety of platforms. These applications can take advantage of the latest user interface components, 3D technology, and cloud services to create immersive visualizations and enable high-value data manipulation. Learn from Stephen Chin, lead author of the definitive Java client reference, how to leverage the latest open-source Java client technologies to build rich, responsive, and modern UIs.
Speaker: Stephen Chin
Bio: Stephen Chin is Senior Director of Developer Relations at JFrog, author of Raspberry Pi with Java, The Definitive Guide to Modern Client Development, and Pro JavaFX Platform. He has keynoted numerous Java conferences around the world including Oracle Code One (formerly JavaOne), where he is an 8-time Rock Star Award recipient. Stephen is an avid motorcyclist who has done evangelism tours in Europe, Japan, and Brazil, interviewing hackers in their natural habitat and posting the videos on http://nighthacking.org/. When he is not traveling, he enjoys teaching kids how to do embedded and robot programming together with his teenage daughter.
With the rise of DevOps, low cost Cloud Computing, and emerging Container technologies, the landscape for how you approach development has dramatically changed. This talk is focused on helping Java developers to adapt to this new landscape and take advantage of microservices, serverless, and cloud-native technologies with the latest DevOps techniques to simplify their build and create hyperproductive teams. Some of the technologies you will learn about in this talk include source control, build declaration, CI/CD, package management, containerization, and security.
Learn from the combined experience of the presenters who are experts in the Java and DevOps domains on the best tools, technologies, and methodologies to build your next cloud-native application or refactor your monolith. We cover the entire DevOps toolchain from source control through CI/CD through containerized deployments with an emphasis on maintaining efficiency and control from the source code and dependencies.
Java Clients and JavaFX - Presented to LJCStephen Chin
This session is for professionals building Java applications for desktop, mobile, and embedded devices in the cloud age. It will help you build enhanced visual experiences and deploy modern, easy-to-maintain client applications across a variety of platforms. These applications can take advantage of the latest user interface components, 3D technology, and cloud services to create immersive visualizations and enable high-value data manipulation.
Learn from Stephen Chin, lead author of the definitive Java client reference, how to leverage the latest open-source Java client technologies to build rich, responsive, and modern UIs.
RetroPi Handheld Raspberry Pi Gaming ConsoleStephen Chin
In this session I will walk you through how to build your own retro handheld console that is powered by Java, runs on a Raspberry Pi, and is printed on a 3D printer. Some of the topics that we will cover along the journey include:
• Hacking Java on the Raspberry Pi
• Rigging input devices with Pi4J
• Insane performance tuning on the JVM
• Why your boss [or SO] needs to buy you a 3D printer!
And of course your retro gaming mettle will be put to the test, so make sure to dust off your old 8 and 16 bit consoles to prepare.
This presentation is about the most fun you can have while still legitimately calling this conference “work.” In fact, I will hopefully inspire you to do your own creative “work” leveraging Java and Raspberry Pi to hack the real world.
When JavaFX Script was released, the mobile component was an important part. It was also one of the reasons many people and analysts believed in JavaFX as a real cross-platform client-side framework. For a number of reasons, JavaFX on mobile disappeared from the official Java roadmap. Fortunately, the OpenJFX team at Oracle made all the required sources available, and the JavaFXPorts initiative worked on providing JavaFX SDK's for the mobile platforms. In this session, we will show the current state of JavaFX on Mobile. We will show how to create a real cross-platform JavaFX Application using an IDE, and how easy it actually is to deploy that application on Android and iOS devices. We will show some of the features and limitations, and talk about the eco-system that is starting to take shape.
Confessions of a Former Agile Methodologist (JFrog Edition)Stephen Chin
I am best known for my work as a technology author and evangelist, but before this I used to be a methodology guru. Find out about what I learned in my 14+ year journey through the Agile methodologies and trends that have reshaped what we know as modern software development practices. This version of the talk has a few Easter Eggs for the JFrog guys who were instrumental in the build and test infrastructure I succeeded with, and invited me to speak at their awesome SwampUP event in Napa.
This document provides information about using Lego EV3 robots with LeJOS, including how to set up the software and connect to the EV3 brick from Windows. It describes the hardware components of the EV3 brick and various sensors. It also includes steps to build a wind turbine project with a fan, light sensor, and motors to rotate the turbine and fan. Code examples are provided to control the motors and read the light sensor.
Confessions of a Former Agile MethodologistStephen Chin
While I am best known as a Java evangelist, my day job prior to joining Oracle was Chief Agile Methodologist where I facilitated 3 company-wide Agile rollouts. If you are skeptical of folks trying to sell you certifications, frustrated with the institution of new processes and tracking systems, or wary of process experts taking the place of technical leadership, then this is the session for you. Come learn the insider secrets of how Agile works in a large enterprise from someone who has been in the eye of the hurricane. However, be warned that this knowledge will give you the power to change the development culture in your organization for better or worse -- are you ready to shoulder this responsibility?
This document summarizes an Internet of Things magic show presented by Stephen Chin and Angela Caicedo at a JavaOne conference. The show demonstrated three magic tricks enabled by IoT technologies:
1. Mind reading: A jacket with sensors gave feedback to correctly predict the audience member's selection from a menu.
2. Lightning reflexes: An IoT-enabled grabber reacted in real-time to lights and sounds to play a game.
3. Materialization: A 3D printer was used to demonstrate making objects appear from nothing using code and IoT technologies.
The show highlighted how IoT, Java, sensors, actuators and other technologies can enable interactive experiences and "magic" through
Surviving as a zombie is tough... with the constant risks of sunlight, fire, and pesky mobs, doing your job of infecting the local villagers can be deadly. Fortunately, with the new JavaFX ZombieTime app, powered by the JSR 310 Date and Time API, you can rest easy. With built-in time zone and DST support you no longer have to worry about roaming around under the scorching hot sun. Accurately calculate out how long you have to infect the villagers before you decompose using Durations. And coordinate global attacks on the humans by syncing with your undead brethren on Instants. With the power of Java 8, eradicating the human race with a highly infectious virus has never been easier!
This presentation is designed to teach Java Date and Time APIs to the undead, but the living are welcome to be our "guests". You may also learn some JavaFX in the process -- that is entirely my fault. Any correlation between the characters and events in this presentation and the impending extinction of mankind is purely coincidental.
The document discusses JavaFX and its capabilities for building applications across platforms like Android and desktop systems. It provides an overview of JavaFX's cross-platform graphics, animation, and media support. It also outlines how to get JavaFX, develop applications with it using common IDEs, and deploy applications to Android devices. The document demonstrates a simple JavaFX application with animating circles and provides information on JavaFX layouts, controls, themes, and visual development tools.
This document provides instructions for setting up and using a Raspberry Pi with a touchscreen to run Java applications. It outlines downloading and installing Java 8 on the Raspberry Pi, connecting the touchscreen and other hardware, setting up the WiFi connection, and provides an example of running a sample JavaFX application. It also describes additional sensors that can be connected and sample code for interacting with them through the Pi4J library.
This document discusses using Java SE on small devices like tablets, Pis, and Legos. It outlines how Java SE 8 supports these types of devices better than previous versions through improved APIs, language features, and performance. It provides examples of projects like LeJOS that run Java on Lego Mindstorms robots and discusses tools like DukePad for developing Java applications on tablets. The document advocates getting involved in open source projects to help expand Java's reach to more small devices and embedded systems.
DukeScript is a new way of writing JavaScript applications that lets you take advantage of a powerful binding model to connect to Java code running in a local JVM.
English version of the Devoxx4Kids workshop deck to teach programming using the NAO humanoid robot. (Credit to Daniel De Luca for content creation and Nicolas Rigaud on translation)
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Zilliz
Join us to introduce Milvus Lite, a vector database that can run on notebooks and laptops, share the same API with Milvus, and integrate with every popular GenAI framework. This webinar is perfect for developers seeking easy-to-use, well-integrated vector databases for their GenAI apps.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
1. JavaFX Your Way
Building JavaFX Applications with
Alternative Languages
Stephen Chin Jonathan Giles
GXS Oracle
steve@widgetfx.org Jonathan.giles@oracle.com
tweet: @steveonjava tweet: @jonathangiles
2. JavaFX Your Way
Building JavaFX Applications with
Alternative Languages
Stephen Chin Jonathan Giles
GXS Oracle
steve@widgetfx.org Jonathan.giles@oracle.com
tweet: @steveonjava tweet: @jonathangiles
5. THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL
PRODUCT DIRECTION. IT IS INTENDED FOR INFORMATION
PURPOSES ONLY, AND MAY NOT BE INCORPORATED INTO ANY
CONTRACT. IT IS NOT A COMMITMENT TO DELIVER ANY
MATERIAL, CODE, OR FUNCTIONALITY, AND SHOULD NOT BE
RELIED UPON IN MAKING PURCHASING DECISION. THE
DEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES OR
FUNCTIONALITY DESCRIBED FOR ORACLE'S PRODUCTS REMAINS
AT THE SOLE DISCRETION OF ORACLE.
8. Agenda
> Catch up on latest news
> JavaFX in Java
> Explore alternative languages
JRuby
Clojure
Groovy
Scala
9. Todays News
• JavaFX Script no longer required to write JavaFX
applications
• Benefits:
– Easier integration with business logic on JVM
– Access to generics, annotations, (closures), etc
– Java has great IDE support
• Downsides:
– JavaFX Script was kind to us
11. JavaFX in Java
> JavaFX API follows JavaBeans approach
> Similar in feel to other UI toolkits (Swing, etc)
> Researching approaches to minimize boilerplate
12. Binding
> Unquestionably the biggest JavaFX Script
innovation
> Researching ways to incorporate into Java
> Will not be as succinct as JavaFX Script
> Genius‟ are deployed in underground labs
pondering this right now
13. Observable Pseudo-Properties
> Supports watching for changes to properties
> Implemented via anonymous inner classes
> Maybe closures in the future
14. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40);
rect.setY(40);
rect.setWidth(100);
rect.setHeight(200);
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
});
15. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40);
rect.setY(40);
rect.setWidth(100); Before: „addChangingListener‟
rect.setHeight(200); After: „addChangedListener‟
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
});
16. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40); The property we are wanting to
rect.setY(40); watch
rect.setWidth(100);
rect.setHeight(200);
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
});
17. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40); Listener for each primitive type,
rect.setY(40); and Objects in general
rect.setWidth(100);
rect.setHeight(200);
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
});
18. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40);
rect.setY(40);
rect.setWidth(100);
rect.setHeight(200);
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
public void handle(Bean bean, PropertyReference pr, boolean oldHover) {
}
});
Rectangle is a Bean
19. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40);
rect.setY(40);
rect.setWidth(100);
rect.setHeight(200);
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
public void handle(Bean bean, PropertyReference pr, boolean oldHover) {
}
});
Refers to the
Rectangle.hover „property‟
20. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40);
rect.setY(40);
rect.setWidth(100);
rect.setHeight(200);
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
public void handle(Bean bean, PropertyReference pr, boolean oldHover) {
}
});
For performance reasons,
this is the old value.
21. Observable Pseudo-Properties
Rectangle rect = new Rectangle();
rect.setX(40);
rect.setY(40);
rect.setWidth(100);
rect.setHeight(200);
rect.addChangedListener(Rectangle.HOVER, new BooleanListener() {
public void handle(Bean bean, PropertyReference pr, boolean oldHover) {
rect.setFill(rect.isHover() ? Color.GREEN : Color.RED);
}
});
22. Sequences in Java
> Sequence class available
Essentially an observable List
> Public API is still sequence-based
> Internal code can use lighter collections API
23. Example Application
public class HelloStage implements Runnable {
public void run() {
Stage stage = new Stage();
stage.setTitle("Hello Stage");
stage.setWidth(600);
stage.setHeight(450);
Scene scene = new Scene();
scene.setFill(Color.LIGHTGREEN);
stage.setScene(scene);
stage.setVisible(true);
}
public static void main(String[] args) {
FX.start(new HelloStage());
}
}
24. Summary
> The JVM has a modern UI toolkit coming to it
> Total port to Java – no hacks or kludges
> Many languages to choose from
> Alternate languages == exciting possibilities
> Choose the best language for your needs
25. Major Question
How can alternative languages make developing
JavaFX user interfaces easier & more productive?
28
34. A Little About Clojure
> Started in 2007 by Rich Hickey
> Functional Programming Language
> Derived from LISP
> Optimized for High Concurrency
(def hello (fn [] "Hello world"))
(hello)
> … and looks nothing like Java!
37
35. Clojure Syntax in One Slide
Symbols Collections
(commas optional)
> numbers – 2.178 > Lists
> ratios – 355/113 (1, 2, 3, 4, 5)
> strings – “clojure”, “rocks” > Vectors
> characters – a b c d [1, 2, 3, 4, 5]
> symbols – a b c d > Maps
> keywords – :alpha :beta {:a 1, :b 2, :c 3, :d 4}
> boolean – true, false > Sets
> null - nil #{:a :b :c :d :e}
(plus macros that are syntactic sugar wrapping the above)
38
47. Closures in Clojure
> Inner classes can be created using proxy
(.addChangeListener rect Rectangle/HOVER
(proxy [BooleanListener] []
(handle [b, p, o]
(.setFill rect
(if (.isHover rect) Color/GREEN Color/RED)))))
50
48. Closures in Clojure
> Inner classes can be created using proxy
Proxy form:
(proxy [class] [args] fs+)
f => (name [params*] body)
(.addChangeListener rect Rectangle/HOVER
(proxy [BooleanListener] []
(handle [b, p, o]
(.setFill rect
(if (.isHover rect) Color/GREEN Color/RED)))))
51
50. Features of Groovy
> Tight integration with Java
Very easy to port from Java to Groovy
> Declarative syntax
Familiar to JavaFX Script developers
> Builders
54. Slight Aside: Groovy Builders
> Groovy builders make writing custom DSLs easy
> For the next slide, I am using a builder I defined
> Hopefully the community will improve upon this
65. What is Scala
2001 2006
• Scala Started • Scala v2.0
2003/2004 2010
• Scala v1.0 • Scala 2.8.0 (latest)
> Started in 2001 by Martin Odersky
> Compiles to Java bytecodes
> Pure object-oriented language
> Also a functional programming language
68
66. Why Scala?
> Shares many language features with JavaFX
Script that make GUI programming easier:
Static type checking – Catch your errors at compile
time
Closures – Wrap behavior and pass it by reference
Declarative – Express the UI by describing what it
should look like
> Scala also supports DSLs!
69
67. Java vs. Scala DSL
public class HelloStage implements Runnable { object HelloJavaFX extends JavaFXApplication {
def stage = new Stage {
public void run() { title = "Hello Stage"
Stage stage = new Stage(); width = 600
stage.setTitle("Hello Stage"); height = 450
stage.setWidth(600); scene = new Scene {
stage.setHeight(450); fill = Color.LIGHTGREEN
Scene scene = new Scene(); content = List(new Rectangle {
22 Lines
scene.setFill(Color.LIGHTGREEN);
Rectangle rect = new Rectangle(); 17 Lines
x = 25
y = 40
rect.setX(25); width = 100
545 Characters
rect.setY(40);
rect.setWidth(100);
324 Characters
height = 50
fill = Color.RED
rect.setHeight(50); })
rect.setFill(Color.RED); }
stage.add(rect); }
stage.setScene(scene); }
stage.setVisible(true);
}
public static void main(String[] args) {
FX.start(new HelloStage());
}
}
70
68. object HelloJavaFX extends JavaFXApplication {
def stage = new Stage {
title = "Hello Stage"
width = 600
height = 450
scene = new Scene {
fill = Color.LIGHTGREEN
content = List(new Rectangle {
x = 25
y = 40
width = 100
height = 50
fill = Color.RED
})
}
}
}
71
69. object HelloJavaFX extends JavaFXApplication {
def stage = new Stage {
title = "Hello Stage"
width = 600
height = 450 for JavaFX
Base class
applications
scene = new Scene {
fill = Color.LIGHTGREEN
content = List(new Rectangle {
x = 25
y = 40
width = 100
height = 50
fill = Color.RED
})
}
}
}
72
70. object HelloJavaFX extends JavaFXApplication {
def stage = new Stage {
title = "Hello Stage"
width = 600
height = 450
scene = new Scene { Declarative Stage
fill = Color.LIGHTGREEN definition
content = List(new Rectangle {
x = 25
y = 40
width = 100
height = 50
fill = Color.RED
})
}
}
}
73
71. object HelloJavaFX extends JavaFXApplication {
def stage = new Stage {
title = "Hello Stage"
width = 600 Inline property
height = 450 definitions
scene = new Scene {
fill = Color.LIGHTGREEN
content = List(new Rectangle {
x = 25
y = 40
width = 100
height = 50
fill = Color.RED
})
}
}
}
74
72. object HelloJavaFX extends JavaFXApplication {
def stage = new Stage {
title = "Hello Stage"
width = 600
height = 450
scene = new Scene {
fill = Color.LIGHTGREEN
content = List(new Rectangle {
x = 25
y = 40
width = 100
height = 50 List Construction
fill = Color.RED Syntax
})
}
}
}
75
73. Animation in Scala
def timeline = new Timeline {
repeatCount = INDEFINITE
autoReverse = true
keyFrames = List(
new KeyFrame(50) {
values = List(
new KeyValue(rect1, Rectangle.X -> 300),
new KeyValue(rect2, Rectangle.Y -> 500),
new KeyValue(rect2, Rectangle.Width -> 150)
)
}
)
}
76
74. Animation in Scala
def timeline = new Timeline {
repeatCount = INDEFINITE
autoReverse = true Duration set by
keyFrames = List( Constructor Parameter
new KeyFrame(50) {
values = List(
new KeyValue(rect1, Rectangle.X -> 300),
new KeyValue(rect2, Rectangle.Y -> 500),
new KeyValue(rect2, Rectangle.WIDTH -> 150)
)
}
)
}
77
75. Animation in Scala
def timeline = new Timeline {
repeatCount = INDEFINITE
autoReverse = true
keyFrames = List(
new KeyFrame(50) {
values = List(
new KeyValue(rect1, Rectangle.X -> 300),
new KeyValue(rect2, Rectangle.Y -> 500),
new KeyValue(rect2, Rectangle.WIDTH -> 150)
)
}
)
} Operator overloading for
animation syntax
78
76. Closures in Scala
> Closures are also supported in Scala
> And they are 100% type-safe
rect.addChangedListener(Node.HOVER, (b, p, o) => {
rect.fill = if (rect.hover) Color.GREEN else Color.RED
})
79
77. Closures in Scala
> Closures are also supported in Scala
> And they are 100% type-safe
rect.addChangedListener(Node.HOVER, (b, p, o) => {
rect.fill = if (rect.hover) Color.GREEN else Color.RED
})
Compact syntax
(params) => {body}
80
78. Conclusion
> JavaFX as Java APIs is great
> Usable in alternate languages
> Over time improved support is possible
E.g. Groovy builders, Scala DSL
Remember: This is a proof of concept only – you
can not leave this session and do this today.
79. Stephen Chin Jonathan Giles
steve@widgetfx.org Jonathan.giles@oracle.com
tweet: @steveonjava tweet: @jonathangiles
83