What’s new in Groovy, Grails & the G3 summit

This week I sit down with Ken Kousen (Kousen IT, Groovy Podcast) and Jeff Brown (OCI) and we talk about what’s new in the world of Groovy, Grails as well as their plans for the upcoming (G3 Summit).

Full Transcript:

[background music]

Michael Carducci:

You’re listening to the "No Fluff Just Stuff" podcast, the JVM conference series. With dozens of dates around the country, there’ll be one near you. Check out our tour dates at nofluffjuststuff.com.

This week, I’m joined with Ken Kousen and the legendary Jeff Brown.

Jeff Brown:

Good morning. How are you, sir?

Michael:

I’m good. We’ve got the G3 Summit coming up, and I thought this would be a great opportunity to get these great minds in the Groovy Grails space to talk about what’s going on a little bit. I know 3.2 just shipped a couple of weeks ago.

Jeff:

That’s right. We shipped Rails 3.2 last week or the week before. That’s correct.

Michael:

What’s new in 3.2?

Jeff:

3.2 is the latest major release in the Grails 3 line. What’s new? We released an Angular Scaffolding plugin, so you can generate thread scaffolding for your Angular application in Grails 3 now. There are a number of significant improvements in GORM.

GORM, in particular, is an area where we’ve been making a lot of innovations lately. We have support for RxGORM, is new in GORM 6, which is the version of GORM we just released. We’ve released multitenancy support for GORM.

Multitenancy support supports all three modes, so you can have a database per tenants. You can have a schema per tenants, or you can have a single schema for all of your tenants, and then a discriminator is used. There’s a lot of flexibility around all that.

GORM, in particular, is one of the areas where we’ve made a lot of innovations lately. We support a wide array of databases, not just relational databases, with Hibernate, but also neo4j, MongoDB. Exciting stuff.

Ken Kousen:

You’ve also got JSON views in there now, right?

Jeff:

JSON views, yep. That’s great stuff. The JSON views is a technology that we released earlier this year for describing the structure of the JSON response in a DSL kind of way that’s statically compiled and statically type checked, and really expressive.

It’s a lot more impressive to look at than to talk about, but it’s a great way, a really flexible way to describe JSON responses.

Michael:

I’m going to go back, just because of something that’s really interesting to me, and I apologize if it’s too much of a tangent. The multitenancy in the latest GORM, essentially you would construct your queries as you would, and you don’t think about it, and then the configuration of GORM.

The configuration essentially would dictate how it processes that under the covers.

Jeff:

In short, that is correct.

Michael:

I have an application that’s single instance, multiple tenant, and so I have to make sure that all of the database calls go through the proper channels, and that you remember to always go and process it that certain way.

I’ve always felt uncomfortable with that. Any time you have to remember to do something, to do it right, I feel like I’m doing something wrong. I think that convention over configuration…

Jeff:

Right, convention over configuration. Yeah, GORM 6 is going to simplify a lot of that for you.

Michael:

That’s wonderful. I didn’t mean to take everything off track, I just thought that was kind of interesting.

Jeff:

I’m happy to talk about GORM.

Michael:

Then the Rx stuff, that’s kind of move towards more of the reactive things going on. Is that…?

Jeff:

That’s right, built on top of RxJava, which is more and more popular all the time, so we felt it was important to start growing our support around that in the framework. GORM 6 is one part of that.

Michael:

You also mentioned Angular. I know big excitement in the Angular space still, especially with the release of Angular 2. Presumably, the scaffolding is geared around Angular 2. Is that correct?

Jeff:

It is not. A few months ago, we released an Angular profile for Grails 3, and that profile leverages Angular 1. As we were building that, Angular 2 still had not been released GA. It was released a month or so ago.

Ken:

Something like that.

Jeff:

Somewhat recently. The application profile was built with Angular 1 as is the Angular Scaffolding that we released. It’s all Angular 1, and work is underway now to build Angular 2 counterparts for all of that.

Michael:

If somebody in the community wanted to contribute, that’s something that there’s an opportunity to do that?

Jeff:

Absolutely. All of the technology that we’re talking about is all 100 percent open source. It’s all on GitHub. We welcome contributions. Yeah, most definitely.

Michael:

Historically, one of the things that, I guess I struggled with the server side part of the building services to support that. I ended up looking more down the lines of Spring. Is that a little easier to do in Grails 3, too?

Jeff:

Yeah, that works out quite well. Grails has really great support for publishing REST services, and that’s really what you need for the back end for the Angular application. Lots of folks want to build the front end with Angular and publish there, build the back end with Grails 3, and the framework is really well-suited for that.

The Angular profile that we introduced earlier this year makes it very easy to get started with that. You create a new Grails 3 application and express that you want to use the Angular profile, and what’s created for you is all the stuff that makes sense for publishing REST services.

