SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
GETTINGGROOVY
WITH MICRONAUT & JHIPSTER
Web and JVM developer with a decade of
experience
Husband of Dad of
OSS contributor
2GM Team Member at OCI
ABOUTME
ZACHARY KLEIN, SENIOR SOFTWARE ENGINEER
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
💇 🙆 👸 👶🙋
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
AGENDA
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
WHATISMICRONAUT?
• A framework for microservice & serverless applications
• Leverages Ahead Of Time (AOT) for DI, AOP, and
configuration injection
• Reactive HTTP layer built on Netty
• Declarative HTTP Client
• “Natively Cloud Native”
• Accompanied by a suite of official and community-
contributed integrations and libraries
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
WHATCANYOUBUILDWITHMICRONAUT?
• Microservices
• Serverless Applications
• Message-Driven Applications with Kafka/Rabbit
• CLI Applications
• Android Applications
• Anything with static void main(String..args)
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
WHATMAKESMICRONAUTDIFFERENT?
• Ahead of Time (AOT) Compilation
• No Reflection, Runtime Proxies, or Dynamic Classloading
• Optimized for GraalVM (and standard JVM)
• Natively Reactive
• Capable of running in low-memory environments with sub
second startup time
• Polyglot: supports Java, Kotlin, and Groovy
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
WHATMAKESMICRONAUTDIFFERENT?
• Configurations offered for…
• Cloud platforms (AWS, Google Cloud, Microsoft Azure)
• Messaging frameworks (Kafka, RabbitMQ, nats.io)
• Data access (MongoDB, Neo4j, Redis, SQL/JDBC, Cassandra
• Open API documentation (Swagger)
• Metrics libraries (Micrometer, rate limiting libraries)
• Server-side view rendering
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
MICRONAUTANDGROOVY
• First-class support for Groovy
• Controllers, filters, beans, factories, configuration
• @MicronautTest for Spock
• AST Transformations
• Static Compilation
• Interoperability
https://launch.micronaut.io9
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
DEPENDENCYINJECTION&AOP
• Full Featured Dependency Injection (DI) Container
• JSR-330 Compliant
• Minimizes Runtime Reflection
• AOP APIs
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
Generated Bytecode resides in
the same package as your source
code - your code is never altered
by Micronaut
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
import javax.inject.Singleton
@Singleton
class MessageHelper {
String createMessage() { // … }
}
Mind the package!
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Get
import javax.inject.Inject
@Controller("/")
class HelloController {
@Inject
MessageHelper messageHelper
// ...
}
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Get
@Controller("/")
class HelloController {
MessageHelper messageHelper
public HelloController(MessageHelper messageHelper) {
this.messageHelper = messageHelper
}
// ...
}
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
CONFIGURATION
• Configuration formats: YML (default), Groovy, JSON, Java
Properties
• Environment detection and env-specific config
• Configuration injection via annotations or
@ConfigurationProperties
info.demo.string = "demo string"
info.demo.number = 123
info.demo.map = [key: 'value',
other_key: 123]
application.groovy
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
CONTROLLERS
package example
import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Get
@Controller('/')
class GroovyHelloController {
@Get('/hello/{name}')
String hello(String name) {
"Hello $name From Groovy"
}
}
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
CLIENTS
package example
import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Get
@Client(‘/') // or (id = ‘service-id’)
class GroovyHelloClient {
@Get('/hello/{name}')
String hello(String name)
}
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
MANAGEMENTENDPOINTS
• Provided by the micronaut-management library
• Similar conceptually to Actuator endpoints in Spring
Boot/Grails
• Endpoints can be defined as sensitive (requiring
authentication)
• Support GET, POST, and DELETE requests
• Can be exposed via JMX
• Custom endpoints supported
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
/beans Returns information about the loaded bean definitions in
the application
/info Returns static information from the state of the
application
/health Returns information about the "health" of the application
/metrics Return the application metrics. Requires the micrometer-
core configuration on the classpath
/refresh Refreshes bean state
/routes Returns information about URIs available to be called for
your application
/stop Shuts down the application server (disabled by default)
/loggers View and mutate logging configuration (e.g, POST to change
log levels at runtime)
/env Returns all currently resolved configuration properties
DEFAULT MANAGEMENT ENDPOINTS
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
MICRONAUT&GROOVY
• Groovy is a 1st class language in Micronaut!
• Applications can be generated with Groovy
as the default language (e.g, code-gen for
controllers, clients, Application class, etc)
• Groovy supported as configuration syntax
• Compile-time DI/AOP provided using Groovy
AST Transformations
• Groovy classes can also be used within Java
Micronaut apps (e.g, Spock tests, helper/util
classes)
❤
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
MICRONAUT&GROOVY
• Groovy can be used for:
• Controllers & Clients
• Filters
• All bean types
• AOP advice
• Configuration
• Serverless functions
❤
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
“ADEVELOPMENTPLATFORMTO
QUICKLYGENERATE,DEVELOP,&
DEPLOYMODERNWEBAPPLICATIONS
&MICROSERVICEARCHITECTURES.”
HTTPS://WWW.JHIPSTER.TECH
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
WHATISJHIPSTER?
• Project generator for modern JVM web apps
• Originally designed for Spring Boot and Angular
• Now supports React and Vue.js frontends, and Micronaut as a
backend via the Hipster blueprint
• Provides user admin UI, management UI, and “scaffolding” views for
database entities
• Offers features to easily enable OAuth2 authentication
• JDL (JHipster Domain Language) can be used to define the domain
model (and project options) for your app
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
JHIPSTER&MICRONAUT
• Development sponsored by Object Computing, Inc
• Custom Blueprint supplies a Micronaut backend
• Still in active development!
• Features currently supported include:
• Maven (default) or Gradle
• MySQL, Postgres, H2
• JWT or OAuth 2.0 authentication
• Angular or React client app
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
CREATINGAJHIPSTERAPPLICATION
1. Install MHipster
◦ npm install -g generator-jhipster-micronaut
2. Create a new folder for your application
3. Start MHipster
◦ mhipster
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
JHIPSTER/MICRONAUT+GROOVY!
• JHipster projects use Java only by default, :( however…
• Groovy can be added to the project with fairly minimal build
configuration! :)
• Groovy can be used for project configuration (?)
• Micronaut’s joint-compilation support for Groovy allows
bidirectional DI within your app
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
DEMO!DEMO!DEMO!
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
WRAPUP
• Micronaut is a powerful, performant framework for JVM apps -
including Groovy!
• JHipster allows you to quickly bootstrap a full-featured
application with Micronaut with very little coding
• With a bit of custom config, you can take advantage of Groovy
and Micronaut’s support for the Groovy language within your
JHipster project
• Approach is applicable to any Micronaut project (not just
JHipster)
❤
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
QUESTIONS?
ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020
THANKYOU
ZACHARY KLEIN
SENIOR SOFTWARE ENGINEER
GRAILS & MICRONAUT CORE TEAM MEMBER
KLEINZ@OBJECTCOMPUTING.COM
@ZACHARYAKLEIN
https://micronaut.io
https://objectcomputing.com/resources/events
SAMPLE CODE: HTTPS://GITHUB.COM/ZACHARYKLEIN/GROOVY-JHIPSTER

Weitere ähnliche Inhalte

Was ist angesagt?

Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Matt Raible
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf
 
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019Matt Raible
 
Bringing Docker to the Cloud
Bringing Docker to the CloudBringing Docker to the Cloud
Bringing Docker to the CloudAndrew Kennedy
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Matt Raible
 
Spark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSSpark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSArun Gupta
 
A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...Alessandro Martellucci
 
Bootiful Development with Spring Boot and React - Richmond JUG 2018
Bootiful Development with Spring Boot and React - Richmond JUG 2018Bootiful Development with Spring Boot and React - Richmond JUG 2018
Bootiful Development with Spring Boot and React - Richmond JUG 2018Matt Raible
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpToshiaki Maki
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseMatt Raible
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservicesLuram Archanjo
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011Shreedhar Ganapathy
 
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Daniel Woods
 
Spring Up Your Graph
Spring Up Your GraphSpring Up Your Graph
Spring Up Your GraphVMware Tanzu
 
Implement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyoImplement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyoToshiaki Maki
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsShekhar Gulati
 
クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)
クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)
クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)Tsuyoshi Miyake
 
Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011Matt Raible
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeedYonatan Levin
 
