Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Google Businesses Programming The Internet IT Technology

Google App Engine Adds Java Support, Groovy Meta-Programming 168

Zarf writes "Yesterday Google announced that the Google App Engine now supports Java development, and fast on the heels of the Java announcement is an announcement for Groovy support! Groovy is a dynamic programming language for the JVM that is a near super-set of Java. Much Java syntax is valid Groovy syntax, however, Groovy adds powerful meta-programming features, and the new functionality will bring these meta-programming features to App Engine development. Groovy got special attention from the SpringSource Groovy team and the Google App Engine Java team, and it was this collaboration that helped create the changes that were the big secret in the recent Groovy release of 1.6.1."
This discussion has been archived. No new comments can be posted.

Google App Engine Adds Java Support, Groovy Meta-Programming

Comments Filter:
  • Awesome (Score:3, Insightful)

    by coldtone ( 98189 ) on Wednesday April 08, 2009 @01:20PM (#27505881)

    This really opens the floodgates for cloud computing. I can't wait to port to this platform.

    • Re:Awesome (Score:5, Funny)

      by jlp2097 ( 223651 ) on Wednesday April 08, 2009 @01:32PM (#27506037) Homepage Journal

      Exactly! We just need to proactively monetize the synergistic potential of this new paradigm of cloud computing and meta-programming by thinking outside the box and leverage these tools to enable a better strategic fit in our forward-thinking, customercentric enterprise.

      • Buzzwords aside, the ability to try GAE for free and use it for your own tests and experiments is a good thing. I've been much more productive hacking with python/GAE than php/mysql.

        • Re: (Score:2, Funny)

          by Anonymous Coward

          Whoa, FABULOUS acronym!

          • Whoa, FABULOUS acronym!

            Dude, php and sql are acronyms too. WAIAFOA (We are in a field of acronyms). What's your point?

            • WHOOSH? I think he was making a joke about how you would say "GAE" like "gay" and then was saying it was a "FABULOUS" acronym (as in the stereotype of gay men saying "fabulous" a lot).
              • by Camann ( 1486759 )
                Shh! I was enjoying the breeze.
              • Whoosh indeed, thanks for clarifying. I guess I need to find me some immature co-workers, cause I'm evidently out of touch.

      • Re:Awesome (Score:5, Funny)

        by Blue Stone ( 582566 ) on Wednesday April 08, 2009 @02:01PM (#27506521) Homepage Journal

        I'm concerned that my blue-sky thinking will be obscured by your cloud computing. Any advice?

        • I'm concerned that my blue-sky thinking will be obscured by your cloud computing. Any advice?

          We're hoping the collision of the different cloud paradigms will cause them to coalesce into a more tangible form, precipitating the knowledge and tools across the umbrella of all the technology community, from where it will flow into a deep reservoir of accumulated experience that can be processed, filtered, and piped out to the wider business community on tap. (To complete the water cycle analogy, the business suits will then piss it away, it'll all go down the sewer, and the industry will be all at sea

        • You need to harmonise your synergies to leverage optimal domains. It's simple when you think about it.
      • Exactly! We just need to proactively monetize the synergistic potential of this new paradigm of cloud computing and meta-programming by thinking outside the box and leverage these tools to enable a better strategic fit in our forward-thinking, customercentric enterprise. ;-)

        Forget funny, mod parent as Insightful, that one was Brilliant!

        I may have to quote you on that!

        I may even have to drop it in the "suggestion box", that should be worth at least a couple of points on my Balance Score Card.

    • Even more to the point, it opens the flood-gates for secure webapps. PHP has the advantage of providing a number of great apps off the shelf that all run on cheap hosting providers. The flip-side to those apps is that you're stuck on the upgrade treadmill as security issues pour out of those apps.

      No offense to the people writing these apps. The ease of the platform is a double-edged sword. It's not hard to accidentally introduce security holes in the application. Especially on projects with dozens of develo

      • In addition, Java has a much better system for componentization. PHP apps are often deployed as large sets of files. This has its advantages, but it also means that plugins are often achieved by modifying PHP code. The Java platform is a more dynamic platform that allows for components to easily be plugged in. With Java, adding new features to your blog or forums can be as easy as clicking the "install" button in the admin console.


        What you are seeing that typically Java developers are more likely t

        • So what you are basically saying is that Java isn't better than PHP, instead, Java developers are better than PHP developers on the whole.

          • No, I'm not claiming Java isn't better than PHP, just that Java isn't more dynamic than PHP (as was claimed).

            Although its probably true overall, I wasn't even claiming that Java devs are better overall than PHP devs, just that they tend focus more effort on architecture. Even to the point of going too far and over complicating things sometimes.

            I'd even hazard a guess that being in a less dynamic environment requires them to put more effort into architecture. Compared to PHP it is much harder to "just make i

  • After a cursory glance around the Groovy site the syntax seems like python with brackets, yuck.

    • But... (Score:4, Funny)

      by MrEricSir ( 398214 ) on Wednesday April 08, 2009 @01:29PM (#27505999) Homepage

      But Groovy is NEW! And new is better! Just ask any developer!

      • by ari_j ( 90255 )
        Offer not valid where Lisp is sold.
    • Re:Looks like Python (Score:4, Informative)

      by hansamurai ( 907719 ) <> on Wednesday April 08, 2009 @01:45PM (#27506281) Homepage Journal

      Well, it's biggest advantage is that it is a language written to run on the JVM*. You can talk to Java classes when you need to, but it's really a dynamic language that Java developers can easily learn and use. Type can be strong or weak depending on what you want/need, you can write Groovy unit tests against Java code, etc.

      *of course there's Jython, but Groovy was designed from the ground up to be used by Java developers.

      • Re: (Score:3, Insightful)

        by Lord Ender ( 156273 )

        Anyone who has ever maintained perl will tell you that it isn't always the best idea to give programmers the choice of how to do things. If there is a right way, don't give them the option of doing it the wrong way, because many will do so. And if two ways are equally good, just pick one--there's no reason to give people an option!

        • I don't know about that. My philosophy is that there should be two ways to do everything - one way that's obvious and handles the "easy" cases, and a more "advanced" method that handles edge conditions that come won't come up in the commonly intended uses.

          That way one makes the easy things easy while not making the hard things nearly impossible.

      • Does this Groovy implementation mean now the end of Jython? If Groovy is so "Pythony", is there a real need to further develop Jython?

        What are the relative advantages/disadvantages of Groovy over Jython?

        • The obvious advantage of Jython is that it is Python - so you get to use the existing Python code and libraries.

          If you just want a modern dynamic language that runs of JVM, there's no reason to go for Jython over Groovy. Groovy offers much smoother integration with Java platform and libraries, since it was originally designed to do just that.

        • Does this Groovy implementation mean now the end of Jython?
          If Groovy is so "Pythony", is there a real need to further develop Jython?
          What are the relative advantages/disadvantages of Groovy over Jython?

          I do not find Groovy to be very Pythony. To me Python seems like a language which has been painstakingly evolved over literally decades to conform to some clear simple principles which make developing software easier. And to me Groovy seems like a hodge-podge mish-mash of stuff thrown together to pro

      • There's also JRuby, which is much more complete than Jython (I believe). And yes, Rails runs on JRuby, and Rails+JRuby runs on App Engine.

    • I played a little with Groovy some time ago to see what the fuss was all about. Comparing it to Ruby is better than comparing it to Python because Groovy relies on closures in a way very similar to the way Ruby relies on code blocks. The syntax is also closer to Ruby with respect to the "everything is an object" philosophy (numbers have callable methods, etc.)

      The main problem I had during my small test drive is that Groovy has a lot of subtleties involving variable scoping that take a while to get used to a

  • but is this new? []

    Basically, GAE is a Google-hosted platform that can run applications written in Python. (Other languages â" such as PHP, Java and Ruby â" are being considered.) With the downloadable software development kit (SDK) and a copy of the Python runtime, you develop your application on a local machine and then upload it to Google. Google will run the app and worry about bandwidth, CPU and storage issues. Google provides a dashboard that allows you to keep track of how often the applicatio

  • I'm curious to know which api's they support.. Sounds like only servlets and mail.. I wonder if its a complete J2EE container, which is pure bloat. Also do they have any standard sql functionality in their hosting solution?

    • by nothing2seehere ( 1496253 ) on Wednesday April 08, 2009 @01:38PM (#27506129)
      Reading TFA, it looks like a scalable servlet container. No J2EE as far as I can tell.
      • Re: (Score:1, Interesting)

        by Anonymous Coward

        if they can get as functional as tomcat then you can run Spring on it. That counts as J2EE. They also have this thing called Grails [] which seems to be a web-dev system built around Groovy.

        • Spring isn't really J2EE. It will be with the new J2EE because (I believe), they will make the spec more modular, in that you won't have to have a EJB container. Spring does a bunch of crap, but what most people mean is that it is a light weight container that doesn't require a EJB container to run in. On a personal note why is it that the Spring fanboys are such jerks. I really want to love Ruby and Spring but man their fanboys really wear on me.

          None the less, this is fantastic news! Thank you Google.

          • I don't understand the love of Spring. One of Java's core strengths is supposed to be strong static typing, which lets you catch a large class of errors at compile time instead of run time.

            When you move larger and larger amounts of your application into XML files and replace explicit class references with dependency injection, haven't you just tossed that out the window? At some point don't you decide that Spring has taken you so far away from Java itself that your real solution is a different programm
      • by daBass ( 56811 )

        Servlets are part of J2EE, not Java SE. So is JPA.

        By definition, any servlet container is a J2EE implementation.

        When does something become "J2EE"? Session Beans? They are nice for client server apps, but their use in a web stack is rather limited and adds tons of overhead. POJOs, JPA, Servlets and an MVC framework will suit me just fine.

    • According to the linked page, it isn't a complete J2EE implementation, which kind of makes sense given the threading and io restrictions specified.

      Also, no SQL. Data access is mediated through JDO or JPA. Which also makes sense, given that it's highly likely that the back end isn't a traditional RDBMS.
  • by WankersRevenge ( 452399 ) on Wednesday April 08, 2009 @02:39PM (#27507099)

    I'm not sure I fully understand the reason for Groovy? I've read a lot of the documentation, but it doesn't answer the fundamental question ... as a java developer, why would I learn this language when I can just use java? Is it just for the new language features? Can someone illuminate?

    • Re: (Score:2, Informative)

      by Anonymous Coward

      Java is my main language, but I definitely see the value in Groovy. For instance, how do you pass functions or other code blocks around in java? You either use very clumsy and verbose anonymous inner classes, or.. or nothing. Groovy handles this gracefully.

      Basically Groovy is a scripting language that lets you use java classes. It's not really much different than Jython or JRuby, it's just more java-like in syntax.

    • by Yold ( 473518 )

      RTFA, its from meta-programming! How else would you write meta-programs to run on GAE in the cloud? Just kidding =).

      Although I could be way off, I'd assume it allows end-users of your web-app to script additional functionality onto it.

    • To the extent Groovy is a "superset" of Java, it is a way to have a shell for doing things in Java without having to build; just type in commands at the prompt, or stick them in a file. One way to look at things might be to think of Java as a way to have compiled Groovy, sort of like Cython [] is a way to have compiled Python. Whether or not the extra non-Java features Groovy provides are worth using... that is debatable.


    • Re: (Score:3, Informative)

      by dfdashh ( 1060546 )
      I was forced to learn it for the job (Quest Foglight uses Groovy for its internal ruleset), but I ended up liking it for its:
      • Interactive console
      • Perl-like regular expression support
      • Optional typing
      • Support for "for i in $array" syntax
      • Support for "for i in $array" syntax

        Agreed with most of your points, but this one has at least been improved in Java (6?) with:

        MyObject[] myObjectArray;

        for ( MyObject o : myObjectArray ){

    • by jekewa ( 751500 ) on Wednesday April 08, 2009 @04:23PM (#27508913) Homepage Journal

      Still funny.

      Groovy is to Java as PERL is to C. Many similarities, plenty of points of comparison, some interactivity, arguably some interchangeability. It is not a "super set" or even an extension. It's a new language, written in another language. It's a scripting tool, written in Java, that optionally generates Java for execution not in a Groovy engine.

      It doesn't give you "compiled Java" any more than Java gives you compiled Java, and other tools (like gjc) give you native executables from software written in Java.

      It's got good. It's got bad. It's new. It leverages old. If you're going to use it, you've got to learn it.

      No magic, just different.

      • by jjohnson ( 62583 )

        This is ./. We don't want your cogent analogies and your evenhanded, unhypeful treatment here. If one half of your X technology vs. Y technology comparison isn't "users of X will burn in hell", then this is no place for you, and you'd better be moseying along, lest something unfortunate were to occur, you filthy centrist.

      • by flumps ( 240328 )
        I've been delving into Groovy... it's a paradigm shift and it's very hard not to be so verbose.

        It isn't, as the article suggests, a superset of Java .. there are things you cannot do in it (yet) but lots of things you can.

        What I mainly thought when I saw it was "finally, Java has caught up with the rest of the programming world and has a scripting language at last".

        When I used it, it became apparent that this was more than a perl to meet C's needs. It was like the cheeky bastard child of Java who
    • as a java developer, why would I learn this language when I can just use java?

      Dude, like, because it has a totally groovy name! ~

      Seriously though, mostly because it has some nice language constructs and syntactic sugar for stuff that is painful in plain Java. If you've ever coded in Python and Ruby, you know what I mean. If you haven't, then you should probably give it a try - getting stuck with a single language, even if presently the most popular one, isn't good for career in long-term.

    • Re: (Score:3, Informative)

      Dynamic languages are gaining popularity extremely fast for a whole host of reasons. If you haven't used a dynamic language then you probably won't understand why they are attractive very easily, but if you have it will probably seem obvious. They do have a lot of downsides and I think the jury is still out to some extent whether the reams of code now being written in them is going to be maintainable down the track.

      Groovy is Java made into a dynamic language and with innumerable convenience features adde

  • by heroine ( 1220 ) on Wednesday April 08, 2009 @03:27PM (#27507917) Homepage

    Surely there is a way to make Java even less readable than Groovy. Maybe make the entire language pure regular expressions or allow every character including the . to be an object.

    One outcome of Sun's future liquidation is that no-one is around to promote the 1 Jesus language & Java ends up fragmenting into thousands of derivatives like Linux or Fortran.

  • They would be better served if they offered scala support. I notice a movement toward scala/groovy code frameworks vs. the Ruby/PHP ones lately.

    Then again, Groovy is very popular now, where as Scala is becoming (as per the twitter announcement yesterday).

    • by pohl ( 872 )


      - Scala works out of the box.
      - Scala Actors do not work, because they are implemented using Threads (which are not supported).
      - The Lift web framework does not work out of the box, because it depends on Actors and JDBC.

"I prefer the blunted cudgels of the followers of the Serpent God." -- Sean Doran the Younger