667481 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 26 Messages: 26 Messages: 26 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

JCP Approves Groovy Language JSR: Sun endorses language

Posted by: Dion Almaer on March 30, 2004 DIGG
The JCP has approved JSR 241, the Groovy Language. The entire executive committee voted yes, with Sun adding a very positive comment: "Sun is happy to see Groovy proposed as a JSR. Having additional interesting languages for
the Java platform seems like a Good Thing!"

This JSR sets a huge precedent. Sun has really shown that they care a lot more about Java the platform, as apposed to just Java the language.

This is great news for the community. There was also a rumor that James Gosling himself said: "Groovy is groovy" and that he pushed for the JSR to go through.

View the results of the JSR 241 Ballot

View the JSR 241 home page

Threaded replies

·  JCP Approves Groovy Language JSR: Sun endorses language by Dion Almaer on Tue Mar 30 08:41:40 EST 2004
  ·  JCP Approves Groovy Language JSR: Sun endorses language by Michael Boyd on Tue Mar 30 09:22:30 EST 2004
    ·  JCP Approves Groovy Language JSR: Sun endorses language by Neil Ellis on Tue Mar 30 09:44:27 EST 2004
      ·  JCP Approves Groovy Language JSR: Sun endorses language by Cedric Beust on Tue Mar 30 09:56:25 EST 2004
      ·  if the shoe fits... by Michael Boyd on Tue Mar 30 10:23:14 EST 2004
        ·  if the shoe fits... by Konstantin Ignatyev on Tue Mar 30 10:44:08 EST 2004
        ·  if the shoe fits... by Aapo Laakkonen on Tue Mar 30 11:27:28 EST 2004
          ·  if the shoe fits... by Jon Tirsen on Tue Mar 30 12:46:22 EST 2004
            ·  if the shoe fits... by Mike Spille on Tue Mar 30 13:42:34 EST 2004
    ·  JCP Approves Groovy Language JSR: Sun endorses language by Nick Minutello on Tue Mar 30 16:54:04 EST 2004
  ·  Re: JCP Approves Groovy by ABC DEF on Tue Mar 30 12:10:51 EST 2004
  ·  ver y nice by Carlos Zuluaga on Tue Mar 30 14:44:44 EST 2004
  ·  JCP Approves Groovy Language JSR: Sun endorses language by random fletch on Tue Mar 30 16:40:06 EST 2004
  ·  What advantage does groovy have over other scripting languages? by Toby Hede on Tue Mar 30 19:47:18 EST 2004
    ·  What advantage does groovy have over other scripting languages? by Nevin Ng on Tue Mar 30 22:19:05 EST 2004
      ·  What advantage does groovy have over other scripting languages? by Juozas Baliuka on Wed Mar 31 00:23:58 EST 2004
    ·  Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page by Gerald Bauer on Wed Mar 31 02:13:40 EST 2004
      ·  Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page by Aapo Laakkonen on Wed Mar 31 03:34:38 EST 2004
        ·  Groovy Offers The Best From Ruby, Python and Smalltalk by Gerald Bauer on Wed Mar 31 04:13:11 EST 2004
          ·  Critizizing by Aapo Laakkonen on Wed Mar 31 06:11:30 EST 2004
            ·  Critizizing by peter reilly on Wed Mar 31 10:50:14 EST 2004
          ·  Why a *compiled* scripting language? by Darren Cruse on Thu Apr 08 14:56:39 EDT 2004
            ·  Why a *compiled* scripting language? by Mike Spille on Thu Apr 08 15:24:38 EDT 2004
              ·  Why a *compiled* scripting language? by Darren Cruse on Fri Apr 09 09:28:15 EDT 2004
                ·  Why a *compiled* scripting language? by Mike Spille on Fri Apr 09 12:37:16 EDT 2004
                  ·  Why a *compiled* scripting language? by Darren Cruse on Fri Apr 09 15:09:58 EDT 2004
  ·  JCP Approves Groovy Language JSR: Sun endorses language by Stefano Fago on Wed Mar 31 02:19:23 EST 2004
  Message #115770 Post reply Post reply Post reply Go to top Go to top Go to top