Html5 with Vaadin and Scala
Html5 with Vaadin and ScalaHtml5 with Vaadin and Scala
Html5 with Vaadin and ScalaJoonas Lehtinen
 

Was ist angesagt? (20)

Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
 
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019
Microservices for the Masses with Spring Boot, JHipster and OAuth - GIDS 2019
 
Bringing Docker to the Cloud
Bringing Docker to the CloudBringing Docker to the Cloud
Bringing Docker to the Cloud
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
 
Spark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSSpark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RS
 
A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...
 
Bootiful Development with Spring Boot and React - Richmond JUG 2018
Bootiful Development with Spring Boot and React - Richmond JUG 2018Bootiful Development with Spring Boot and React - Richmond JUG 2018
Bootiful Development with Spring Boot and React - Richmond JUG 2018
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjp
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuse
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservices
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011
 
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015
 
Spring Up Your Graph
Spring Up Your GraphSpring Up Your Graph
Spring Up Your Graph
 
Implement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyoImplement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyo
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular js
 
クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)
クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)
クラウド時代の Spring Framework (aka Spring Framework in Cloud Era)
 
Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeed
 
Html5 with Vaadin and Scala
Html5 with Vaadin and ScalaHtml5 with Vaadin and Scala
Html5 with Vaadin and Scala
 

