Groovy Gateway Drugs

Jacob Aae Mikkelsen

Jacob Aae Mikkelsen

  • Senior Engineer at LEGO

  • Previously 4 years as consultant on Groovy and Grails

  • External Associate Professor - University of Southern Denmark

  • Twitter @JacobAae

  • Blogs The Grails Diary

Feedback from Course

I just wanted to say hi and brag that very soon after finishing the class I started working for a small company where I am a full stack developer (the only one currently) and I’m making a web application in Grails.

Things that we did in class were insanely useful and helpful, I don’t think I’ll ever move away from grails in future.

Agenda

  • Intro

  • Groovy Technologies

    • Assesment of each

  • Other technologies

LEGO

Lego

CITMABIS

  • Corporate IT

  • Marketing

  • Business Innovation Solutions

  • Development

Team

  • 7 FTE

  • 2 student workers

Premice

  • JVM Based for backend

  • Microservices

  • Dockerize

Current Task

lego ed

Current Task

  • New Digital Platform

    • Global

    • No downtime or service windows

  • Technical consultancy

Apps

  • Legacy

  • New

Challenges

  • New team

  • Enterprise vs. agile

  • On-prem datacenter or cloud

  • Technologies used

  • Open-source?

Services

  • ID management / Account

  • Backup/content storage

  • Configuration management

  • Backend services for website, shop etc.

SdkMan

sdkman

SdkMan

  • Installation

  • Changing versions

  • Announcements of new releases

Alternatives

  • apt (Linux)

  • Brew (Mac)

  • Own scripts to handle environment variables

Pros

  • Simple

  • Effective

  • Easy

  • Many technologies

Cons

  • Does not yet have JVM

Gradle

gradle

Buildtool

Buildtool of choice

Release and Versioning

Gradle plugin

Continous Deploy

Deploy plugin to Rancher

rancher2

Pipeline

General tool for all projects

Pros

  • Fast

  • Simple

  • Plugin ecosystem

Cons

  • Not support for Play Framework newest version (Scala)

Alternatives

  • Make

  • Maven

  • Ant

  • SBT

Grails

grails

Projects

  • Product, pricing and inventory for website

  • Deployed versions and documentation

  • QA Handover registration

Alternatives

  • Spring Boot

  • Play

Pros

  • Easy learning curve

  • Full stack

  • GORM

  • Plugin ecosystem

Cons

  • No books on latest release

  • Not reactive

  • Still a bit heavy

Ratpack

ratpack

Ratpack

  • Set of Java libraries for building modern HTTP applications

  • Reactive

  • Excellent Groovy integration

Usage

  • Configuration Management for Apps

Alternatives

  • AKKA Http

Pros

  • Fast

  • Lightweight

  • Reactive

Cons

  • Limited documentation (but improving)

Spock

spock

Spock

  • Testing

  • Mocking

  • Stubbing

Usage

  • All ratpack/grails/gradle plugin projects

Alternatives

  • JUnit

  • Scalatest

Pros

  • Readable and well structured tests

  • Can be used for multiple languages

  • Not production code

Cons

  • New syntax

Geb

geb

Browser Automation

  • Build on top of Webdriver

  • Automate browser based testing

Integration

Saucelabs ⇒ Many browsers available

Usage

QA Process for end to end testing

Pros

  • Uses Spock so very readable

  • Pages and modules gives maintainable structure

Cons

  • Functional testing is somewhat brittle

Groovy

groovy

Why

You all know

Current Projects

  • All Grails and Ratpack components

  • Gradle plugins

  • Jenkins Groovy DSL

Alternatives

  • JAVA

  • Scala

  • Kotlin

Pros

  • Elegant

  • Less verbose than JAVA

Cons

  • Not purely functional

Conclusion

Groovyfied?

YES

But could still be more

Honorable mentions

betamax
grooscript

QnA

Comments & Evaluation