Tales from the jar side: I miss Grails, An upcoming GOTO podcast, and ABBA is back
In the immortal words ascribed to but certainly not from Yogi Berra, "Nostalgia ain't what it used to be."
Welcome, jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of August 29 - September 5, 2021. This week I taught a full-day NFJS workshop called Deep Dive Into Spring and a half-day NFJS workshop called Gradle Concepts and Best Practices. Both went well and were quite enjoyable.
If you’re not one already, please consider becoming a jarhead by subscribing to Tales from the jar side using this link:
Podcast Coming
A few weeks ago I was a guest on the GOTO Book Club podcast/screencast. This week, they released a teaser on their YouTube channel:
My friend Trisha Gee was the host, and we had a great discussion about many of the topics covered in Help Your Boss Help You. The full video will be released on September 9, so I’ll say more about it next week. The teaser is only about a minute and a half long, though, so you’re not making too much of a commitment by checking it out. :)
I Miss Grails
If you spend time in the technology world, you eventually run into a rather sad fact of life: the best technology doesn’t always win. A cynical example I often used was to say if the best technology always won, Microsoft would have gone out of business years ago. This week I ran into this problem, a lot.
A bit of history first, to give you an idea how this happened. Around 1999, the Java programming language had grown to the point where it contained dozens of separate libraries and capabilities and figuring out how to put them together was already a challenge. It longer felt realistic to have one single Java specification; you needed a spec for many different topics, like security, and transactions, and persistence, and message queues, and email, and many other so-called services that most significant applications needed. Sun (now a division of Oracle) therefore came up with an overall specification called Java Enterprise Edition, which encompassed those and several others. (See a short history here.) A program that implemented them all was called an application server, and a developer would write an application, declaratively ask for the services they wanted from the app server, and deploy it. The goal was to provide services on demand, so you a developer could ask for a service through metadata (i.e., data about the data), and the server would implement it for you.
An example would be transactional support when dealing with a database. Say you were writing an ecommerce app, and you had to implement the checkout functionality. That meant you had to:
Look up the customer to see if they got a preferred discount
Change the number of products in inventory
Creating a shipping object to send the products to the customer
Charge the customer’s credit card
Oops! The credit card failed! Then you would have to unwind (or, in transactional terms, roll back) all the changes and cancel the order. Rather than implement transactional capabilities all by yourself, the idea in Java EE was to tell the server that the checkout method operated inside a required transaction, so it either all worked, or all the changes were rolled back. To do that, you supplied metadata, which in the early days was in the form of an XML configuration file, but later became annotation-based.
The problem was, the way the Java Enterprise Edition implemented method-level services involved a specification called Enterprise Java Beans (EJBs), which in the early versions were both complicated and slow. That’s not a good combination. Also, nobody really wanted to pay for an application server.
(Aside: For some reason, Oracle never really cared about the Java Enterprise Edition. They eventually gave it to the Eclipse foundation and renamed it Jakarta EE.
Why Jakarta? Jakarta is the capital of Indonesia, which resides on the island of Java.)
The open source world stepped in, as it often does. Instead of EJBs, you could use the Spring Framework for security, transactions, and more, and Hibernate as an object-relational mapping tool. Hibernate generates SQL for you that converts Java objects into database tables and back again.
Using Spring and Hibernate together, you didn’t need any commercial tools and could deploy into a web container, like Tomcat, which was also free.
The combination of Spring, Hibernate, and Tomcat became the definitive architecture for server-side Java apps in the 2000s, and even somewhat beyond.
In 2005, however, David Heinemeier Hansson announced Ruby on Rails, which basically said to all those Java people, “you’re doing it wrong.”
With RoR, you could build a complete application in about 20 minutes, without all those specs and tools and debates over metadata. The impact on the Java world was roughly comparable to the that of the asteroid that wiped out the dinosaurs. The only problem was that you had to rewrite all your code in Ruby, and that’s tough to do when you’ve got an entire infrastructure based on Java.
Also, Ruby is an interpreted language, so it had performance and deployment issues. So maybe rather than destroying the Java world, it’s more appropriate to say RoR was like seeing Halley’s Comet streak across the sky and responding, “I want THAT!”
To bring the ideas of RoR into the Java world, a handful of developers like Graeme Rocher and Guillaume Laforge created what the originally called Groovy on Rails, but later shortened to Grails and was released in 2008.
The beauty of Grails was that it was based on Groovy, which is a language that runs on the Java virtual machine, so it can use all existing Java libraries and infrastructure, but also makes it easy to streamline Java in many ways.
Grails was built on top of Spring and Hibernate, so if you knew either of those frameworks, again you were ahead of the game.
Back in 2007, I tried to learn Ruby on Rails, but it was too big a leap for me. Unlike so many of its fans, I found Ruby rather odd and off-putting, and the Rails community (unlike the Ruby community) wasn’t exactly friendly to newcomers. I gave it a few months at a low level, but eventually abandoned it.
Late in 2008, however, I attended a Java User Group presentation on Grails, and that changed the entire course of my career. I already knew the concepts behind RoR, and I already worked with both Spring and Hibernate, so you could say I was their target audience. By 2009, I was telling all my training company clients that Grails was going to be the next big thing, but for some reason it stubbornly took its time getting there.
The situation turned around in 2010, when a couple of major companies adopted Grails as their internal framework, and that’s when my business picked up. Training courses in both Groovy and Grails funded the majority of my work from about 2011 to 2014. I also wrote my Making Java Groovy book during that time, and joined the No Fluff, Just Stuff conference tour as a speaker on both topics. I even wound up giving the keynote addresses at Groovy/Grails conferences in New Delhi, India and in Copenhagen, Denmark. I also became cohost of the Groovy Podcast. Best of all, the community was filled with the most friendly, most humble brilliant people I’ve ever met.
In the mid-2010s, however, several things went wrong at once. The company behind the Spring Framework, an early supporter of both Groovy and Grails, changed their mind and abandoned it. That shouldn’t have mattered, and had very little impact on the actual technology, but it was a highly visible public relations debacle. Also, some early adopters of Grails (I believe LinkedIn was one of them) decided to go in a different direction. Without major companies backing them, the pace of change slowed, and developers stopped adopting either technology.
A bit later, Spring improved itself dramatically by introducing Spring Boot, which made it much easier to create and configure apps. Java improved as well, with the addition of functional features. The rise of the cloud and of mobile devices, meant that developers wanted only to build what they called microservices, and Grails was viewed as a way to create monoliths, which was seen as a bad thing, even though it really isn’t.
Groovy eventually wound up as an Apache project, which is a good thing, but adoption is pretty sporadic. Even the core Grails team went on to build a microservice platform known as Micronaut, based on all the lessons they learned from Grails.
The bottom line is that, for me, I haven’t had a company ask for a Grails training course is at least five years, and my last Groovy course involved how to use Groovy with Spring, which was cool, but even that market dried up.
At last, that brings me to this week. Over the past few weeks I’ve been putting together a training course on Spring Data JPA, which is basically Spring with Hibernate again, and is scheduled for this coming Tuesday. I needed an example to work with, so I took one of my old Grails applications and decided to port it over to Spring Data.
(If you know my sense of humor, you won’t be surprised to hear the name of my old Grails application was The Quest for the Holy Grails. Of course it contained many, many Monty Python references.)
I’ve learned a lot this week about the Java Persistence API (JPA) specification and Hibernate, and a few more features of Spring as well. But I have to say this: I could rewrite my entire Java/Spring/Hibernate example in Grails in about one-tenth the time, using less than one quarter the number of lines of code, with more capabilities, and equal or better performance. I feel like I’ve given up a Maserati for a Yugo, or at least a Toyota Camry, much of which I’ve had to build myself. I constantly have to stop myself from saying, “but we could do it this way, and it would be so much easier!” It almost breaks my heart.
I have my own theories about why Grails, or even just Groovy, peaked and went into a decline in the industry. The latest statistics suggest Groovy is still in the top twenty of programming languages, but at this point that’s arguing over scraps.
Both Groovy and Grails are active, though they’re both mature at this point so the changes are no longer dramatic. They aren’t going away. Maybe they’ll come back at some point. Right now, though, I’m stuck with doing things the Spring Data and Hibernate way, and it feels like coding with one hand tied behind my back and reminds me of what could have been and very nearly was.
ABBA. No, Really. ABBA.
Though I’m considered the very tail-end of the baby boomer generation (insert your own joke here), I’m really a child of the 70s. My formative years of middle school and high school were dominated by music from such hard-rocking performers as ELO, the Bee Gees, Queen, Olivia Newton-John, and even Barry Manilow (who had 11 different Top Ten singles during that era — seriously, look it up). Billy Joel’s The Stranger was considered cutting edge. Wings was at the height of their popularity, and Band On The Run played constantly the summer I was 12. To give you an idea of the depths I sunk to, to torture my son while his friends were over I once admitted that no, I never owned a Tony Orlando and Dawn album, but I did own two Tony Orlando and Dawn 8-track tapes. Oof.
So of course I was a big fan of ABBA. How could I not be? I distinctly remember the release of Waterloo, Mama Mia, S.O.S., Fernando, and The Winner Takes It All (which showed exceptional depth after years of bubblegum pop). As a group, ABBA songs fit the singles model much better than conceptual albums, so I bought more than one of their greatest hits compilations. Also, when I visited London back in 2001, I managed to get a ticket to Mama Mia! during its run there. The guy next to me was in heaven and wanted to talk about how they were brilliant and the voice of their generation. I avoided saying that I liked them, but to me they were mostly a pleasant diversion.
(Fun fact: most people don’t realize that ABBA never did a US tour. I saw a record company executive on a documentary lament that fact. He was practically in tears about all the money they could have made but didn’t. I kind of respect them for that.)
I more or less grew out of that phase, though I must admit I will occasionally listen to “Dad Rock” from that era, but I can comfortably say the music industry passed me by. Arguably I missed it entirely, even when I was the target audience, but either way it’s been decades since anyone cared about what I liked or didn’t like.
But nostalgia is definitely a thing, and the boomers have been better at hoarding generational wealth than any age group before or since, so I should not have been surprised to find out this week that ABBA, the Swedish supergroup of my youth, had reunited to make another album, called Voyage.
They’ve released two songs so far. One, called I Still Have Faith In You, has an accompanying rather innocuous video, which is heavy on nostalgia:
The other is called Don’t Shut Me Down, and is a bit bouncier, but the video is just a static image at this point.
Are the songs good? Well, they sound like ABBA, and that’s a good thing. The harmonies are still there, and the voices don’t sound like they’ve aged too much, not like Paul McCartney, anyway, though they’re still a lot younger than he is. The songs are pleasant and easy to listen to, which describes most of ABBA’s catalog. The new songs are certainly not the best they’ve ever produced, but they’re not the worst, either, and after a 40-year break that’s saying something.
Will I buy the album when comes out? I’ll definitely stream it when it is released in November. Should you (or anyone) care what I have to say about popular music? Almost certainly not. (Remember that joke about the Tony Orlando and Dawn 8-track tapes? That wasn’t a joke, and if you’re wincing right now, yeah, me too.) I’m glad they’re back, and I hope they have another hit in them, unlike Sir Paul, who still can write pleasant songs but hasn’t had a great one in literally decades.
For jarheads only
Jarheads can get the ebook versions of Help Your Boss Help You at the Pragmatic Programmers using the coupon code 7bc968c446 at checkout for a 35% discount. The code is good until the end of September, 2021.
If you’re not a subscriber, that’s fine. You get to use the coupon too.
As a reminder, you can see all my upcoming training courses on the O’Reilly Learning Platform here and all the upcoming NFJS Virtual Workshops here.
Last week:
Deep Dive: Spring and Spring Boot, an NFJS Virtual Workshop
Next week:
Spring Data Fundamentals, on the O’Reilly Learning Platform
Reactive Spring, an NFJS Virtual Workshop