This document summarizes a presentation about building domain-specific languages (DSLs) using Java, Groovy, and Ruby. The presentation covers internal and external DSLs, building blocks for DSLs like fluent interfaces and closures, examples of DSLs for logging, calendars, and time, and best practices for designing and implementing DSLs. The goal is to show how DSLs can provide a higher level of abstraction than traditional APIs and help developers work with concepts in a problem domain.
Exploiting JRuby: Building Domain-Specific Languages for the Java Virtual Mac...elliando dias
This document outlines a presentation about creating domain-specific languages (DSLs) for the Java Virtual Machine using JRuby. The presentation introduces DSLs and their benefits, demonstrates example DSLs, discusses techniques for building DSLs in JRuby like operator overloading and dynamic typing, and provides best practices for DSL design. The goal is to teach attendees how to exploit JRuby to build customized languages that simplify complex tasks.
Slides from Talk by Jan Medved on Yang modeling and its support in OpenDaylight meetup
http://www.meetup.com/OpenDaylight-Silicon-Valley/events/212834752
Yang is a data modeling language that is rapidly being adopted to model Netconf, an IETF standardized network management protocol, as well as to model other data interfaces in OpenDaylight. Join us for the talk by expert Jan Medved to learn about Yang and its usage within OpenDaylight.
This document discusses Groovy's capabilities for building domain-specific languages (DSLs). It provides examples of how Groovy allows flexible syntax through features like optional typing, closures, builders, and the meta-object protocol (MOP). The MOP allows intercepting method calls at runtime to change behavior. Groovy is well-suited for DSLs as it can seamlessly integrate DSLs into applications and its compiler supports transformations.
This document provides an overview of Gaelyk, a lightweight Groovy toolkit for developing applications on Google App Engine. Gaelyk builds on Groovy's servlet support and provides enhancements to the Google App Engine Java SDK to simplify development. It allows using Groovy scripts called Groovlets instead of raw servlets and Groovy templates instead of JSPs. This provides a clean separation of views and logic for developing web applications on Google App Engine using the Groovy programming language.
The document discusses metaprogramming in Ruby and domain specific languages (DSLs). It provides examples of metaprogramming in programs like the Java compiler and Ruby interpreter. It also shows how DSLs are used to define languages for specific domains like musical notes or guitar chords. The presentation introduces metaprogramming and DSL implementation, including changing self, missing constants/methods, and custom operators.
The document describes a Net-OSLC-CM module that was developed for Simple Defects, a command line bug tracker. The module helps implement OSLC-CM clients and provides a standard Perl interface for interacting with change management resources from an OSLC-CM compliant service provider. It includes classes for representing OSLC concepts like catalogs, service providers, and change requests. The module aims to simplify the process of syncing defects between Simple Defects and other bug tracking tools.
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...Brent Salisbury
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach in OpenDaylight. Will post more details in a blog entry at http://networkstatic.net as soon as time permits for those looking for more information.
Cheers,
-Brent
Exploiting JRuby: Building Domain-Specific Languages for the Java Virtual Mac...elliando dias
This document outlines a presentation about creating domain-specific languages (DSLs) for the Java Virtual Machine using JRuby. The presentation introduces DSLs and their benefits, demonstrates example DSLs, discusses techniques for building DSLs in JRuby like operator overloading and dynamic typing, and provides best practices for DSL design. The goal is to teach attendees how to exploit JRuby to build customized languages that simplify complex tasks.
Slides from Talk by Jan Medved on Yang modeling and its support in OpenDaylight meetup
http://www.meetup.com/OpenDaylight-Silicon-Valley/events/212834752
Yang is a data modeling language that is rapidly being adopted to model Netconf, an IETF standardized network management protocol, as well as to model other data interfaces in OpenDaylight. Join us for the talk by expert Jan Medved to learn about Yang and its usage within OpenDaylight.
This document discusses Groovy's capabilities for building domain-specific languages (DSLs). It provides examples of how Groovy allows flexible syntax through features like optional typing, closures, builders, and the meta-object protocol (MOP). The MOP allows intercepting method calls at runtime to change behavior. Groovy is well-suited for DSLs as it can seamlessly integrate DSLs into applications and its compiler supports transformations.
This document provides an overview of Gaelyk, a lightweight Groovy toolkit for developing applications on Google App Engine. Gaelyk builds on Groovy's servlet support and provides enhancements to the Google App Engine Java SDK to simplify development. It allows using Groovy scripts called Groovlets instead of raw servlets and Groovy templates instead of JSPs. This provides a clean separation of views and logic for developing web applications on Google App Engine using the Groovy programming language.
The document discusses metaprogramming in Ruby and domain specific languages (DSLs). It provides examples of metaprogramming in programs like the Java compiler and Ruby interpreter. It also shows how DSLs are used to define languages for specific domains like musical notes or guitar chords. The presentation introduces metaprogramming and DSL implementation, including changing self, missing constants/methods, and custom operators.
The document describes a Net-OSLC-CM module that was developed for Simple Defects, a command line bug tracker. The module helps implement OSLC-CM clients and provides a standard Perl interface for interacting with change management resources from an OSLC-CM compliant service provider. It includes classes for representing OSLC concepts like catalogs, service providers, and change requests. The module aims to simplify the process of syncing defects between Simple Defects and other bug tracking tools.
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...Brent Salisbury
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach in OpenDaylight. Will post more details in a blog entry at http://networkstatic.net as soon as time permits for those looking for more information.
Cheers,
-Brent
The document discusses the history and features of PHP Development Tools (PDT). PDT 1.0 was initially contributed by IBM and Zend in 2007, providing PHP capabilities like code assist, debugging, and navigation views. PDT 2.0 utilizes the Dynamic Languages Toolkit to be lighter and faster, with improved memory management and new features like build path configuration, mark occurrences, and type hierarchy. The document provides an example of extending PDT by creating a plugin to warn of potential cross-site scripting vulnerabilities.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
This document discusses evolving the Java platform to better support dynamic languages running on the Java Virtual Machine (JVM). It describes several languages like Clojure, Groovy and Scala that already run on the JVM. It then outlines features missing from the JVM that would help these languages, such as dynamic invocation, lightweight method handles, and continuations. The document proposes an experimental "DaVinci Machine" to evolve the JVM by implementing these missing features. It uses the example of Ruby implementation JRuby to show current compiler pain points that could be addressed.
Gofer is a scalable stateless proxy architecture for DBI that is transport independent, highly configurable, efficient, well tested, scalable, and simple. It consists of a simple request/response protocol, a DBI proxy driver called DBD::Gofer, a request executor module, pluggable transport modules like HTTP, SSH, and Gearman, and an extensible client configuration mechanism. It aims to minimize round trips and supports connection pooling to improve performance and scalability.
JSX is a strictly-typed object-oriented programming language that is compiled to JavaScript. It aims to provide higher productivity than JavaScript through strong typing while generating code that runs faster than plain JavaScript. Some key points:
- JSX code is compiled to optimized JavaScript using type information for performance gains
- It has classes and functions like Java but compiles to JavaScript
- Goals are higher productivity than JavaScript and applications that run faster and are higher quality
- It avoids problems of other languages that compile to JavaScript like performance penalties
JSX - developing a statically-typed programming language for the WebKazuho Oku
Kazuho Oku presents JSX, a statically-typed programming language that compiles to JavaScript. JSX aims to improve productivity over JavaScript by enabling errors to be caught at compile-time rather than runtime. It also aims to optimize code size and execution speed compared to JavaScript through type information and compiler optimizations. Oku discusses JSX language features like classes and types, benchmarks showing improved performance over JavaScript, and efforts to bind JSX to W3C standards through automatic translation of interface definition languages.
GraalVM can be used as a drop-in replacement for the JDK to run Java programs. It includes the Graal just-in-time compiler which can provide better performance than the default HotSpot compiler. GraalVM also includes the native-image tool which can compile Java bytecode ahead-of-time to native executables without dependencies, improving startup time significantly. This enables using Java for more dynamic workloads like microservices that require fast startup. Reflection and dynamic proxies require additional configuration for native images. Docker images can also be built from native executables to distribute applications.
We are Leading Provider of Project Training in Colleges.We provide training and help students to do project themself.
We help students to learn technology practically.
The document discusses JRuby, a Java implementation of the Ruby programming language. It provides an overview of JRuby and its benefits compared to MRI Ruby, including native threading, Unicode support, performance improvements from just-in-time compilation, better memory management from Java's garbage collection, and easier integration with existing Java libraries and enterprise infrastructure. Examples are given of ThoughtWorks projects like Mingle that use JRuby on Rails to take advantage of these benefits.
The document discusses the JSX Optimizer, which performs optimizations on JavaScript code that JavaScript VMs cannot. It aims to minimize the need for inline caching, pressure on the garbage collector, and maintain the original code structure while optimizing. Some optimizations included are constant folding, inlining functions, and unboxing. Challenges include switching to SSA form and maintaining debuggability of the original code. Benchmark results show a 13.5-28.7% increase in frames per second for the Box2D game engine.
In this session we will take a look at several different methods for building tiered applications. Some of the tiering methodologies include Soap, XML-RPC, RESTful and multiple language architectures. The purpose of this talk will not be to determine which methodology is best, but instead will try to provide an unbiased view of the pros and cons of each.
Launchpad is a Python-based web application with over 350k lines of code and 25k tests. It was developed primarily by Canonical using Zope 3, Twisted, and other libraries. The presentation discusses best practices from Launchpad's development including extensive testing, code reviews, use of branches, and interfaces. It also covers challenges like slow tests and database evolution.
The document discusses integrating a language-agnostic garbage collection toolkit into various programming language runtimes. It describes how the garbage collector components have been decoupled from the J9 JVM and refactored. It also outlines the process for integrating the garbage collector, including implementing a few required glue APIs to provide language-specific information. Examples of integrating the garbage collector into the CSOM (C implementation of Smalltalk) runtime are also provided.
GraalVM can be used as a drop-in replacement for the JDK to run Java programs. It includes the Graal just-in-time compiler which can provide better performance than the default HotSpot compiler. GraalVM also allows ahead-of-time compilation of Java bytecode into native images using SubstrateVM, eliminating the overhead of interpretation and compilation at runtime. These native images have minimal dependencies and fast startup times, making them suitable for containerized microservices and cloud applications.
Zend Server is an enterprise-ready PHP application server that provides features to improve PHP applications' performance, reliability, and manageability. It includes an optimizer to improve application performance, data and page caching, and a job queue. For reliability, it offers application monitoring, code tracing for debugging issues, and security updates from Zend. The administration interface simplifies managing PHP settings and components.
GraalVM is a new polyglot virtual machine that allows running JVM languages as well as other languages like JavaScript, Python, and R. It provides several advantages over traditional JVMs including being a drop-in replacement for OpenJDK that can improve performance, the ability to ahead-of-time compile Java programs into native images for faster startup times, seamless interoperability between supported languages, and common debugging and monitoring interfaces. Key features include running as a replacement JVM, including Graal as an alternative JIT compiler in OpenJDK 11, ahead-of-time compilation to native images, support for additional languages via Truffle, and allowing Java programs to be used as native libraries from other languages.
The document discusses JRuby, which is a Java implementation of the Ruby programming language. JRuby allows Ruby code to leverage Java libraries and infrastructure and run on the Java Virtual Machine. It provides benefits like running the same code on all platforms and leveraging existing Java skills and tools. However, it also has drawbacks like a larger memory footprint compared to other Ruby implementations. The document provides examples of using JRuby for web applications, system integration projects, and describes some organizations that use JRuby in production.
Laird Best Practices Ajax World West2008rajivmordani
The document outlines best practices for delivering framework products that include Ajax features, discussing selecting an open source framework over custom, providing a public client-side API, and enabling client-side event publishing and subscription. It also presents case studies of Oracle products that demonstrate these practices, such as using Dojo or jQuery and providing APIs for WebLogic Portal and Application Express.
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMOwais Zahid
Key to creating world-class solutions lies in the effectivity of cross-team collaboration and lead time. When multiple teams involved in a project, it is critical to take cross-platform and cross-language aspects into account. Introducing GraalVM, a universal virtual machine created to address an issue of teams struggling to collaborate because of varying preference of programming languages.
In this session, we will look at how you can use GraalVM to create polyglot applications with ease. It is a hands-on live coding session where we will look at Ruby, NodeJS & Java interoperability.
A Microsoft representative will give a presentation about Microsoft technologies including ASP.NET on April 8, 2003 at 5:00 PM in Eberly Auditorium at IUP. The presentation is open to both computer and non-computer majors and will include discussions of existing technologies, an ASP.NET demo, an overview of ASP.NET, ADO.NET, and Web Matrix. Food and drinks will be provided after the presentation along with door prizes.
The document discusses the history and features of PHP Development Tools (PDT). PDT 1.0 was initially contributed by IBM and Zend in 2007, providing PHP capabilities like code assist, debugging, and navigation views. PDT 2.0 utilizes the Dynamic Languages Toolkit to be lighter and faster, with improved memory management and new features like build path configuration, mark occurrences, and type hierarchy. The document provides an example of extending PDT by creating a plugin to warn of potential cross-site scripting vulnerabilities.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
This document discusses evolving the Java platform to better support dynamic languages running on the Java Virtual Machine (JVM). It describes several languages like Clojure, Groovy and Scala that already run on the JVM. It then outlines features missing from the JVM that would help these languages, such as dynamic invocation, lightweight method handles, and continuations. The document proposes an experimental "DaVinci Machine" to evolve the JVM by implementing these missing features. It uses the example of Ruby implementation JRuby to show current compiler pain points that could be addressed.
Gofer is a scalable stateless proxy architecture for DBI that is transport independent, highly configurable, efficient, well tested, scalable, and simple. It consists of a simple request/response protocol, a DBI proxy driver called DBD::Gofer, a request executor module, pluggable transport modules like HTTP, SSH, and Gearman, and an extensible client configuration mechanism. It aims to minimize round trips and supports connection pooling to improve performance and scalability.
JSX is a strictly-typed object-oriented programming language that is compiled to JavaScript. It aims to provide higher productivity than JavaScript through strong typing while generating code that runs faster than plain JavaScript. Some key points:
- JSX code is compiled to optimized JavaScript using type information for performance gains
- It has classes and functions like Java but compiles to JavaScript
- Goals are higher productivity than JavaScript and applications that run faster and are higher quality
- It avoids problems of other languages that compile to JavaScript like performance penalties
JSX - developing a statically-typed programming language for the WebKazuho Oku
Kazuho Oku presents JSX, a statically-typed programming language that compiles to JavaScript. JSX aims to improve productivity over JavaScript by enabling errors to be caught at compile-time rather than runtime. It also aims to optimize code size and execution speed compared to JavaScript through type information and compiler optimizations. Oku discusses JSX language features like classes and types, benchmarks showing improved performance over JavaScript, and efforts to bind JSX to W3C standards through automatic translation of interface definition languages.
GraalVM can be used as a drop-in replacement for the JDK to run Java programs. It includes the Graal just-in-time compiler which can provide better performance than the default HotSpot compiler. GraalVM also includes the native-image tool which can compile Java bytecode ahead-of-time to native executables without dependencies, improving startup time significantly. This enables using Java for more dynamic workloads like microservices that require fast startup. Reflection and dynamic proxies require additional configuration for native images. Docker images can also be built from native executables to distribute applications.
We are Leading Provider of Project Training in Colleges.We provide training and help students to do project themself.
We help students to learn technology practically.
The document discusses JRuby, a Java implementation of the Ruby programming language. It provides an overview of JRuby and its benefits compared to MRI Ruby, including native threading, Unicode support, performance improvements from just-in-time compilation, better memory management from Java's garbage collection, and easier integration with existing Java libraries and enterprise infrastructure. Examples are given of ThoughtWorks projects like Mingle that use JRuby on Rails to take advantage of these benefits.
The document discusses the JSX Optimizer, which performs optimizations on JavaScript code that JavaScript VMs cannot. It aims to minimize the need for inline caching, pressure on the garbage collector, and maintain the original code structure while optimizing. Some optimizations included are constant folding, inlining functions, and unboxing. Challenges include switching to SSA form and maintaining debuggability of the original code. Benchmark results show a 13.5-28.7% increase in frames per second for the Box2D game engine.
In this session we will take a look at several different methods for building tiered applications. Some of the tiering methodologies include Soap, XML-RPC, RESTful and multiple language architectures. The purpose of this talk will not be to determine which methodology is best, but instead will try to provide an unbiased view of the pros and cons of each.
Launchpad is a Python-based web application with over 350k lines of code and 25k tests. It was developed primarily by Canonical using Zope 3, Twisted, and other libraries. The presentation discusses best practices from Launchpad's development including extensive testing, code reviews, use of branches, and interfaces. It also covers challenges like slow tests and database evolution.
The document discusses integrating a language-agnostic garbage collection toolkit into various programming language runtimes. It describes how the garbage collector components have been decoupled from the J9 JVM and refactored. It also outlines the process for integrating the garbage collector, including implementing a few required glue APIs to provide language-specific information. Examples of integrating the garbage collector into the CSOM (C implementation of Smalltalk) runtime are also provided.
GraalVM can be used as a drop-in replacement for the JDK to run Java programs. It includes the Graal just-in-time compiler which can provide better performance than the default HotSpot compiler. GraalVM also allows ahead-of-time compilation of Java bytecode into native images using SubstrateVM, eliminating the overhead of interpretation and compilation at runtime. These native images have minimal dependencies and fast startup times, making them suitable for containerized microservices and cloud applications.
Zend Server is an enterprise-ready PHP application server that provides features to improve PHP applications' performance, reliability, and manageability. It includes an optimizer to improve application performance, data and page caching, and a job queue. For reliability, it offers application monitoring, code tracing for debugging issues, and security updates from Zend. The administration interface simplifies managing PHP settings and components.
GraalVM is a new polyglot virtual machine that allows running JVM languages as well as other languages like JavaScript, Python, and R. It provides several advantages over traditional JVMs including being a drop-in replacement for OpenJDK that can improve performance, the ability to ahead-of-time compile Java programs into native images for faster startup times, seamless interoperability between supported languages, and common debugging and monitoring interfaces. Key features include running as a replacement JVM, including Graal as an alternative JIT compiler in OpenJDK 11, ahead-of-time compilation to native images, support for additional languages via Truffle, and allowing Java programs to be used as native libraries from other languages.
The document discusses JRuby, which is a Java implementation of the Ruby programming language. JRuby allows Ruby code to leverage Java libraries and infrastructure and run on the Java Virtual Machine. It provides benefits like running the same code on all platforms and leveraging existing Java skills and tools. However, it also has drawbacks like a larger memory footprint compared to other Ruby implementations. The document provides examples of using JRuby for web applications, system integration projects, and describes some organizations that use JRuby in production.
Laird Best Practices Ajax World West2008rajivmordani
The document outlines best practices for delivering framework products that include Ajax features, discussing selecting an open source framework over custom, providing a public client-side API, and enabling client-side event publishing and subscription. It also presents case studies of Oracle products that demonstrate these practices, such as using Dojo or jQuery and providing APIs for WebLogic Portal and Application Express.
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMOwais Zahid
Key to creating world-class solutions lies in the effectivity of cross-team collaboration and lead time. When multiple teams involved in a project, it is critical to take cross-platform and cross-language aspects into account. Introducing GraalVM, a universal virtual machine created to address an issue of teams struggling to collaborate because of varying preference of programming languages.
In this session, we will look at how you can use GraalVM to create polyglot applications with ease. It is a hands-on live coding session where we will look at Ruby, NodeJS & Java interoperability.
A Microsoft representative will give a presentation about Microsoft technologies including ASP.NET on April 8, 2003 at 5:00 PM in Eberly Auditorium at IUP. The presentation is open to both computer and non-computer majors and will include discussions of existing technologies, an ASP.NET demo, an overview of ASP.NET, ADO.NET, and Web Matrix. Food and drinks will be provided after the presentation along with door prizes.
Pmemkv is an open source, key-value store for persistent memory based on the Persistent Memory Development Kit (PMDK). Written in C and C++, it provides optimized bindings for Java*, Javascript*, and Ruby on Rails*), and includes multiple storage engines for different use cases.
Guillaume Laforge presents on creating domain-specific languages with Groovy. He discusses how DSLs can help bridge communication between developers and subject matter experts by using a more expressive shared language. He provides examples of Groovy's capabilities for building DSLs, including its flexible syntax, optional typing, native constructs, closures, and dynamic metaprogramming features. He also covers integrating DSLs into applications and considerations for designing custom DSLs.
Writing Your Own JSR-Compliant, Domain-Specific Scripting Languageelliando dias
ScriptEngineManager
ScriptEngineManager is the entry point for the JSR-223 API. It allows looking up available scripting languages and creating ScriptEngine instances for those languages. The document discusses using JSR-223 to build a domain-specific language and provides examples of how to structure the language using the JSR-223 API classes.
The document discusses the history of build tools and outlines a roadmap for sbt 1.0 focused on stability and modularization. It introduces sbt-server as a way to centralize build tasks and allow multiple clients to interact with the build. Key points of the sbt-server design include running tasks in a centralized queue, handling reconnects, using a versioned protocol for communication, and supporting background jobs and input. The document also discusses bringing existing sbt plugins onto sbt-server without breaking functionality.
An Infrastructure for Team Development - Gaylord Aulkedpc
This document discusses infrastructure and processes for team-based PHP development. It recommends using source control, continuous integration, automated testing, and packaging/deployment tools. Local development involves each developer working on their own copy, with changes committed to a shared repository. Development sandboxes provide isolated environments. Changes are merged and packaged for deployment.
How and Why GraalVM is quickly becoming relevant for developers (ACEs@home - ...Lucas Jellema
Starting a Java application as fast as any executable with a memory footprint rivaling the most lightweight runtime engines is quickly becoming a reality, through Graal VM and ahead of time compilation. This in turn is a major boost for using Java for microservice and serverless scenarios. The second major pillar of GraalVM is its polyglot capability: it can run code in several languages - JVM and non-JVM such as JavaScript/ES, Python, Ruby, R or even your own DSL. More importantly: GraalVM enables code running in one language to interoperate with code in another language. GraalVM supports many and increasingly more forms of interoperability. This session introduces GraalVM, its main capabilities and its practical applicability - now and in the near future. There are demonstrations of ahead of time compilation and runtime interoperability of various non-JVM languages with Java.
Nuxeo JavaOne 2007 presentation (in original format)Stefane Fermigier
This session describes the architecture and implementation of an embeddable, extensible enterprise content management core for Java EE and simpler platforms. The presentation starts by describing the general architectural concepts used as building blocks:
• A schema and document model, reusing XML schemas and making good use of XML namespaces, where document types are built with several facets
• A repository model, using hierarchy and versioning, with the Content Repository API for Java (JSR 170) being one of the possible back ends
• A query model, based on the Java Persistence query language (JSR 220) and reusing the path-based concepts from Java Content Repositories (JCR)
• A fine-grained security model, compatible with WebDAV concepts and designed to provide flexible security policies
• An event model using synchronous and asynchronous events, allowing bridging through Java Message Service (JMS) or other systems to other event-enabled frameworks
• A directory model, representing access to external data sources using the same concepts as for documents but taking advantage of the specificities of the data back ends
Suitable abstraction layers are put in place to provide the required level of flexibility. One of the main architectural tasks is to find commonalities in all the systems used (or whose use is planned in the future) so framework users need to learn and use a minimal number of concepts. The result is a set of concepts that are fundamental to enterprise document management and are usable through direct Java technology-based APIs, Java EE APIs, or SOA. The presentation shows, for each of the main components, which challenges have been met and overcome when building a framework in which all components are designed to be improved and replaced by different implementations without sacrificing backward compatibility with existing ones.
The described implementation, Nuxeo Core, can be embedded in a basic Java technology-based framework based on OSGi (such as Eclipse) or in one based on Java EE, according to the needs of the application using it. This means that the core has to function without relying on Java EE services but also has to take advantage of them when they are available (providing clustering, messaging, caching, remoting, and advanced deployment).
Road to sbt 1.0: Paved with server (2015 Amsterdam)Eugene Yokota
The document provides a history of build tools and a roadmap for sbt 1.0. It discusses modularizing sbt into components to improve stability and introduce an sbt server for centralized build execution. The sbt server design allows clients to connect as events, handle input, and run background jobs. Existing plugins can try the sbt server APIs without breaking functionality. The roadmap includes improving interaction, meta-projects, and killing bad states to complete the sbt server.
This document summarizes and compares different JavaScript frameworks. It discusses the pros and cons of JavaScript, including that it is weakly typed, supports both imperative and functional paradigms, and has no packaging. It also covers reasons to use a framework, such as leveraging community support. Two main types of frameworks are described: Swiss army knife frameworks that provide utilities and widget-based frameworks that focus on components and effects. Popular examples of each type are listed and what problems they aim to solve. Finally, criteria for evaluating frameworks are outlined.
- The document is a presentation on Ajax given by Alex Russell that covers what Ajax is, how it works, when it should and should not be used, tools for Ajax development, debugging techniques, and the future of Ajax and the open web.
- It includes examples of building an auto-save feature with Ajax using plain JavaScript, Prototype, and Dojo and discusses language features of JavaScript.
- The presentation aims to provide enough knowledge and code examples to get started with Ajax development while addressing open web standards and browser compatibility.
Building DSLs On CLR and DLR (Microsoft.NET)Vitaly Baum
The document describes a domain specific language (DSL) for specifying tests of a MiniBar simulation using the Specter testing framework in C#. It provides an example context and specifications to test that drinking a beer does not throw an exception, that drinking 5 beers results in a $-5 balance, and that drinking more than 10 beers throws an exception indicating the user is drunk. The specifications are translated to NUnit test methods with asserts to test the MiniBar behavior.
Alessandro Salvatico - Sviluppare J2EE con INGRESBetter Software
Ingres is an open source, enterprise-class relational database management system. It supports major programming languages like Java, C++, and Python. Developers can build J2EE applications that connect to Ingres using various approaches including JDBC/ODBC, Hibernate, and language-specific drivers. Ingres provides tools like Eclipse plugins for visual database modeling and development. It also offers integrated bundles of Ingres database with application servers like JBoss for easier application development.
The document discusses whether JavaScript can be elegant. It notes that new JavaScript frameworks aim to simplify complex browser-side programming. It also includes quotes from different people discussing how enterprises view JavaScript developers and whether JavaScript needs to be replaced.
Similar to Language-Oriented Programming and Language Workbenches: Building Domain Languages Atop Java Technology (20)
ClojureScript allows developers to use the Clojure programming language to build applications that compile to JavaScript. This enables Clojure code to run in environments where JavaScript is supported, like web browsers and mobile apps. ClojureScript leverages the Google Closure compiler and library to provide whole program optimization of Clojure code compiling to JavaScript.
Why you should be excited about ClojureScriptelliando dias
ClojureScript allows Clojure code to compile to JavaScript. Created by Rich Hickey and friends, it provides optimizations for performance while maintaining readability and abstraction. As a Lisp for JavaScript, ClojureScript controls complexity on the web and benefits from JavaScript's status as a compilation target for many languages.
Functional Programming with Immutable Data Structureselliando dias
1. The document discusses the advantages of functional programming with immutable data structures for multi-threaded environments. It argues that shared mutable data and variables are fundamentally flawed concepts that can lead to bugs, while immutable data avoids these issues.
2. It presents Clojure as a functional programming language that uses immutable persistent data structures and software transactional memory to allow for safe, lock-free concurrency. This approach allows readers and writers to operate concurrently without blocking each other.
3. The document makes the case that Lisp parentheses in function calls uniquely define the tree structure of computations and enable powerful macro systems, homoiconicity, and structural editing of code.
O documento lista e descreve as principais partes de um contêiner de carga seco, incluindo o painel frontal, laterais, traseira, teto, piso e estrutura inferior. Muitos componentes como painéis laterais, travessas do teto e fundo são numerados de acordo com sua localização. As portas traseiras contêm quadros, painéis, dobradiças e barras de fechamento.
O documento discute a história da geometria projetiva, desde Euclides até seu uso em computação gráfica. Aborda figuras-chave como Pascal, que foi pioneiro na área, e como a perspectiva foi aplicada nas artes ao longo dos séculos.
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
This document discusses the benefits of polyglot and poly-paradigm programming approaches for building more agile applications. It describes how using multiple languages and programming paradigms can optimize both performance and developer productivity. Specifically, it suggests that statically-typed compiled languages be used for core application components while dynamically-typed scripting languages connect and customize these components. This approach allows optimizing areas that require speed/efficiency separately from those requiring flexibility. The document also advocates aspects and functional programming to address cross-cutting concerns and concurrency challenges that arise in modern applications.
This document discusses JavaScript libraries and frameworks. It provides an overview of some popular options like jQuery, Prototype, Dojo, MooTools, and YUI. It explains why developers use libraries, such as for faster development, cross-browser compatibility, and animation capabilities. The document also discusses how libraries resemble CSS and use selector syntax. Basic examples are provided to demonstrate common tasks like hover effects and row striping. Factors for choosing a library are outlined like maturity, documentation, community, and licensing. The document concludes by explaining how to obtain library code from project websites or Google's AJAX Libraries API.
How to Make an Eight Bit Computer and Save the World!elliando dias
This document summarizes a talk given to introduce an open source 8-bit computer project called the Humane Reader. The talk outlines the goals of providing a cheap e-book reader and computing platform using open source tools. It describes the hardware design which uses an AVR microcontroller and interfaces like video output, SD card, and USB. The talk also covers using open source tools for development and sourcing low-cost fabrication and assembly. The overall goals are to create an inexpensive device that can provide educational resources in developing areas.
Ragel is a parser generator that compiles to various host languages including Ruby. It is useful for parsing protocols and data formats and provides faster parsing than regular expressions or full LALR parsers. Several Ruby projects like Mongrel and Hpricot use Ragel for tasks like HTTP request parsing and HTML parsing. When using Ragel with Ruby, it can be compiled to Ruby code directly, which is slow, or a C extension can be written for better performance. The C extension extracts the parsed data from Ragel and makes it available to Ruby.
A Practical Guide to Connecting Hardware to the Webelliando dias
This document provides an overview of connecting hardware devices to the web using the Arduino platform. It discusses trends in electronics and computing that make this easier, describes the Arduino hardware and software, and covers various connection methods including directly to a computer, via wireless modems, Ethernet shields, and services like Pachube that allow sharing sensor data over the internet. The document aims to demonstrate how Arduinos can communicate with other devices and be used to build interactive systems.
O documento introduz o Arduino, uma plataforma de desenvolvimento open-source. Discute as características e componentes do Arduino, incluindo microcontroladores, software e exemplos de código. Também fornece instruções básicas sobre como programar o Arduino usando linguagem C.
O documento apresenta um mini-curso introdutório sobre Arduino, abordando o que é a plataforma Arduino, como é estruturado seu hardware, como programá-lo, exemplos básicos de código e aplicações possíveis como controle residencial e robótica.
The document discusses various functions for working with datasets in the Incanter library for Clojure. It describes how to create, read, save, select rows and columns from, and sort datasets. Functions are presented for building datasets from sequences, reading datasets from files and URLs, saving datasets to files and databases, selecting single or multiple columns, and filtering rows based on conditions. The document also provides an overview of the Incanter library and its various namespaces for statistics, charts, and other functionality.
Rango is a lightweight Ruby web framework built on Rack that aims to be more robust than Sinatra but smaller than Rails or Merb. It is inspired by Django and Merb, uses Ruby 1.9, and supports features like code reloading, Bundler, routing, rendering, and HTTP error handling. The documentation provides examples and details on using Rango.
Fab.in.a.box - Fab Academy: Machine Designelliando dias
This document describes the design of a multifab machine called MTM. It includes descriptions of the XY stage and Z axis drive mechanisms, as well as the tool heads and network used to control the machine. Key aspects of the design addressed include the stepper motor selection, drive electronics, motion control firmware, and use of a virtual machine environment and circular buffer to enable distributed control of the machine. Strengths of the design include low inertia enabling high acceleration, while weaknesses include low basic resolution and stiffness unsuitable for heavy milling.
The Digital Revolution: Machines that makeselliando dias
The document discusses the results of a study on the effects of a new drug on memory and cognitive function in older adults. The double-blind study involved giving either the new drug or a placebo to 100 volunteers aged 65-80 over a 6 month period. Testing showed those receiving the drug experienced statistically significant improvements in short-term memory retention and processing speed compared to the placebo group.
The document discusses using Clojure for Hadoop programming. Clojure is a dynamic functional programming language that runs on the Java Virtual Machine. The document provides an overview of Clojure and how its features like immutability and concurrency make it well-suited for Hadoop. It then shows examples of implementing Hadoop MapReduce jobs using Clojure by defining mapper and reducer functions.
This document provides an overview of Hadoop, including:
1) Hadoop solves the problems of analyzing massively large datasets by distributing data storage and analysis across multiple machines to tolerate node failure.
2) Hadoop uses HDFS for distributed data storage, which shards massive files across data nodes with replication for fault tolerance, and MapReduce for distributed data analysis by sending code to the data.
3) The document demonstrates MapReduce concepts like map, reduce, and their composition with an example job.
Hadoop and Hive Development at Facebookelliando dias
Facebook generates large amounts of user data daily from activities like status updates, photo uploads, and shared content. This data is stored in Hadoop using Hive for analytics. Some key facts:
- Facebook adds 4TB of new compressed data daily to its Hadoop cluster.
- The cluster has 4800 cores and 5.5PB of storage across 12TB nodes.
- Hive is used for over 7500 jobs daily and by around 200 engineers/analysts monthly.
- Performance improvements to Hive include lazy deserialization, map-side aggregation, and joins.
Multi-core Parallelization in Clojure - a Case Studyelliando dias
The document describes a case study on using Clojure for multi-core parallelization of the K-means clustering algorithm. It provides background on parallel programming concepts, an introduction to Clojure, and details on how the authors implemented a parallel K-means algorithm in Clojure using agents and software transactional memory. They present results showing speedups from parallelization and accuracy comparable to R's implementation on both synthetic and real-world datasets.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyScyllaDB
Freshworks creates AI-boosted business software that helps employees work more efficiently and effectively. Managing data across multiple RDBMS and NoSQL databases was already a challenge at their current scale. To prepare for 10X growth, they knew it was time to rethink their database strategy. Learn how they architected a solution that would simplify scaling while keeping costs under control.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsDianaGray10
Join us to learn how UiPath Apps can directly and easily interact with prebuilt connectors via Integration Service--including Salesforce, ServiceNow, Open GenAI, and more.
The best part is you can achieve this without building a custom workflow! Say goodbye to the hassle of using separate automations to call APIs. By seamlessly integrating within App Studio, you can now easily streamline your workflow, while gaining direct access to our Connector Catalog of popular applications.
We’ll discuss and demo the benefits of UiPath Apps and connectors including:
Creating a compelling user experience for any software, without the limitations of APIs.
Accelerating the app creation process, saving time and effort
Enjoying high-performance CRUD (create, read, update, delete) operations, for
seamless data management.
Speakers:
Russell Alfeche, Technology Leader, RPA at qBotic and UiPath MVP
Charlie Greenberg, host
High performance Serverless Java on AWS- GoTo Amsterdam 2024Vadym Kazulkin
Java is for many years one of the most popular programming languages, but it used to have hard times in the Serverless community. Java is known for its high cold start times and high memory footprint, comparing to other programming languages like Node.js and Python. In this talk I'll look at the general best practices and techniques we can use to decrease memory consumption, cold start times for Java Serverless development on AWS including GraalVM (Native Image) and AWS own offering SnapStart based on Firecracker microVM snapshot and restore and CRaC (Coordinated Restore at Checkpoint) runtime hooks. I'll also provide a lot of benchmarking on Lambda functions trying out various deployment package sizes, Lambda memory settings, Java compilation options and HTTP (a)synchronous clients and measure their impact on cold and warm start times.
This talk will cover ScyllaDB Architecture from the cluster-level view and zoom in on data distribution and internal node architecture. In the process, we will learn the secret sauce used to get ScyllaDB's high availability and superior performance. We will also touch on the upcoming changes to ScyllaDB architecture, moving to strongly consistent metadata and tablets.
"Scaling RAG Applications to serve millions of users", Kevin GoedeckeFwdays
How we managed to grow and scale a RAG application from zero to thousands of users in 7 months. Lessons from technical challenges around managing high load for LLMs, RAGs and Vector databases.
Conversational agents, or chatbots, are increasingly used to access all sorts of services using natural language. While open-domain chatbots - like ChatGPT - can converse on any topic, task-oriented chatbots - the focus of this paper - are designed for specific tasks, like booking a flight, obtaining customer support, or setting an appointment. Like any other software, task-oriented chatbots need to be properly tested, usually by defining and executing test scenarios (i.e., sequences of user-chatbot interactions). However, there is currently a lack of methods to quantify the completeness and strength of such test scenarios, which can lead to low-quality tests, and hence to buggy chatbots.
To fill this gap, we propose adapting mutation testing (MuT) for task-oriented chatbots. To this end, we introduce a set of mutation operators that emulate faults in chatbot designs, an architecture that enables MuT on chatbots built using heterogeneous technologies, and a practical realisation as an Eclipse plugin. Moreover, we evaluate the applicability, effectiveness and efficiency of our approach on open-source chatbots, with promising results.
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving
Manufacturing custom quality metal nameplates and badges involves several standard operations. Processes include sheet prep, lithography, screening, coating, punch press and inspection. All decoration is completed in the flat sheet with adhesive and tooling operations following. The possibilities for creating unique durable nameplates are endless. How will you create your brand identity? We can help!
What is an RPA CoE? Session 1 – CoE VisionDianaGray10
In the first session, we will review the organization's vision and how this has an impact on the COE Structure.
Topics covered:
• The role of a steering committee
• How do the organization’s priorities determine CoE Structure?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
Language-Oriented Programming and Language Workbenches: Building Domain Languages Atop Java Technology
1. ThoughtWorks
Language-Oriented Programming
and Language Workbenches:
Building Domain Languages
Atop Java™ Technology
Neal Ford
ThoughtWorker/Meme Wrangler
ThoughtWorks
www.thoughtworks.com
Session TS-1589
2007 JavaOneSM Conference | Session TS-1589 |
2. What This Session Covers
• Motivation
• Internal vs. external DSLs
• Building internal DSLs in
• Java technology
• Groovy
• Ruby (via JRuby)
• Building external DSLs
• DSL best practices
2007 JavaOneSM Conference | Session TS-1589 | 2
3. Questions
• Why is there so much XML mixed in with my
Java code?
• Why do we need things like aspects?
• Why won’t everyone shut up already about
Ruby on Rails?
• Is there an evolutionary step beyond object-
oriented programming?
2007 JavaOneSM Conference | Session TS-1589 | 3
4. Modeling the World With Trees
2007 JavaOneSM Conference | Session TS-1589 | 4
5. Modeling the Real World
2007 JavaOneSM Conference | Session TS-1589 | 5
6. Changing Abstraction Styles
• Layers of abstraction using language
• Not trees
• Trees and hierarchies still exist
• Underneath a stronger abstraction layer
• Objects, aspects, generics, et al become the
building blocks for DSLs
• Allows developers to work at a higher level
of abstraction
• Declarative vs. imperative programming
2007 JavaOneSM Conference | Session TS-1589 | 6
7. Why Use DSLs for Abstraction?
• “Iced decaf triple grande vanilla skim with
whip latte”
• “Scattered, smothered, covered”
• The Waffle House Hash Brown language has 8
keywords (all inflected verbs)
• Scattered, smothered, covered, chunked, topped,
diced, peppered, and capped
• “Route 66, swinging, easy on the chorus, extra
solo at the coda, and bump at the end”
• “OMFG D00d Bob is t3h UBER 1337
R0XX0RZ LOL”
2007 JavaOneSM Conference | Session TS-1589 | 7
8. Including Your Business
• Even if you are a Java technology ace
• You still have to learn the DSL for your
business on day 1
• This is the hardest part of your job
2007 JavaOneSM Conference | Session TS-1589 | 8
10. Nomenclature
• Coined by Martin Fowler
• Domain-specific language
• A limited form of computer language designed for
a specific class of problems
• Language-oriented programming
• The general style of development which operates
about the idea of building software around a set of
domain specific languages
2007 JavaOneSM Conference | Session TS-1589 | 10
11. DSLs vs. APIs
• An API has an explicit context
Coffee latte = new Coffee(Size.VENTI);
latte.setFatContent(FatContent.NON_FAT);
latte.setWhip(Whip.NONE);
latte.setFoam(Foam.NONE);
latte.setTemperature(Temp.EXTRA_HOT);
latte.setStrength(5);
2007 JavaOneSM Conference | Session TS-1589 | 11
12. DSLs vs. APIs
• DSLs have an implicit context
• Consider the real-world examples
• The context is never mentioned
• Once a context is established, repeating it over and
over is just noise
Venti half-caf, non-fat, extra hot, no
foam, no whip latte
2007 JavaOneSM Conference | Session TS-1589 | 12
13. Internal vs. External DSLs
• Internal DSLs sit atop your base language
• Must follow the syntax rules of the base language
• Why Groovy and Ruby make better bases
• External DSLs
• Create a lexer and parser
• Can take on any syntax you like
• Let your imagination be your guide!
• Hard to create…
2007 JavaOneSM Conference | Session TS-1589 | 13
14. Fluent Interface
• Creating a readable model
• Convert APIs to English-like sentences
• Slightly harder to write
• Much easier to read
2007 JavaOneSM Conference | Session TS-1589 | 14
15. Car API
Car car = new CarImpl();
MarketingDescription desc = new
MarketingDescriptionImpl();
desc.setType(quot;Boxquot;);
desc.setSubType(quot;Insulatedquot;);
desc.setAttribute(quot;lengthquot;, quot;50.5quot;);
desc.setAttribute(quot;ladderquot;, quot;yesquot;);
desc.setAttribute(quot;lining typequot;, quot;corkquot;);
car.setDescription(desc);
2007 JavaOneSM Conference | Session TS-1589 | 15
16. Car Fluent Interface
Car car = new CarImpl().withMarketingDescriptionOf(
new MarketingDescriptionImpl(quot;Boxquot;, quot;Insulated”).
andAttributeOf(quot;lengthquot;, quot;50.5quot;).
andIncludesA(quot;ladderquot;).
andAttributeOf(quot;lining typequot;, quot;corkquot;));
2007 JavaOneSM Conference | Session TS-1589 | 16
18. Fluent Interface: Hamcrest
• Hamcrest is an open source library from Google
that creates fluent interfaces around JUnit
matchers
assertThat(theBiscuit, equalTo(myBiscuit));
assertThat(theBiscuit, is(equalTo(myBiscuit)));
assertThat(theBiscuit, is(myBiscuit));
2007 JavaOneSM Conference | Session TS-1589 | 18
21. Example: Logging Configuration
• Logger setup is ugly
• Very API-ish
• Uses
• A properties file
• Code
• An XML file
• Demo
• LoggingConfiguration.java
2007 JavaOneSM Conference | Session TS-1589 | 21
22. Fluent Interface: Wrapping iBatis
• Humane interfaces improve the readability
of any code
• You can wrap existing APIs in fluent interfaces
• Example
• iBatis is an open source O/R mapping tool
• It drips of API style of coding
• Wrapping iBatis access in a fluent interface
• Demo
• EventPersisterImpl.java
2007 JavaOneSM Conference | Session TS-1589 | 22
23. Java Technology: A Calendar DSL
• Goal
• Create a calendar application in Java technology
using DSL techniques
• Primarily uses fluent interface
• Demo
• Appointment.java
• AppointmentCalendar.java
• CalendarDemo.java
2007 JavaOneSM Conference | Session TS-1589 | 23
25. Internal DSLs in Groovy
• Groovy makes a better base for DSLs
• Open classes via categories
• Closures
• Looser syntax rules
• Dynamic typing
2007 JavaOneSM Conference | Session TS-1589 | 25
26. Building Blocks: Closures
• Closures mimic scope capturing
method pointers
• Like a method, a closure defines a scope
• Can still reference variables from the
enclosing scope
• Accepts parameters
• Allows “with” semantics with categories
• In a DSL, provides containership semantics
2007 JavaOneSM Conference | Session TS-1589 | 26
27. Building Blocks: Open Classes
• Open Classes via categories
• Groovy allows you to attach methods to an
existing class
• Either Groovy or Java Development Kit (JDK™)
• Yes, you can add methods to String
• Categories are classes with static methods
• Each method’s first parameter is self
• Fake object-orientation
• Category demo = Adding methods to String
2007 JavaOneSM Conference | Session TS-1589 | 27
28. Time DSL in Groovy
• The goal: create a fluent interface around time
spans and calendars
• Target syntax
2.days.fromToday.at(4.pm)
• Returns a calendar for that date and time
• Demo
• IntegerWithTimeSupport.groovy
• CalendarDsl.groovy
• TestTime.groovy
• CalendarDslDemo.groovy
2007 JavaOneSM Conference | Session TS-1589 | 28
30. Builders in Groovy
• Builders make it much easier to build
structures
• XML documents
• Swing user interfaces
• Built using a fluent interface
• Demo
• Generating XML schema and POJO from
a database schema
2007 JavaOneSM Conference | Session TS-1589 | 30
33. Ruby
• Ruby allows you to take DSL writing
much further
• Ruby features that enable DSLs
• True open classes
• Closures
• Really flexible syntax rules
2007 JavaOneSM Conference | Session TS-1589 | 33
34. Time DSL in Ruby
• Goal
• Support time ranges in Ruby
• Demo
• time_dsl.rb
• time_dsl_test.rb
2007 JavaOneSM Conference | Session TS-1589 | 34
35. Ruby Calendar
• Our calendar example in Ruby
• Demo
• calendar_fluent.rb
• Functionally the same as the Groovy one
• Cleaner syntax
• Less cruft
• True open classes
2007 JavaOneSM Conference | Session TS-1589 | 35
37. Language Workbenches
• A language workbench is a tool that supports
Language oriented programming
• Today’s language workbenches
• Intentional Software (developed by Simonyi)
• Software factories (developed by Microsoft)
• Meta Programming System (developed by
JetBrains)
2007 JavaOneSM Conference | Session TS-1589 | 37
39. “Post-IntelliJ” IDEs
• First tool that allowed you to edit against
the abstract syntax tree instead of text
• How refactoring and other intelligent
support works
2007 JavaOneSM Conference | Session TS-1589 | 39
41. Language Workbenches
• Editable representation is a projection of the
abstract representation
• Abstract representation has to be comfortable
with errors and ambiguities
2007 JavaOneSM Conference | Session TS-1589 | 41
44. Start with the End
• When using a flexible base language,
envision the perfect result
• The Rake napkin
2007 JavaOneSM Conference | Session TS-1589 | 44
45. Test, Test, Test!
• Writing the DSL is the tricky part
• Using it should be easy
• Otherwise you’ve made some mistakes
• Test all the small parts
2007 JavaOneSM Conference | Session TS-1589 | 45
46. The Problem Domain
• Keep it as cohesive as possible
• Don’t try to write the entire universe in your DSL
• Better off using a bunch of very specific DSLs
• JetBrains and the way they are using MPS
2007 JavaOneSM Conference | Session TS-1589 | 46
47. DSLs
• A huge competitive advantage
• All your code is abstracted at the problem domain
• Harder to write, easier to maintain
• Show your code to your business analysts for
verification
2007 JavaOneSM Conference | Session TS-1589 | 47
48. Questions?
Samples and slides at www.nealford.com
Neal Ford
www.nealford.com
nford@thoughtworks.com
memeagora.blogspot.com
This work is licensed under a Creative Commons
Attribution-ShareAlike 2.5 License:
http://creativecommons.org/licenses/by-sa/2.5/
2007 JavaOneSM Conference | Session TS-1589 |