Ähnlich wie Getting Groovy with JHipster and Micronaut

Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut FrameworkNative Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut FrameworkZachary Klein
 
Week 4 lecture material cc (1)
Week 4 lecture material cc (1)Week 4 lecture material cc (1)
Week 4 lecture material cc (1)Ankit Gupta
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...Oleg Shalygin
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Cisco DevNet
 
Spring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugSpring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugToshiaki Maki
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Matt Raible
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMalcolm Duncanson, CISSP
 
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupIntro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupJosh Ghiloni
 
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsHow to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsSufyaan Kazi
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Building Microservices with Micronaut:  A Full-Stack JVM-Based FrameworkBuilding Microservices with Micronaut:  A Full-Stack JVM-Based Framework
Building Microservices with Micronaut: A Full-Stack JVM-Based FrameworkMichael Redlich
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Matt Raible
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOTVMware Tanzu
 
Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)bridgetkromhout
 
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Henning Jacobs
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024Cloud Native NoVA
 
Develop Azure compute solutions Part - 2
Develop Azure compute solutions Part - 2Develop Azure compute solutions Part - 2
Develop Azure compute solutions Part - 2AzureEzy1
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2JooinK
 

Ähnlich wie Getting Groovy with JHipster and Micronaut (20)

Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut FrameworkNative Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
 
Week 4 lecture material cc (1)
Week 4 lecture material cc (1)Week 4 lecture material cc (1)
Week 4 lecture material cc (1)
 
First Bucharest GTUG event 02 Mar 2010
First Bucharest GTUG event 02 Mar 2010First Bucharest GTUG event 02 Mar 2010
First Bucharest GTUG event 02 Mar 2010
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
 
Spring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugSpring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsug
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM Roles
 
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupIntro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
 
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsHow to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native Applications
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Building Microservices with Micronaut:  A Full-Stack JVM-Based FrameworkBuilding Microservices with Micronaut:  A Full-Stack JVM-Based Framework
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)
 
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
Develop Azure compute solutions Part - 2
Develop Azure compute solutions Part - 2Develop Azure compute solutions Part - 2
Develop Azure compute solutions Part - 2
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
 

