• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

grrovy's own API?

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
groovy has its own API like Java? can we program groovy to do database connections or make a GUI interface?
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Groovy has full access to the Java API plus some other really cool extra API stuff of its own.

If you've used Swing before, you may want to check out Groovy's Swing Builder which makes the code for building UI components more declarative, which creates less code clutter and is easier to read.

Speaking of builders, check out other Builders, especially scroll down to see how easy it is to write HTML and XML using Groovy!
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With Groovy, you can do anything you can do with Java (and it's so much easier!). You can use JDBC with Groovy for your database connections.

As far as GUI programming goes, Groovy's SwingBuilder is really neat. I think the code is a lot easier to read than code for a Swing app in Java. If you're looking to do web applications, you can check out Grails.
 
Tina Ma
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I saw a demo for grails at this link : http://media14.roadkast.com/hansamann/grails_scaffolding.mov

It looks so very much like Ruby on Rails!
How is Groovy better than Ruby?
 
Author
Posts: 135
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To answer the last part of your question, how is Groovy better than Ruby. That is like asking how is one flavor of ice cream better than another. It depends on your personal preference. In the case of the languages, it depends on your needs.

The way I view it, if I want to program using a dynamic language, I want to build internal DSL, etc. but have nothing what so ever to do with Java, I tend to prefer Ruby. If I need these capabilities, but also need to interact with Java libraries or if part of my application is Java, I prefer Groovy as it provides a nice integration and enhancement to Java.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic