Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Web Console - Run Groovy++ and Groovy scripts side by side

DZone's Guide to

Web Console - Run Groovy++ and Groovy scripts side by side

· Java Zone
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

http://groovypp.appspot.com/ is a utility web console, if you are interested in a quick and simple check to see how a Groovy++ script compares to its dynamic Groovy equivalent - in terms of behavior, execution time, etc.

It's a very basic app - you give it a Groovy++ script and choose to run just the Groovy++ version or both Groovy++ / Groovy versions to compare them side by side.

Try the script below to know in 30 ms from Groovy++ that it cannot handle dynamic metaClass features or in around 150 ms from Groovy that it can. Then depending on which one you like more, you can say that Groovy++ is faster or Groovy is feature-richer ;-)

@Typed class Test {
static main(args) {
String.metaClass.foo = {-> println "foo() called"}
"".foo()
}
}

Feedback welcome.

 

Regards,
Roshan
http://groovypp.appspot.com/

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}