JCP Approves Groovy Language JSR: Sun endorses language

Posted by: Michael Boyd on March 30, 2004 in response to Message #115759
Good work! Interesting timing with recent posting by Mike Spille about using the Groovy language. With the passing of the JSR, does this effectively mean Groovy is the official scripting language for Java?

Michael

  Message #115772 Post reply Post reply Post reply Go to top Go to top Go to top

JCP Approves Groovy Language JSR: Sun endorses language

Posted by: Neil Ellis on March 30, 2004 in response to Message #115770
Ghorrr!

You're looking for controversy Michael!

Graham (on behalf of Sun's) comment is kinda interesting isn't it. Well if Groovy can be made into a ship-shape well engineered _and_ agile language then all the better. Also MS have loads of langauges for their platform so I imagine it's a flower in the cap for Sun if they can add one 'officially' to their platform.

I think Sun's 'approval' is a good thing, any new 'agile' (for want of a better word) langauge needs some serious patronage if it's going to get used in most of our working lives.

Regards
Neil

  Message #115773 Post reply Post reply Post reply Go to top Go to top Go to top

JCP Approves Groovy Language JSR: Sun endorses language

Posted by: Cedric Beust on March 30, 2004 in response to Message #115772
Quite a sweeping approval... Congratulations to James and his team!

--
Cedric

  Message #115779 Post reply Post reply Post reply Go to top Go to top Go to top

if the shoe fits...

Posted by: Michael Boyd on March 30, 2004 in response to Message #115772
You're looking for controversy Michael!
I wasn’t intentionally looking for controversy and if I was I don’t think that is necessarily a bad thing. But I have noticed the absence of the equivalent of say VB in Java. So I was wondering (in the perception of other Java programmers) if Groovy fits that sort of shoe. I hope it is a “flower in the cap” and that other scripting languages come out. I forgot about PHP but then again, I have not used it (read about scalability issues). Speaking of, how does Groovy compare to PHP? Are they apples and oranges?

Best regards,
Michael

  Message #115780 Post reply Post reply Post reply Go to top Go to top Go to top

if the shoe fits...

Posted by: Konstantin Ignatyev on March 30, 2004 in response to Message #115779
Now we are close to admit that we have several competing OS:
Linux, Java and Win(.NET is just next version of MS OS)

  Message #115788 Post reply Post reply Post reply Go to top Go to top Go to top

if the shoe fits...

Posted by: Aapo Laakkonen on March 30, 2004 in response to Message #115779
> Speaking of, how does Groovy compare to PHP?
> Are they apples and oranges?

PHP has quite impressive function library written in C. It's also very straight forward to use. Some say that you can program with PHP the way you think. I have got this feeling very often when I have worked with PHP. For example if I want 32-byte hex-decimal md5 output from something, I just call md5("something");, and these cases pop-up all the time. When doing something similar with Java I have to read api documentations and find my way out of overly complicated and abstracted Java implementations. Usually I end up with some utility class that has static method that performs the thing I want. It's quite sad that I almost always end up writing those same utilities over and over again. With PHP, this is not the case.

Right now Groovy, in my opinion, is nothing more than a new syntax. It has some shortcuts that make programming simple Java programs easier (than doing them in Java), and it has it's uses in some projects (embedded scripting in java environment, quick prototyping of Java apps, etc.). But I think that Groovy needs some PHP like utilities (maybe done in OO ways) to become something more than a syntax. Every scripting language has these (I mean libraries specifically designed for the scripting language itself). Groovy takes another approach by leveraging J2SE and J2EE etc. standard Java libraries (correct if I'm wrong). What I would like to see is that Groovy implements it's own libraries that wrap/reimplement Java libraries to make the most common things as simple as possible.

Just thoughts.

  Message #115796 Post reply Post reply Post reply Go to top Go to top Go to top

Re: JCP Approves Groovy

Posted by: ABC DEF on March 30, 2004 in response to Message #115759
This is long overdue. Unfortunately Sun/JCP isn't driven by community demands, but by pressure from Microsoft.

  Message #115799 Post reply Post reply Post reply Go to top Go to top Go to top