Kürzlich hochgeladen

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Kürzlich hochgeladen (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Getting Groovy with JHipster and Micronaut

  • 2. Web and JVM developer with a decade of experience Husband of Dad of OSS contributor 2GM Team Member at OCI ABOUTME ZACHARY KLEIN, SENIOR SOFTWARE ENGINEER ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 💇 🙆 👸 👶🙋
  • 3. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 AGENDA
  • 4. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 WHATISMICRONAUT? • A framework for microservice & serverless applications • Leverages Ahead Of Time (AOT) for DI, AOP, and configuration injection • Reactive HTTP layer built on Netty • Declarative HTTP Client • “Natively Cloud Native” • Accompanied by a suite of official and community- contributed integrations and libraries
  • 5. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 WHATCANYOUBUILDWITHMICRONAUT? • Microservices • Serverless Applications • Message-Driven Applications with Kafka/Rabbit • CLI Applications • Android Applications • Anything with static void main(String..args)
  • 6. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 WHATMAKESMICRONAUTDIFFERENT? • Ahead of Time (AOT) Compilation • No Reflection, Runtime Proxies, or Dynamic Classloading • Optimized for GraalVM (and standard JVM) • Natively Reactive • Capable of running in low-memory environments with sub second startup time • Polyglot: supports Java, Kotlin, and Groovy
  • 7. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 WHATMAKESMICRONAUTDIFFERENT? • Configurations offered for… • Cloud platforms (AWS, Google Cloud, Microsoft Azure) • Messaging frameworks (Kafka, RabbitMQ, nats.io) • Data access (MongoDB, Neo4j, Redis, SQL/JDBC, Cassandra • Open API documentation (Swagger) • Metrics libraries (Micrometer, rate limiting libraries) • Server-side view rendering
  • 8. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 MICRONAUTANDGROOVY • First-class support for Groovy • Controllers, filters, beans, factories, configuration • @MicronautTest for Spock • AST Transformations • Static Compilation • Interoperability
  • 10. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 DEPENDENCYINJECTION&AOP • Full Featured Dependency Injection (DI) Container • JSR-330 Compliant • Minimizes Runtime Reflection • AOP APIs
  • 11. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 Generated Bytecode resides in the same package as your source code - your code is never altered by Micronaut
  • 12. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 import javax.inject.Singleton @Singleton class MessageHelper { String createMessage() { // … } } Mind the package!
  • 13. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 import io.micronaut.http.annotation.Controller import io.micronaut.http.annotation.Get import javax.inject.Inject @Controller("/") class HelloController { @Inject MessageHelper messageHelper // ... }
  • 14. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 import io.micronaut.http.annotation.Controller import io.micronaut.http.annotation.Get @Controller("/") class HelloController { MessageHelper messageHelper public HelloController(MessageHelper messageHelper) { this.messageHelper = messageHelper } // ... }
  • 15. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 CONFIGURATION • Configuration formats: YML (default), Groovy, JSON, Java Properties • Environment detection and env-specific config • Configuration injection via annotations or @ConfigurationProperties info.demo.string = "demo string" info.demo.number = 123 info.demo.map = [key: 'value', other_key: 123] application.groovy
  • 16. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 CONTROLLERS package example import io.micronaut.http.annotation.Controller import io.micronaut.http.annotation.Get @Controller('/') class GroovyHelloController { @Get('/hello/{name}') String hello(String name) { "Hello $name From Groovy" } }
  • 17. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 CLIENTS package example import io.micronaut.http.annotation.Controller import io.micronaut.http.annotation.Get @Client(‘/') // or (id = ‘service-id’) class GroovyHelloClient { @Get('/hello/{name}') String hello(String name) }
  • 18. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 MANAGEMENTENDPOINTS • Provided by the micronaut-management library • Similar conceptually to Actuator endpoints in Spring Boot/Grails • Endpoints can be defined as sensitive (requiring authentication) • Support GET, POST, and DELETE requests • Can be exposed via JMX • Custom endpoints supported
  • 19. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 /beans Returns information about the loaded bean definitions in the application /info Returns static information from the state of the application /health Returns information about the "health" of the application /metrics Return the application metrics. Requires the micrometer- core configuration on the classpath /refresh Refreshes bean state /routes Returns information about URIs available to be called for your application /stop Shuts down the application server (disabled by default) /loggers View and mutate logging configuration (e.g, POST to change log levels at runtime) /env Returns all currently resolved configuration properties DEFAULT MANAGEMENT ENDPOINTS
  • 20. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 MICRONAUT&GROOVY • Groovy is a 1st class language in Micronaut! • Applications can be generated with Groovy as the default language (e.g, code-gen for controllers, clients, Application class, etc) • Groovy supported as configuration syntax • Compile-time DI/AOP provided using Groovy AST Transformations • Groovy classes can also be used within Java Micronaut apps (e.g, Spock tests, helper/util classes) ❤
  • 21. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 MICRONAUT&GROOVY • Groovy can be used for: • Controllers & Clients • Filters • All bean types • AOP advice • Configuration • Serverless functions ❤
  • 22. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 “ADEVELOPMENTPLATFORMTO QUICKLYGENERATE,DEVELOP,& DEPLOYMODERNWEBAPPLICATIONS &MICROSERVICEARCHITECTURES.” HTTPS://WWW.JHIPSTER.TECH
  • 23. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 WHATISJHIPSTER? • Project generator for modern JVM web apps • Originally designed for Spring Boot and Angular • Now supports React and Vue.js frontends, and Micronaut as a backend via the Hipster blueprint • Provides user admin UI, management UI, and “scaffolding” views for database entities • Offers features to easily enable OAuth2 authentication • JDL (JHipster Domain Language) can be used to define the domain model (and project options) for your app
  • 24. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 JHIPSTER&MICRONAUT • Development sponsored by Object Computing, Inc • Custom Blueprint supplies a Micronaut backend • Still in active development! • Features currently supported include: • Maven (default) or Gradle • MySQL, Postgres, H2 • JWT or OAuth 2.0 authentication • Angular or React client app
  • 25. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 CREATINGAJHIPSTERAPPLICATION 1. Install MHipster ◦ npm install -g generator-jhipster-micronaut 2. Create a new folder for your application 3. Start MHipster ◦ mhipster
  • 26. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 JHIPSTER/MICRONAUT+GROOVY! • JHipster projects use Java only by default, :( however… • Groovy can be added to the project with fairly minimal build configuration! :) • Groovy can be used for project configuration (?) • Micronaut’s joint-compilation support for Groovy allows bidirectional DI within your app
  • 27. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 DEMO!DEMO!DEMO!
  • 28. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 WRAPUP • Micronaut is a powerful, performant framework for JVM apps - including Groovy! • JHipster allows you to quickly bootstrap a full-featured application with Micronaut with very little coding • With a bit of custom config, you can take advantage of Groovy and Micronaut’s support for the Groovy language within your JHipster project • Approach is applicable to any Micronaut project (not just JHipster) ❤
  • 29. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 QUESTIONS?
  • 30. ZACHARY KLEIN - APACHECON @HOME - SEPTEMBER 30, 2020 THANKYOU ZACHARY KLEIN SENIOR SOFTWARE ENGINEER GRAILS & MICRONAUT CORE TEAM MEMBER KLEINZ@OBJECTCOMPUTING.COM @ZACHARYAKLEIN https://micronaut.io https://objectcomputing.com/resources/events SAMPLE CODE: HTTPS://GITHUB.COM/ZACHARYKLEIN/GROOVY-JHIPSTER