Grails 1.0 Released: Productive Web App Development on the JVM


News: Grails 1.0 Released: Productive Web App Development on the JVM

  1. The Grails team and G2One, the Groovy/Grails professional services company, have just released the final 1.0 version of Grails, the agile web application development stack, built on best of breed Open Source components such as the Groovy dynamic language, the Spring framework, and the Hibernate ORM solution. In this final version, Grails brings new features on board:
    • GORM DSL for advanced Mappings: The Grails Object Relational Mapping built on top of Hibernate adds a Domain-Spcific Language that reduces the need to fall back to traditional Hibernate mapping. The DSL allows customization of table and column names, inheritance strategy, second-level cache configuration, Id generation strategy, composide Id support, eager/Lazy loading, database indices, and custom Hibernate user types.
    • Support for easy to use Filters: Grails has up until now supported interceptors that can be used within controllers. Filters however offer a more powerful way of defining cross cutting concerns.Filters can be applied to an entire controller, only specific actions or entire URI spaces.
    • Content Negotiation support: Grails now supports content negotiation via the Accept/Content-Type HTTP headers, a parameter or URI extensions. Mime types can be configured in Grails' Config.groovy configuration file.
    • REST support: JSON and XML requests can now be automatically unmarshalled via the params object.
    More details can be found on the official release notes. Also worthy of notice beyond a static feature list, the Grails team worked on a very complete and thorough new documentation to help Grails users get the best out of the framework. If you haven't tried Grails yet, Scott Davis recently published an excellent article to get you started with Grails on IBM DeveloperWorks. Even though Grails wasn't released by the time, many companies have successfully deployed Grails applications in production, as Graeme Rocher, Grails lead, explained in a recent interview on InfoQ, such as major French broadcasting and media companies, a top Human Resources company in the UK, or by SAP's Composition on Grails project which allows people to quickly build composite applications on SAP NetWeaver 7.1. Startups have also picked up and leveraged Grails to build scalable FaceBook applications with a classifieds service (a reverse classifieds concept), and a friendly application to find friends and places for a beer, and some people also built an innovative online community multi-media and story tool with Grails. Last but not least, Enotions Ltd has built several Grails-powered sites for different PepsiCo brands. The blogosphere is abuzz with the announcement of the release. Paul Krill, columnist at InfoWorld says:
    With Grails, Java and Ruby developers get convention-based rapid development while leveraging existing knowledge and capitalizing on APIs Java developers have used for years.
    While blogging about the release, Matt Raible underlines that:
    For companies that have invested a lot of time and money into the JVM as a platform, it seems like Grails is the clear winner over Rails.
    Steven Devijver, one of the original Grails founders, mentions on GroovyZone, the new community news site dedicated to Groovy and Grails, that:
    For [him] Grails is the ultimate rapid prototyping platform for Java. [He's] built numerous applications by dropping in existing Hibernate-configurated classes and generate scaffolding views. It gets you started really quickly and helps you to focus on the application you're building.
    A key element in the agility of Grails comes from its choice of the mature and powerful Groovy dynamic language as the core glue to tie all the layers together. Back in december, Groovy 1.5 was released, making the headlines with its new features, covered extensively on InfoQ, and performance improvements. Groovy has also been noticed to be becoming more popular and widespread on the TIOBE index, ranking Groovy as the 31st most popular language, coming from the 66th rank 6 months earlier, and over 100th a year before. Also, Groovy has proven to be a viable and mature platform on its own, as several success stories have shown over the past few years, in various sectors:
    • in financial institutions to handle million-dollars hedge funds or to customize advanced trader desktop applications,
    • in a US Fortune 500 insurance company, Mutual of Omaha, where Groovy is used as a business language in a risk calculation engine for insurance policies,
    • in a top major American credit card company,
    • or in the health sector, for the US National Cancer Institute, where Groovy checks, fixes, and validates patient file details, and in bioinformatics, for crunching genenome data sources.
    If you want to learn more about both Groovy and Grails, beyoned the existing titles such as Groovy in Action and The Definitive Guide to Grails, new books are hitting the shelves in the coming months:Beyond books, the NoFluffJustStuff crew is organizing the first major North American conference dedicated to Groovy and Grails, the 2G Experience. The conference takes place in Reston, Virginia, near Washington DC, on February 21-23. As the site puts it:
    You will learn about rapid application development with Groovy / Grails and network with other developers who are redefining the way web applications are developed on the Java platform.
    Among the numerous reknowned speaker and Groovy / Grails contributors, Venkat Subramaniam speaks about his upcoming sessions on Domain-Specific Languages in Groovy, and testing techniques in Groovy, Neal Ford is interviewed on his slots about Design Patterns in Groovyn and a comparison of JRuby and Groovy, and Jason Rudolf gives more details on his presentations on advanced usages of the GORM layer. (Of course, it shouldn't go without note that TheServerSide Java Symposium covers Groovy as well: one example is Scott Davis' presentation on Metaprogramming (Or: The Groovy Way to Blow a Buttoned-Down Java Developer’s Mind). We look forward to seeing you there.)

    Threaded Messages (15)

  2. Congrats and Thanks![ Go to top ]

    Congrats on 1.0 and thanks for all your hard work, I'm happily using grails.
  3. Thank you![ Go to top ]

    As a user since 0.4 I want to congratulate the entire G2One team behind Grails for this very important release, thank you for your hard work.
  4. Step into the next Generation[ Go to top ]

    I have been using Grails since 0.4 and it is awesome. This is how i see it: Ruby on Rails a is prototype "proof of concept" that showed us how to do Rapid web development. But it was never really taken seriously. Grails however is the industry strength version of that vision. Grails provides all the core ideas that RoR gave us but just elegantly packaged them into the robust world of Java. 10 reasons why i love Grails: 1: Its all just Java on a JVM under the hood. 2: Its all just Spring hibernate etc under the hood. 3: The Grails abstractions are simply amazing (GORM, Controllers, Domain Models) 4: All Grails projects have the same elegant structure. Hit the ground running familiarity. 5: Its all about the details. Simply when building a web based application 99% of the things you want to do are standard thing done that have been done a thousand times before. Grails makes is so unbelievably easy to do them it is like coding with your eyes closed. 6: GORM is simply amazing. 7: Environment setup and configuration. Want production configuration. Simple as flicking a switch. 8: 99% of my time is spent on building my application not plumbing the framework. 9: Once you are in the "groovy-grails zone" thing just flow like using the force. Most things are are just one line away. Eg want you output in XML then type "as xml" want it in JSON then type "as json" 10: It is fun. Web development is actually fun fun fun again. Pete
  5. This is a great news, something I have been waiting for months. Congratulations to the team. My experience with upgrade to RC4 from RC3 hadn't been the greatest and had issues in deployment to tomcat. Will surely give this a try. -Shailesh Now, test management is a breeze
  6. Grails is worth a try for anyone[ Go to top ]

    I've been using Grails for the past month. I did a project in Rails and was very disappointed with it, primarily 'ActiveRecord' and deployment. I was also disappointed that the plugins had a high likelyhood of conflicting with each other and were in some cases sensitive to the mode (dev/test/prod) due to the use of the cache. The language itself (Ruby) is gorgeous, but the lack of any type of type checking made for great pains when making larger 'refactoring' type changes to the codebase. I had been very skeptical of grails, primarily because of the trouble with groovy in the days when it was being inducted into the JCP. However, Grails is the most amazing development experience I have ever had. Running as basically a light framework over Spring/Hibernate means it has all the power you could ever want in a framework that is probably about 2/3rds as pleasant as Rails, and much more deployable. My experience has got me wondering if 24 months from now Grails will be the standard way to build Java web apps just like Hibernate superseded EJB as the semi-official data access technology. Grails (and Groovy) is an incredible technology that everyone should try!
  7. Google's RnR[ Go to top ]

    check this link/webcat Its seem google is dedicating some developers to work on a soon to be open source project called Rhino-on-Rail, Rhino is of course a JVM Javascript implementation On a slighly different issue, how does Javascript's integration with Java code/libararies differ or compare to Goovy, any idea!
  8. Don't see advantages of GORM[ Go to top ]

    I was looking at GORM yesterday. I just don't see the advantages of it over just using Hibernate Annotations + JPA annotations. Is seems like you're entering more metadata on the GORM side and it is less readable. Since Groovy supports annotations, why not just take that approach and make Groovy-specific improvements built on the annotations? Annotations in themselves are DSLs. FYI, I'm not trying to FUD this. It *is* based on Hibernate, so why would I care? I just seriously don't see the benefit of using this DSL when I already have better readability and expression with annotations. -- Bill Burke JBoss, a division of Red Hat
  9. Re: Don't see advantages of GORM[ Go to top ]

    [...]I just seriously don't see the benefit of using this DSL when I already have better readability and expression with annotations.
    I suppose partly for consistency across things like validation of domain classes, and partly for brevity: Wallet wallet static hasMany = [cars:Car, pets:Animal] instead of: @OneToOne Wallet wallet; @OneToMany Set cars; @OneToMany Set pets; //+ getters and setters (in Java, not in Groovy) But it's not a huge advantage over annotations when you look at mapping alone. Besides, you can write your domain classes using Groovy /Java + annotations and still get the benefit of dynamic finders and scaffolding.
  10. Re: Don't see advantages of GORM[ Go to top ]

    But it's not a huge advantage over annotations when you look at mapping alone. Besides, you can write your domain classes using Groovy /Java + annotations and still get the benefit of dynamic finders and scaffolding
    Dynamic finders seem sorta useful. Scaffolding though is available through Hibernate Tools and Seam Gen. i don't know enough about the Grails front-end model to compare though.
  11. Re: Don't see advantages of GORM[ Go to top ]

    But it's not a huge advantage over annotations when you look at mapping alone. Besides, you can write your domain classes using Groovy /Java + annotations and still get the benefit of dynamic finders and scaffolding

    Dynamic finders seem sorta useful. Scaffolding though is available through Hibernate Tools and Seam Gen. i don't know enough about the Grails front-end model to compare though.
    Hi Bill, As previous posters have said you can use annotations, old-style XML mapping or GORM mappings its up to you. We decided to do GORM, because a) For a lot of people annotations are butt ugly, I'm included in this camp b) We wanted to support Java 1.4 VMs without retroweaver nonsense As for the benefits beyond the mapping here are some: a) Completely transparent persistence methods b) Dynamic finders, ie never write a DAO again c) Transaction management built on Spring (i'm not going to go into an argument over Spring vs JBoss, but there you go) d) A DSL for constructing criteria e) An events system that makes Hibernate interceptors easier to grok f) Validation constraints using a declarative DSL Lastly, just wanted to say thanks to the JBoss guys and the Hibernate team (Gavin & Emmanuel) in particular for their great support during the development of Grails. We got deep into the depths of the Hibernate source in corners not often visited by mere mortals and you guys were super helpful when we got stuck. Cheers!
  12. Re: Don't see advantages of GORM[ Go to top ]

    I've used grails for one project. Here are a few GORM features I like. 1) additional functionality via dynamic methods.
    def books = Book.findAll("from Book b where b.title = 'blah')
    2) no getters and setters!! 3) dynamic constructors.
    def b = new Book(title:'Foo',author:'Bob')
    4) You can use an existing JPA model. GORM will still provide dynamic methods and constructors. 5) entity state change methods "" and "entity.delete()" with validation built in. 6) Not that it's a huge chore with JPA, but relationships are a little easier to map with GORM. There are a lot of reasons to use Grails beyond the features of GORM.
  13. Great News[ Go to top ]

    I've been using grails since last summer and have been singing it's praises ever since.
  14. Nice but 1.0?[ Go to top ]

    I really like the concept and a lot of the stuff in Grails. But for me, after installing it into a plain vanilla Java 1.5 environment "grails generate-all" bailed out with an exception....not really the kind of thing that raises my confidence level....
  15. This was a bug in 1.0 fixed in 1.0.1[ Go to top ]

    I moved from an RC to 1.0 and the generate-all script failed. It was found quickly and patched in 1.0.1. Give it another try...
  16. Multiple Data Sources[ Go to top ]

    I've been looking into the various "agile" Web development environments. They seem to be straightforward as long as your configuration consists of a single data source. However for most of the projects I see, this is very seldomly the case. Even in a simple shopping solution, customer master data quite often is a different data source than catalog data than transaction data. How do agile frameworks handle this kind of situation? How does Grails?