if the shoe fits...

Posted by: Jon Tirsen on March 30, 2004 in response to Message #115788
What I would like to see is that Groovy implements it's own libraries that wrap/reimplement Java libraries to make the most common things as simple as possible.Just thoughts.
Groovy actually does just this. For example it extends anything that implements java.util.Collection with an each method so you can do things like:
collection = [1, 2, 3]
collection.each { print it }

  Message #115809 Post reply Post reply Post reply Go to top Go to top Go to top

if the shoe fits...

Posted by: Mike Spille on March 30, 2004 in response to Message #115799
Yep. For comprehensive details, see:

    http://groovy.codehaus.org/groovy-jdk.html

Most interesting to me are the ones in *Writer/*Reader, *Stream, Object, String, and of course the various Collections. You gotta love things like Reader.eachLine(), Reader.readLines(), and BufferedReader.getText(). Being able to say:

    InputStream is = new FileInputStream (...some file...);
    List file = is.readLines();

and getting a List of the lines in the file is extremely convenient for scripty purposes. And being final able to say something like this is just excellent:

    InputStream is = new FileInputStream (...some file...);
    is.eachLine ( {
         // Closure with 'it' parameter containing each source line
         // in successive calls.
     });


     -Mike

  Message #115818 Post reply Post reply Post reply Go to top Go to top Go to top

ver y nice

Posted by: Carlos Zuluaga on March 30, 2004 in response to Message #115759
It's soo cool to see that SUN has received groovy as j2EE languaje.
I was really thinking that java would be the only one for j2ee, but
sun has surprise me.
It's great!

  Message #115829 Post reply Post reply Post reply Go to top Go to top Go to top

JCP Approves Groovy Language JSR: Sun endorses language

Posted by: random fletch on March 30, 2004 in response to Message #115759
Congratulations groovy!

Somehow I think this will be the shortest bile to follow up bile in the history of Hani. But you know you've made it when Hani's ulcers start acting up.

  Message #115832 Post reply Post reply Post reply Go to top Go to top Go to top

JCP Approves Groovy Language JSR: Sun endorses language

Posted by: Nick Minutello on March 30, 2004 in response to Message #115770
does this effectively mean Groovy is the official scripting language for Java? Michael
I dont think its anyone's intention for it to be the official scripting language. Just an official scripting language...

-Nick

  Message #115855 Post reply Post reply Post reply Go to top Go to top Go to top

What advantage does groovy have over other scripting languages?

Posted by: Toby Hede on March 30, 2004 in response to Message #115759
Just curious as to what advantage does groovy have over other scripting languages that run on the JVM, such as JPython or JavaScript?

I am interested because I have been using JavaScript with XWork to script my business logic. I like JS because I then have one scripting language for both the client and server, and as I also do some Flash MX work, which uses ActionScript (ECMA script).

  Message #115867 Post reply Post reply Post reply Go to top Go to top Go to top

What advantage does groovy have over other scripting languages?

Posted by: Nevin Ng on March 30, 2004 in response to Message #115855
Just curious as to what advantage does groovy have over other scripting languages that run on the JVM, such as JPython or JavaScript?
I guess the different is JPython/JRuby/etc is running on a scripting engine that itself running ontop of the JVM. So virtually the script you wrote will be interpreted twice ;-)

While Groovy is compiled into Java bytecode, which is the same as compiled Java source to the JVM.

  Message #115878 Post reply Post reply Post reply Go to top Go to top Go to top

What advantage does groovy have over other scripting languages?

Posted by: Juozas Baliuka on March 31, 2004 in response to Message #115867
I guess the different is JPython/JRuby/etc is running on a scripting engine that itself running ontop of the JVM. So virtually the script you wrote will be interpreted twice ;-)While Groovy is compiled into Java bytecode, which is the same as compiled Java source to the JVM.
This is implementation details, some "old" scripting languages are compiled into Java bytecode too, see dynamicjava or javascript, it is not the major feature and it not performant in some cases.

  Message #115896 Post reply Post reply Post reply Go to top Go to top Go to top

Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page

Posted by: Gerald Bauer on March 31, 2004 in response to Message #115855
Hello,

> Just curious as to what advantage does groovy have over other scripting
> languages that run on the JVM, such as JPython or JavaScript?

  Allow me to highlight my Groovy talk slides (40+) online in an all-in-HTML-page version titled "Groooooovy Babe: Jazzing Up Plain Old Java".

  To quote from the slide titled "Why Groovy? What's wrong with Python (Jython), Ruby (JRuby) or Smalltalk (Bistro)?"

  Why yet another scripting language?

  * Groovy builds on (reuses) the Java standard class library; Python, Ruby or Smalltalk include their own batteries (that is, standard libraries)
  * Groovy uses a Java-like syntax; easy to switch from Java to Groovy or from Groovy to Java
  * Groovy compiles straight to standard Java bytecode; you can use Groovy (groovyc) as an alternative compiler to javac
  
  - Gerald

  Message #115897 Post reply Post reply Post reply Go to top Go to top Go to top

JCP Approves Groovy Language JSR: Sun endorses language

Posted by: Stefano Fago on March 31, 2004 in response to Message #115759
Good Luck!
...but this is the beginning of the end!...Playing with the same model of Microsoft (Groovy==VB&family) is not the answer!...
However show must go on!

  Message #115902 Post reply Post reply Post reply Go to top Go to top Go to top

Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page

Posted by: Aapo Laakkonen on March 31, 2004 in response to Message #115896
> Groovy builds on (reuses) the Java standard
> class library; Python, Ruby or Smalltalk
> include their own batteries (that is, standard
> libraries)

Likewise Groovy has to reimplement/wrap several (or all) J2SE /J2EE etc. libraries to make them even remotely usable in scripting environment (eg. Collections, Readers (allready done) and this list should continue to contain most of J2SE classes (not yet done) -> meaning Groovy has it's own standard library). If they are not going to do that, then Groovy gives a little over plain Java.

> Groovy uses a Java-like syntax; easy to
> switch from Java to Groovy or from Groovy
> to Java

So does C++, C#, JavaScript and many others.

> Groovy compiles straight to standard Java
> bytecode; you can use Groovy (groovyc) as
> an alternative compiler to javac

That's what all other 30+ JVM scripting languages have done for ages.

  Message #115908 Post reply Post reply Post reply Go to top Go to top Go to top

Groovy Offers The Best From Ruby, Python and Smalltalk

Posted by: Gerald Bauer on March 31, 2004 in response to Message #115902
> That's what all other 30+ JVM scripting languages have done for ages.

  First, I'm not a Groovy fanatic and you're free to choose whatever scripting language you think is best. I've even assembled a Scripting Languages for Java page over at the Viva! site.

  Anyway, even though most scripting languages compile down to bytecode Groovy goes further. If I may quote from the "Compiling Groovy Scripts Using groovyc" slide:

  Note, that every Groovy class becomes a "normal" Java class that you can use inside your Java code. The only difference between a Groovy generated Java class and a plain old Java class is that a Groovy generated Java class supports the groovy.lang.GroovyObject interface.

  - Gerald

  Message #115921 Post reply Post reply Post reply Go to top Go to top Go to top

Critizizing

Posted by: Aapo Laakkonen on March 31, 2004 in response to Message #115908
> you're free to choose whatever scripting language

Of course (I'm not an idiot). I just wanted to critizize Groovy (I did try to do it in a constructive manner).

> Compiling Groovy Scripts Using groovyc

I don't see how this differs from eg. (except that Groovy implements GroovyObject):
http://jython.sourceforge.net/cgi-bin/faqw.py?req=show&file=faq06.001.htp

I have to admit that Groovy has more elegant Java bindings than other similar projects, but Groovy without it's own libraries (J2SE doesn't fit, in my opinion, in scripting environment) is just another syntax.

  Message #115970 Post reply Post reply Post reply Go to top Go to top Go to top

Critizizing

Posted by: peter reilly on March 31, 2004 in response to Message #115921
The classes genererated by groovy and beanshell 2.0 are
real java objects -
one can use reflection on them to get the methods / fields.
This is very usefull for intergrating with other systems, for
example with ant, it is easy to write ant tasks in groovy
or beanshell.

  Message #117373 Post reply Post reply Post reply Go to top Go to top Go to top

Why a *compiled* scripting language?

Posted by: Darren Cruse on April 08, 2004 in response to Message #115908
I attended a presentation on Groovy at a Java conference recently, and the big surprize for me was that Groovy was a compiler and not an interpreter. I've used Perl, Java, and played with BeanShell, and when I heard of Groovy as a standard "scripting" language I just assumed it would be an interpreter, since for me the joy of using a scripting language, aside from loose typing, is switching from the edit/compile/run mode into the more comfy and streamlined edit/run.

Seriously, when I think of working with JavaScript and being able to make a change, save it in the editor and just refresh my browser to test, versus (for example) working on Struts Action code and having to re-compile it and redeploy it to the app server, I think the interpreted approach wins hands down for programmer productivity. At least it seems so to me, and so when I realized Groovy was still a compiled language might first thought was this was a big mistake and if Sun wants something that truly *complements* Java they would have better chosen something more like BeanShell (i.e. an interpreted Java with optional loose typing features).

Am I making too much of this? Are they planning to do things analogous to the way JSP's are auto-magically compiled to make it feel more like an interpreted scripting language? Or am I wrong to think of compilation as a significant headache?

I don't think I'm wrong - but I'm curious what others think. Obviously there's smart people who approved this JSR. I just think practically and politically something like BeanShell would have been a better "standard" Java scripting language.

  Message #117380 Post reply Post reply Post reply Go to top Go to top Go to top

Why a *compiled* scripting language?

Posted by: Mike Spille on April 08, 2004 in response to Message #117373
Darren, yes it's compiled, but if you want to use it in a scripty way you often can't tell that it is.

Groovy ships with a wrapper program (called 'groovy' :-) that lets you execute scripts directly. Well, you're not really doing it directly but it acts as if it does. It's not exactly like, say, perl, but it's close enough so that you can't tell the difference most of the time.

So it's easy to just say:

    groovy myscript.groovy

or to use Unix #! notation:

    #!groovy
    // Groovy code

  -Mike

  Message #117454 Post reply Post reply Post reply Go to top Go to top Go to top

Why a *compiled* scripting language?

Posted by: Darren Cruse on April 09, 2004 in response to Message #117380
You're right that is pretty slick - does make it look just like other scripting languages when running from the command line. There's two other modes I'm curious about though:

a. Embedded usage/"Eval": e.g. I'd like to embed Groovy snippets to act as Struts actions, and iteratively refine/debug them (i.e. edit/test/edit/test quick quick quick - i.e. no headaches/slowdowns from app server redeployment).
b. Interactive usage: e.g. The "shell" in "BeanShell" is that it literally has an interactive shell, where you can interactively develop and debug programs from this BeanShell "command line". Great for learning and debugging.

Do you know if Groovy can work in these modes?

  Message #117473 Post reply Post reply Post reply Go to top Go to top Go to top

Why a *compiled* scripting language?

Posted by: Mike Spille on April 09, 2004 in response to Message #117454
On a), yeah you can embed Groovy, but it's a little wordy right now. You have to instantiate an object (GroovyShell?) and you pass the script into that. This should let you do what you want though.

On b), there's Groovy shell (groovysh) and a simple Swing app groovy console that act as an interactive shell. They're very basic though - personally I find them kind of annoying. It's easier just to write scripts in an editor.

    -Mike

  Message #117483 Post reply Post reply Post reply Go to top Go to top Go to top

Why a *compiled* scripting language?

Posted by: Darren Cruse on April 09, 2004 in response to Message #117473
Thanks for the info Mike. Overall sounds real good.

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Auto-Scaling Your Existing Web Application

In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources. (May 19, Tech Talk)

Free Book PDF Download: Mastering EJB Third Edition

Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map