All the stuff that makes sense for building your front end in Angular. We wire all the basic stuff up for you, and give you a really good starting point.

Michael:

Great. That sounds wonderful. Other new things, Ken, I know you’ve always been a passionate Groovy supporter, Grails, too.

Ken:

I was wondering where you were going with that. OK.

[laughter]

Michael:

I know you’ve always liked Groovy. You promoted it. You’ve evangelized it a little bit on the tour. Are you doing much Groovy content this week in Chicago?

Ken:

They didn’t schedule me for much for that. I’m doing much more Java 8 stuff this weekend. At the G3 Summit, I’ll be doing some Groovy stuff there, and of course, by the way, geb, the G-E-B kit just came out with their 1.0 release. They just went 1.0, I think it was last week.

Geb’s a browser automation tool, so if you’ve used…I think it was called selenium for a while, and now called Web driver. This is really a nice Groovy DSL on top of that, with a page model attached to it. It makes it very powerful to do browser automation, both for testing and for automation in general. It’s a very powerful tool.

I’ve got a talk on that. Also, there’s several talks on Ratpack, which seems to be gaining more attention. Ratpack is asynchronous. It builds on Netty. It’s really good for microservices, again, just as Grails is. They also use Java 8. They require Java 8, which is interesting.

Not too many APIs require that yet. They do a lot of asynchronous reactive stuff inside there as well. We had a discussion recently on a Groovy podcast with Dan Woods, you know, danveloper, talking about the differences between the reactive approaches in Grails versus Ratpack versus…

Apparently, the Spring framework in 5 is bringing in, what is it? Project Reactor, I guess they call it? Is that going to propagate into Grails, ultimately, since it’s still built on the foundation of Spring, or haven’t you made any decision about that?

Jeff:

We are building more and more Reactive support in the framework, but the details of how that will relate to the Spring stuff is geb.

Ken:

I think they’re still debating some of that. I know they’ve adopted Project Reactor, but they have hooks for RxJava and things like that as well. I did manage to give a couple of Groovy talks at JavaOne a couple of weeks ago, specifically talking about Groovy with Java 8.

Seeing that Java 8 has added a lot of functional capabilities, but Groovy still has more, things that you can augment and really cool AST transforms like Memoize, trampoline, TailRecursive, and stuff. You’re doing some AST transforms this weekend, right?

Jeff:

Yeah, here. We’re in Chicago at the NFJS show, and later today, I’ve got a 90-minute talk on runtime metaprogramming with Groovy, and then another one on compile-time metaprogramming with Groovy, and then a talk about Grails 3 for Spring boot developers, but the first two are all about Groovy metaprogramming.

The metaprogramming stuff in Groovy, I think, is among the coolest, most powerful parts of the language. All of the really powerful stuff, a lot of the really powerful stuff in Grails relies heavily on Groovy’s metaprogramming in one form or another. That’s stuff that I love talking about.

Ken:

They have the features in Groovy that you don’t normally find in other languages, like traits, for example. Again, compile-time, it allows you to have interfaces that have state and behavior in it. Java 8 has interfaces with static and default methods in them, but you still can’t have attributes or anything like that.

In Groovy, you’ve got traits now, which really blurs the distinction between an interface and an abstract class, or anything like that. It’s a very powerful mechanism.

Jeff:

We leverage traits a lot in Grails, in Grails 3, in particular. Often, you don’t see them as the application developer, but all of the artifacts in a Grails 3 application with your controllers and services, that compile-time, we make those things implement corresponding traits.

There’s a controller trait, and a service trait, and a [inaudible 9:44] trait. Those traits are how all the so-called magic properties, methods, and things, are added to your artifacts, and because it’s all being rigged up by compile-time, there are lots of benefits over that approach, compared to the way that it used to work, which was all runtime metaprogramming.

Ken:

Sometimes people worry that with all the runtime metaprogramming and things like that, that Groovy may wind up being a little slow, which it wasn’t even then, but the more you can move the compile-time metaprogramming with AST transforms, traits, and things like that, the more you alleviate any concerns about that. That performance is really, really good.

Jeff:

I agree with that.

[laughter]

Michael:

Jeff, you’re a big wheel at OCI, and OCI’s doing a lot of great things for the Groovy and the Grails community. What are some of the things that are going on there? I know, in addition to the work that you actually do, you’ve taken the mantle, as it were, for that space. Was there any developments in that area?

Jeff:

Yeah, there’s quite a bit going on. We got the practice started at OCI about a year and a half ago, and on day one, there were two of us. That was Graeme Rocher and myself. Today, there are 14 of us. We’re investing heavily in the technology, and doing lots and lots of project work, lots of innovation in the framework, and surrounding stuff like plugins, profiles, and so forth.

