This document provides an overview of Groovy and its relationship to Java. It discusses Groovy's history and genesis as a dynamic language for the Java Virtual Machine. The document covers installing Groovy and demonstrates some key features like typing, objects, looping, regular expressions, and closures. It also discusses Grails, Groovy's web framework, and how Grails applications can now be hosted on Google App Engine.
Goroutines are amazing - They work across multiple cores and spawn multitude of threads. While we all love to use the Goroutines, I feel not much time has been spent in explaining upon what concepts they are built - Green Threads & Coroutines. This talk is an attempt to bridge that gap by discussing the above mentioned topics in great detail. The talk will cover Lifecycle of a Go binary GIL (or lack thereof), Green Threads, event loops and Coroutines as well as goroutine gotchas
This document outlines an agenda for a session on the Go programming language. It covers Go's history and development, grammar and syntax, concurrency features using CSP, the standard library and toolchain, interfacing Go with C, popular production and open source projects using Go, and reference materials. The session aims to provide an overview of Go's key features and how it is used in practice.
Go is a programming language created by Google that aims to be a simple, efficient, and concurrent language. The document provides an overview of the history and features of Go, including its support for garbage collection, concurrency, and ease of programming. Examples are given demonstrating how to write Go code, use interfaces and channels for concurrency, and connect to MongoDB. The document also lists several companies that use Go in production applications.
Jython is a Python interpreter implemented in Java. It allows Python code to integrate with Java by compiling Python code to Java bytecodes, making all Java classes immediately available to Python code. This allows Python to call Java code and Java to call Python, enabling flexible scripting of Java applications and experimentation in an interactive Java environment.
The document discusses why the Go programming language is gaining popularity and why it is well-suited for cloud and microservices environments. Go provides efficient concurrency through goroutines and channels, which makes it productive for building scalable distributed systems. Its simple installation process and tooling also improve developer productivity. The document predicts that Go usage will continue growing as it becomes more widely adopted for cloud applications.
PyPy is a Python implementation that uses a just-in-time (JIT) compiler. It is written in RPython, a restricted subset of Python, and uses a translation framework to generate C code from RPython programs. This allows PyPy to run programs faster than the standard CPython implementation while also supporting features like lazy evaluation, pluggable object spaces, and stackless concurrency.
The document discusses implementing dynamic programming languages in virtual machines. It argues against directly writing virtual machines in low-level languages like C, which can limit flexibility, maintainability and performance. Instead, it advocates writing interpreters in high-level languages and using meta-programming techniques to automatically generate virtual machines from these interpreters through translation. This approach aims to achieve flexibility, simplicity and performance together for language implementations.
The core idea of PyPy is to produce a flexible and fast implementation of the Python programming language. The talk will cover the interpreter, translator and jit parts of the code and their relationships and the fundamental ways in which PyPy differs from other virtual machine implementations.
The document discusses the Go programming language and why it was created. It provides several key points:
- Go was created over a decade since a new major systems language emerged, and the computing landscape has changed significantly in areas like software development speed, dependency management, type systems, garbage collection, and parallelism.
- Go aims to address these changes with a compiled, garbage-collected language that provides fast compilation, easy dependency analysis, lightweight static types, built-in support for concurrency and communication on multicore systems.
- Some of Go's guiding principles in design were to reduce typing, clutter, and complexity while avoiding forward declarations and header files everything is declared once without type hierarchies.
Lets Go - An introduction to Google's Go Programming Language Ganesh Samarthyam
?
This document introduces the Go programming language, which was announced by Google in 2009. It summarizes Go's key features, including being a concurrent, garbage-collected systems programming language. It also provides instructions on installing Go and a simple "Hello World" program example. The document argues that Go has substantial features for systems programming in today's networked, multi-core world.
Using Entity Framework's New POCO Features: Part 1, by Julie LermanJulie Lerman
?
EF4, the new version of Entity Framework in .NET 4.0, now supports agile development with the ability to use POCO (Plain Old CLR Objects) classes with EF. Now you can use your own classes without having to bind them to the Entity Framework APIs, yet still benefit from the querying, change tracking and updates that EF provides. One flavor of POCO is "in the box" and uses a model that you define. An extension to EF will also provide Code Only development where you will not even be required to build a model. This session will show you how to integrate your classes into the Entity Framework. See Part 2 to learn how to get the full benefit of this with unit testing and more.
Go is a programming language created by Google to help solve problems with large software and hardware systems. It was designed to facilitate development of large codebases by many engineers. Some key problems it aimed to address were slowness, clumsiness and lack of productivity in other languages like C++. Go provides features like garbage collection, concurrency with goroutines and channels, and a standard library, while remaining simple and compiled. It grew from a small project at Google into an open source language adopted by many organizations.
Introduction to GoLang by Amal Mohan N. This presentation is an introduction to GoLang - it's history, features, syntax, importance etc.
concurrency, go-routines, golang, google, gopher, introduction, programming
Go is a new systems programming language from Google. Go has many interesting features such as 'communication channels' that makes it suitable for use in multi-core machines, and network programming. With Ken Thompson (of Unix fame) as one of its designers, Go has elegant and minimal design that is appealing to most programmers. This talk gives a technical introduction to Go that is of interest to anyone working in system software.
[Presentation I have in 2010 - I haven't updated it with recent changes to the Go language]
The document provides an overview of the Go programming language. It discusses that Go was designed by Google to help solve their large-scale programming problems. It then summarizes Go's history, purpose, features, and syntax elements such as data types, operators, functions, concurrency using goroutines and channels. The document also provides examples of Go code and concludes that Go has emerged as a popular language for cloud infrastructure due to its simplicity, concurrency, and performance.
ATO 2014 - So You Think You Know 'Go'? The Go Programming LanguageJohn Potocny
?
The document is a presentation about the Go programming language. It provides a brief history of Go, noting it was created in 2007 by Google employees and became open source in 2009. It discusses some of Go's key features like being statically typed, garbage collected, and having built-in concurrency support. The presentation aims to show examples of writing simple programs in Go.
The Go programming language - Intro by MyLittleAdventuremylittleadventure
?
The document discusses the Go programming language, providing information on its history, creators at Google, design goals, key characteristics like being statically typed and concurrent, benchmarking results, major companies using Go, and examples of using Go for web scraping and servers. It outlines pros and cons of Go and resources for learning more.
Folio3 is a development partner that focuses on building custom enterprise, mobile, and social media applications. It was founded in 2005 and has over 200 employees across offices in the US, Canada, Bulgaria, and Pakistan. Go-Lang is a statically-typed, compiled programming language designed for building scalable network applications and facilitating concurrency. Key features include structs instead of classes, built-in concurrency through goroutines and channels, and static compilation to binary files.
Python is an interpreted, high-level programming language created by Guido van Rossum in 1991. It is used to develop popular apps at companies like YouTube, Instagram, Netflix and Google. Python code is easy to write due to its simple syntax and it is open source. Some key features are that it is a scripting language, supports multiple programming paradigms, runs code line-by-line, and is case sensitive.
Go is a compiled, garbage-collected programming language that supports concurrent programming through lightweight threads called goroutines and communication between goroutines via channels. It aims to provide both high-level and low-level programming with a clean syntax and minimal features. The document discusses Go's concurrency model, syntax, goroutines, channels, and use cases including cloud infrastructure, mobile development, and audio synthesis.
Go is a statically typed, compiled programming language designed for building simple, reliable, and efficient software. Some key points:
- Go is natively compiled and uses static typing with type inference. It is targeted for system programming and server-side applications.
- It was created at Google in 2007 to address issues with other languages like dependency management, garbage collection, and support for concurrency.
- Popular users include Google, Docker, Dropbox, SoundCloud, and MongoDB. Domains it is used include distributed systems, cloud, web development, and systems programming.
- Key features include built-in concurrency and networking support, a rich standard library, and fast compilation. It aims to be
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...Mickael Istria
?
From https://www.eclipsecon.org/france2018/session/ignite-talks
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE relying on LSP, TextMate and CLI
C# and Rust case studies
Pyston is a JIT-based implementation of Python 2.7 built using LLVM. It compiles Python code to LLVM IR for optimization and execution via LLVM's JIT engine. Current benchmarks show recursion sees benefits from LLVM JIT, while loops do not, and the implementation is missing major parts of the Python language. Future versions aim to add exceptions, classes, arguments and more.
A short talk I gave to R&D department in Digimax, Inc. It's dedicated to briefly describe how to parallelize your routine work in animation industry by making use of some tools.
This document provides an overview of the Python programming language. It discusses what Python is, how it compares to other languages like Java and C++, common uses of Python, job opportunities in Python, and the future of Python. It also advertises training in Python offered by Evolet Technologies, which aims to teach students to use Python professionally and gain expertise through hands-on learning and practice problems.
Go is a general-purpose, compiled language that is strongly typed, garbage-collected, and has explicit support for concurrent programming through goroutines and channels. Programs in Go are constructed using packages and the language provides standard types while also allowing functions to return multiple values.
Groovy is an open source dynamic language that runs on the Java Virtual Machine. It is a superset of Java with additional features like closures, metaprogramming and a simpler syntax. Groovy code compiles to Java bytecode and interoperates seamlessly with Java. Many companies and frameworks use Groovy, including Mule ESB, ServiceMix ESB, Spring, Grails and LinkedIn.
Groovy is an open source dynamic language that runs on the Java Virtual Machine. It is a superset of Java with additional features like closures, metaprogramming and a more concise syntax. Groovy code compiles to Java bytecode and can interoperate seamlessly with Java. Many companies and frameworks use Groovy, including Mule ESB, ServiceMix ESB, Spring and Grails.
The document discusses the Go programming language and why it was created. It provides several key points:
- Go was created over a decade since a new major systems language emerged, and the computing landscape has changed significantly in areas like software development speed, dependency management, type systems, garbage collection, and parallelism.
- Go aims to address these changes with a compiled, garbage-collected language that provides fast compilation, easy dependency analysis, lightweight static types, built-in support for concurrency and communication on multicore systems.
- Some of Go's guiding principles in design were to reduce typing, clutter, and complexity while avoiding forward declarations and header files everything is declared once without type hierarchies.
Lets Go - An introduction to Google's Go Programming Language Ganesh Samarthyam
?
This document introduces the Go programming language, which was announced by Google in 2009. It summarizes Go's key features, including being a concurrent, garbage-collected systems programming language. It also provides instructions on installing Go and a simple "Hello World" program example. The document argues that Go has substantial features for systems programming in today's networked, multi-core world.
Using Entity Framework's New POCO Features: Part 1, by Julie LermanJulie Lerman
?
EF4, the new version of Entity Framework in .NET 4.0, now supports agile development with the ability to use POCO (Plain Old CLR Objects) classes with EF. Now you can use your own classes without having to bind them to the Entity Framework APIs, yet still benefit from the querying, change tracking and updates that EF provides. One flavor of POCO is "in the box" and uses a model that you define. An extension to EF will also provide Code Only development where you will not even be required to build a model. This session will show you how to integrate your classes into the Entity Framework. See Part 2 to learn how to get the full benefit of this with unit testing and more.
Go is a programming language created by Google to help solve problems with large software and hardware systems. It was designed to facilitate development of large codebases by many engineers. Some key problems it aimed to address were slowness, clumsiness and lack of productivity in other languages like C++. Go provides features like garbage collection, concurrency with goroutines and channels, and a standard library, while remaining simple and compiled. It grew from a small project at Google into an open source language adopted by many organizations.
Introduction to GoLang by Amal Mohan N. This presentation is an introduction to GoLang - it's history, features, syntax, importance etc.
concurrency, go-routines, golang, google, gopher, introduction, programming
Go is a new systems programming language from Google. Go has many interesting features such as 'communication channels' that makes it suitable for use in multi-core machines, and network programming. With Ken Thompson (of Unix fame) as one of its designers, Go has elegant and minimal design that is appealing to most programmers. This talk gives a technical introduction to Go that is of interest to anyone working in system software.
[Presentation I have in 2010 - I haven't updated it with recent changes to the Go language]
The document provides an overview of the Go programming language. It discusses that Go was designed by Google to help solve their large-scale programming problems. It then summarizes Go's history, purpose, features, and syntax elements such as data types, operators, functions, concurrency using goroutines and channels. The document also provides examples of Go code and concludes that Go has emerged as a popular language for cloud infrastructure due to its simplicity, concurrency, and performance.
ATO 2014 - So You Think You Know 'Go'? The Go Programming LanguageJohn Potocny
?
The document is a presentation about the Go programming language. It provides a brief history of Go, noting it was created in 2007 by Google employees and became open source in 2009. It discusses some of Go's key features like being statically typed, garbage collected, and having built-in concurrency support. The presentation aims to show examples of writing simple programs in Go.
The Go programming language - Intro by MyLittleAdventuremylittleadventure
?
The document discusses the Go programming language, providing information on its history, creators at Google, design goals, key characteristics like being statically typed and concurrent, benchmarking results, major companies using Go, and examples of using Go for web scraping and servers. It outlines pros and cons of Go and resources for learning more.
Folio3 is a development partner that focuses on building custom enterprise, mobile, and social media applications. It was founded in 2005 and has over 200 employees across offices in the US, Canada, Bulgaria, and Pakistan. Go-Lang is a statically-typed, compiled programming language designed for building scalable network applications and facilitating concurrency. Key features include structs instead of classes, built-in concurrency through goroutines and channels, and static compilation to binary files.
Python is an interpreted, high-level programming language created by Guido van Rossum in 1991. It is used to develop popular apps at companies like YouTube, Instagram, Netflix and Google. Python code is easy to write due to its simple syntax and it is open source. Some key features are that it is a scripting language, supports multiple programming paradigms, runs code line-by-line, and is case sensitive.
Go is a compiled, garbage-collected programming language that supports concurrent programming through lightweight threads called goroutines and communication between goroutines via channels. It aims to provide both high-level and low-level programming with a clean syntax and minimal features. The document discusses Go's concurrency model, syntax, goroutines, channels, and use cases including cloud infrastructure, mobile development, and audio synthesis.
Go is a statically typed, compiled programming language designed for building simple, reliable, and efficient software. Some key points:
- Go is natively compiled and uses static typing with type inference. It is targeted for system programming and server-side applications.
- It was created at Google in 2007 to address issues with other languages like dependency management, garbage collection, and support for concurrency.
- Popular users include Google, Docker, Dropbox, SoundCloud, and MongoDB. Domains it is used include distributed systems, cloud, web development, and systems programming.
- Key features include built-in concurrency and networking support, a rich standard library, and fast compilation. It aims to be
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...Mickael Istria
?
From https://www.eclipsecon.org/france2018/session/ignite-talks
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE relying on LSP, TextMate and CLI
C# and Rust case studies
Pyston is a JIT-based implementation of Python 2.7 built using LLVM. It compiles Python code to LLVM IR for optimization and execution via LLVM's JIT engine. Current benchmarks show recursion sees benefits from LLVM JIT, while loops do not, and the implementation is missing major parts of the Python language. Future versions aim to add exceptions, classes, arguments and more.
A short talk I gave to R&D department in Digimax, Inc. It's dedicated to briefly describe how to parallelize your routine work in animation industry by making use of some tools.
This document provides an overview of the Python programming language. It discusses what Python is, how it compares to other languages like Java and C++, common uses of Python, job opportunities in Python, and the future of Python. It also advertises training in Python offered by Evolet Technologies, which aims to teach students to use Python professionally and gain expertise through hands-on learning and practice problems.
Go is a general-purpose, compiled language that is strongly typed, garbage-collected, and has explicit support for concurrent programming through goroutines and channels. Programs in Go are constructed using packages and the language provides standard types while also allowing functions to return multiple values.
Groovy is an open source dynamic language that runs on the Java Virtual Machine. It is a superset of Java with additional features like closures, metaprogramming and a simpler syntax. Groovy code compiles to Java bytecode and interoperates seamlessly with Java. Many companies and frameworks use Groovy, including Mule ESB, ServiceMix ESB, Spring, Grails and LinkedIn.
Groovy is an open source dynamic language that runs on the Java Virtual Machine. It is a superset of Java with additional features like closures, metaprogramming and a more concise syntax. Groovy code compiles to Java bytecode and can interoperate seamlessly with Java. Many companies and frameworks use Groovy, including Mule ESB, ServiceMix ESB, Spring and Grails.
The document summarizes the new features in Groovy 1.6, including performance improvements, syntax enhancements, compile-time and runtime metaprogramming additions, the Grape module system for managing script dependencies, improvements to Swing integration, built-in support for the JSR-223 scripting engine, a domain-specific language for JMX, and OSGi readiness. The presentation highlights key new features like annotations, multiple variable assignment, optional returns, and annotation processing through AST transformations.
Discussing open sourcing the IBM J9 JVM GC technology as part of a language agnostic toolkit. It has demos showing how easy it is to use the GC in another language as well as results on our MRI example
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.
This document summarizes Groovy, Grails, and compares it to other web frameworks. It discusses key features of Groovy like being a dynamic language that runs on the JVM. Grails is introduced as a rapid web development framework built on Groovy. The document outlines common Grails features like MVC structure, GORM for CRUD, and taglibs. Success stories, plugins, tools, books and tutorials are listed. The roadmap mentions upcoming Grails 2.0 with modular deployment and standing GSP. A demo of creating a simple Grails app is described.
The document discusses new features in Groovy 1.6, including performance improvements, syntax enhancements, compile-time metaprogramming, the Grape module system, Swing-related improvements, runtime metaprogramming additions, and OSGi readiness. Some key new features highlighted are multiple variable assignment, optional return in if/else and try/catch blocks, annotation definitions, AST transformations using annotations like @Singleton and @Immutable, and the @Grab annotation for declaring dependencies.
Go is a compiled, concurrent, garbage-collected programming language developed at Google. It aims to combine the performance and low-level access of compiled languages with the ease of use of scripting languages. Some key features of Go include its simple syntax, static and strong typing, concurrency support through goroutines and channels, and automatic memory management through garbage collection. Go is used by many companies and has a large standard library, though it lacks some common features like inheritance.
The document discusses next-generation programming languages that run on the Java Virtual Machine (JVM), focusing on Groovy and the Grails web application framework. It provides an overview of Groovy's features like closures and first-class containers. It also demonstrates building a sample web application in Groovy/Grails and discusses how Groovy integrates seamlessly with Java.
Feelin' Groovy: An Afternoon of Reflexive MetaprogrammingMatt Stine
?
The document summarizes a presentation about reflexive metaprogramming using the Groovy programming language. It discusses how Groovy supports reflexive metaprogramming through its Meta Object Protocol (MOP) and metaclasses, allowing methods to be dynamically added, removed, or replaced on classes at runtime. It also presents examples of method interception, injection, and synthesis in Groovy and how internal domain-specific languages can be implemented.
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 introduces Groovy, an agile dynamic language for the Java Virtual Machine (JVM). It runs on major operating systems like Windows, Linux, and Mac OS X. Groovy is syntactically similar to Java but with additional features like closures and fewer steps for object-oriented programming. The document provides examples of Groovy code for loops, classes, interfaces, and the Groovy API.
This document provides a summary of a presentation on alternative JVM languages that can be used with IBM's Social Business suite. The presentation discusses languages like Scala, Groovy, JRuby, and Kotlin that compile to Java bytecode and can therefore integrate with existing Java code and run on the Java Virtual Machine. It highlights advantages of these languages like reduced boilerplate code, type inference, and support for functional programming paradigms. The document also provides instructions on how to install and use these alternative languages with IBM Notes/Domino.
This document provides an overview of Groovy, including:
- Groovy is a dynamic language for the Java platform that adds features like closures and operator overloading.
- It started in 2003 and the latest version is 2.4.
- Groovy allows for dynamic typing, closure support, easier setup than Java, and integration with existing Java code and libraries.
- Key Groovy features covered include closures, operator overloading, GString, dynamic vs static typing, and working with files.
Dynamic languages like Groovy, JRuby, and Ruby on Rails can run on the Java Virtual Machine (JVM) and integrate with Java technologies. This allows developers to benefit from dynamic language features while leveraging existing Java investments. Frameworks like Grails and Rails are designed for rapid web application development using conventions over configuration and minimize repetitive code. Integrating with the JVM means these dynamic languages can access Java libraries and be deployed on Java application servers without losing existing Java skills and infrastructure.
- Griffon is a framework that aims to make building desktop applications with Swing more fun and productive by taking inspiration from Grails and leveraging Groovy.
- It addresses pain points in Swing development through features like builders, MVC groups, and application lifecycle handling.
- Griffon's unique values include builders for declarative UI creation, support for the MVC pattern through reusable view-controller-model triads, and conventions over configuration for the application lifecycle.
The document discusses Domain Specific Languages (DSLs) and how Groovy is well-suited for creating DSLs. It provides examples of DSLs like XML, HTML, and SQL. It then explains how Groovy features like dynamic typing, closures, meta-programming capabilities via metaclasses, and chaining methods allow it to easily define and implement DSLs. Specific Groovy DSL examples discussed include builders for XML/HTML, the GORM for object-relational mapping, and a Korean language DSL.
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovSvetlin Nakov
?
Java 7 - New Features
Introduction and Chronology
Compressed 64-bit Object Pointers
Garbage-First GC (G1)
Dynamic Languages in JVM
Java Modularity ¨C Project Jigsaw
Language Enhancements (Project Coin)
Strings in Switch
Automatic Resource Management (ARM)
Improved Type Inference for Generic Instance Creation
Improved Type Inference for Generic Instance Creation
Simplified Varargs Method Invocation
Collection Literals
Indexing Access Syntax for Lists and Maps
Language Support for JSR 292
Underscores in Numbers
Binary Literals
Closures for Java
First-class Functions
Function Types
Lambda Expressions
Project Lambda
Extension Methods
Upgrade Class-Loader Architecture
Method to close a URLClassLoader
Unicode 5.1
JSR 203: NIO.2
SCTP (Stream Control Transmission Protocol)
SDP (Sockets Direct Protocol)
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovSvetlin Nakov
?
Groovy
1. Tom Corcoran ¨C OSS Software - May 20091Get excited by coding again!Java History & the JVMGroovy genesis & it¡¯s relation to JavaInstalling GroovyLive demo to compare and contrast Groovy with Java codeGroovy Typing Object & Looping Regular Expressions Groovy Math Goodies+++ Closures MOP MLVMGrails & GAE
2. Tom Corcoran ¨C OSS Software - May 20092JavaJavadeveloped by James Gosling released in 1995Java applications compiled to bytecode (.class files) that can run on any Java virtual machine (JVM) regardless of computer architectureVersion History1 (1995), 2(1998), 3(2000), 4(2002), 5(2004), 6(2006)Java 7 due Q1 2010: No closuresJVM->MLVM : the Java platform is changing GroovyJRuby (Ruby implementation) ScalaClojure (Lisp dialect)Rhino (Javascript implementation)JavaFXScript (Sun¡¯s new baby)Jython (Python implementation)
3. Tom Corcoran ¨C OSS Software - May 20093GenesisFirst begun in 2004 by James Strachan, lost momentum, project reenergized by Guillaume Laforgewith v1 released in Jan 2007, currently at v1.6.3JSR 241: Groovy is an agile, dynamic programming language for the Java Virtual Machine. Groovy includes features found in Python, Ruby, and Smalltalk, but uses syntax similar to the Java programming languageLike Java, dynamically compiled to Java Virtual Machinebytecode (.class file)As a result seamless 2 way integration with Java code and librariesDeployed as a jar (zip) file
4. Tom Corcoran ¨C OSS Software - May 20094Java++Java is a powerful language already, the goal was to add a new Swiss army knife to the Java developer tool belt, to have the agility and expressivenessof a dynamic languageGroovy is ¡°quite literally Java, but without the pain¡±Follows Java semantics, relaxed grammar, derived from java 5Any Java code will run as Groovy: Its superset-of-Java nature means that you can start with a Java file & change its suffix to ¡°.groovy¡±, often Java developers end up with the gradual adoption route which is as designedGDK: extends the JDK (programming tools for Java)Groovyc in addition to javacGroovyDoc in addition to JavaDocMetaprogramming Can extend a program at runtime, including changing the structure of objects, types, and behaviour
5. Tom Corcoran ¨C OSS Software - May 20095InstallationDownload zip/windows installer & unpack/installSet GROOVY_HOME environment variable to unpacked locationAdd GROOVY_HOME/bin to your PATH environment variableSet your JAVA_HOME environment variable to point to your JDKGroovy ShellIn a command shell type groovyshRun Groovy codegroovyMyCode.groovyGroovy ConsoleTo run Swing interactive console type GroovyConsole
7. Tom Corcoran ¨C OSS Software - May 20097Increase readabilityThis GroovyBean gives the same result with less code noiseThis also illustrates a recurring theme in Groovy: Make common coding conventions simpledef think of defas an alias of "Object"
10. Tom Corcoran ¨C OSS Software - May 20098TypingGroovy is optionally typed and the Groovy compiler, groovyc, does not perform full type checkingassigning a string to an integer compiles fine, when you try to run you will receive a GroovyCastException exceptionif you call a method that does not exist, you will not get any compilation error, you will get a MissingMethodException at runtimeRule of thumb: use static typing if interfacing with static language code
11. Tom Corcoran ¨C OSS Software - May 20099Objects & LoopingEverything is an object in GroovyJava mixes primitive Boolean type and the numeric types - byte, short, int, long, and char, float and double and reference (object) types class types, interface types, and array typesString literals are represented by String objectsLoopingmapA map is a mapping from unique unordered keys to valuesassertProvide expression that you are asserting will be true, otherwise throws AssertionErrornew reserved word
12. Tom Corcoran ¨C OSS Software - May 200910Regular ExpressionsGroovy uses the Java regular expression engine but adds some native support sugar~"pattern" expression, which creates a Java Pattern object=~ expressions, which creates a Java Matcher objectSlashy strings, can help with escaping
13. Tom Corcoran ¨C OSS Software - May 200911Groovy MathGroovy uses exact, or decimal math for default calculationsThis means that user computations like: 1.1 + 0.1 == 1.2 will return true rather than false (using float or double types in Java returns a result of 1.2000000000000002)To achieve this groovy literals with decimal points are instantiated as java.math.BigDecimal types rather than binary floating point types (Float, Double)Some financial users are big fans of how it does Math and I have heard of one where the actuaries are able to code in it too and do as wellhttp://groovy.codehaus.org/Groovy+Math
14. Tom Corcoran ¨C OSS Software - May 200912GoodiesGroovy TruthGroovy provides parsers & slurpers for working with XMLUse XmlSlurper to slurp up a xml file
15. Tom Corcoran ¨C OSS Software - May 200913Goodies+Optional parametersto achieve this in Java you have you have to overload methodTrailing array parameter is optionalImplementing interfacesMethod parameters optional
16. Tom Corcoran ¨C OSS Software - May 200914Goodies++Safe dereferencingElvis operator is a shortening of Java's ternary operatoryou will still notice the repetition of the name variable, which would violate the DRY principle (Don't Repeat Yourself)
17. Tom Corcoran ¨C OSS Software - May 200915ClosuresClosures are pieces of code that can augment, refine or enhance another piece of codeClosures can be passed to methodsGDK Examples
18. Tom Corcoran ¨C OSS Software - May 200916MOPFor each Java class and for each Groovy instance, there is an associated meta-class which represents this runtime behavior of your objectsa groovier kind of meta-class is available: the expando meta-classyou can check that a certain method or property is available
19. Tom Corcoran ¨C OSS Software - May 200917MLVMnot a silver bullet...Doing at run-time what other languages do at compile time raise the concern of speed of dynamic languagesDynamic languages such as Groovy/JRuby are up to 10 times slower on micro benchmarks due to heavy reflection use, this does not mean overall speed translates to that ratiothe Da Vinci Machine ProjectSun project to prototype the extension of the JVM to add support for dynamic languagesSpecification process JSR-292: Supporting Dynamically Typed Languagesadd a new bytecode, invokedynamic, to bring dynamic language speed closer to 2/3 times of Javamay be included in Java 7http://openjdk.java.net/projects/mlvm/
20. Tom Corcoran ¨C OSS Software - May 200918Grails & GAEAs of 14 May 2009 Grails v1.1.1 now supports the Google Application Engine (GAE)GORM had to have wrapper for GAE¡¯s datastore GQLUp to now to Hosting a grails war was about $20 a month Now free hosting of application with 500 MB of persistent storage and enough CPU and bandwidth for about 5 million page views a monthhttp://myapplication.appspot.com
21. Tom Corcoran ¨C OSS Software - May 200919ResourcesGroovy http://groovy.codehaus.org Programming Groovy : VenkatSubramaniam Groovy Recipes: Scott Davis Grails http://www.grails.orgThe Definitive Guide to Grails: Graeme Rocher Grails in Action: Glen Smith & Peter Ledbrook
22. Tom Corcoran ¨C OSS Software - May 200920The EndComments http://joind.in/event/view/46Local Groovy User Group? http://gugse.com