We’ve been shipping lots of releases. When we released Grails 3.0 about a year and a half ago, we made the conscious decision to start shipping smaller, more frequent releases, and that has worked out really well. I think in the first year, we released something like 30 releases of the framework, which is great.

Something in particular that’s happened just recently that’s exciting is we have recently hired Paul King to join the team at OCI to work on Groovy. That’s a really big deal. Paul, of course, is one of the most important contributors to the language over the years.

We couldn’t be more excited or happier to have him on board. That’s going to help us accelerate the evolution of the language. It’s going to help us do some things with Grails that might not otherwise be as easy to do.

We’re really happy to have Paul on board, and are really excited to start accelerating progress around the Groovy language.

Michael:

Right on.

Ken:

Another cool part of that is that, of course, Groovy became an Apache project, so it’s now open sourced through the Apache Software Foundation. There weren’t any Groovy core team members being funded directly to work on the language.

Everybody had different jobs. Some worked at Gradle, some worked at OCI, some worked at various other places. Paul is now going to be full time, working on the language, just in support of the Grails development at OCI, if I understand it correctly.

Jeff:

Yeah, as I said, we’re really happy to have him on board.

Ken:

That’s phenomenal.

Michael:

Yeah, that’s wonderful.

Ken:

That’ll help the language, too. I think Paul, for several years, was the number one committer on the language. I think Cédric Champeau was then employed by Pivotal to be a Groovy committer, and I think he went ahead of Paul, but now I think it’ll reverse again. We’ll see.

Michael:

Exciting. We’ve got the G3 Summit coming up in November, right? The tail end of November, I think, the 28th, 29th?

Jeff:

It’s the last day or two in November, and then the first few days in December. I should have the dates in my head, but I don’t. I think it’s November 29th.

Michael:

That sounds right. You’re both there, and that’s shaped up to be an exciting conference. I’ll be there as well, actually.

Ken:

I think most of the Groovy core people will be there. I think…

Jeff:

Yeah, it’ll be a super strong team. We’re really looking forward to it. Of course, this is the first G3 Summit. It kind of is, and it kind of isn’t. In years past, we’ve had SpringOne 2GX. The 2GX part was the Groovy Grails part of SpringOne, and G3 Summit, in some ways, is that, just separated from SpringOne now.

All of the most important players in Groovy and Grails, Gradle, and the whole G communities will be there. I’m really excited about it.

Ken:

I think Guillaume Laforge will be there as well.

Jeff:

I think you’re right.

Ken:

And Graeme Rocher, of course.

Jeff:

A whole bunch of the OCI team will be there. I think 10 or 12 of us, something like that, will be there. We hope folks will come out and learn about what’s new and exciting. We’ll be making announcements about some things that we’re working on that haven’t been released yet. There’s some really exciting cool stuff there.

Ken:

Oh, teaser.

Jeff:

Teaser, yeah.

[laughter]

Jeff:

As I said, I’m really looking forward to it.

Michael:

I’ve got a list of the speakers right here, actually. Graeme Rocher, you’re there, [inaudible 14:23] , Paul King, Ken Kousen, you’re there, Dan Woods is there. It’s a great lineup, actually, looking at it. Definitely, if you’re in that space, definitely check out. I think the website is g3summit.com.

Jeff:

G3summit.com.

Michael:

And then number three. I’m going to thank you all for your time, and I look forward to seeing you again in Florida in about a month and a half?

Jeff:

Yeah.

Ken:

Wow. That’s it, yeah, right.

Jeff:

That’s about right. It’s about six weeks away.

Michael:

Yeah. We’re running out of 2016.

Ken:

Yeah.

Jeff:

I think we should mention that the early bird registration discount ends at the end of this month.

Michael:

I think you’re right.

Jeff:

This month being October.

Michael:

This is going to go out this Wednesday, actually. This is a real short turnaround for this.

Ken:

Now you’re committed. You just put it on the recording.

Michael:

I put it on. I can always edit that out.

[laughter]

Jeff:

Like magic.

Ken:

Yeah, but you won’t. That would be work. You’re just going to put it up there, right?

Michael:

Yeah, pretty much.

[laughter]

Michael:

The early bird discount is save $150 through October 31st, so don’t miss out on that opportunity to get in with the best rates. I look forward to seeing you all there.

[background music]

Jeff:

Thank you very much, Robert Michael.

Ken:

Thank you.

Michael:

Thank you.

[laughter]

Michael:

Take care.

At No Fluff Just Stuff, we bring the best technologists to you on a road show format. Early bird discounts are available for the 2016 season. Check out the entire show lineup and tour dates at nofluffjuststuff.com. I’m your host, Michael Carducci. Thanks for listening, and stay subscribed.

Leave a Reply

Your email address will not be published. Required fields are marked *

*