$30 off During Our Annual Pro Sale. View Details »

Getting Started with the Micronaut Framework Brighton Kotlin user group

Getting Started with the Micronaut Framework Brighton Kotlin user group

Sergio del Amo

January 17, 2023
Tweet

More Decks by Sergio del Amo

Other Decks in Programming

Transcript

  1. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    1

    View Slide

  2. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    2

    View Slide

  3. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Sergio del Amo
    https://sergiodelamo.com

    @sdelamo

    Member of the Micronaut
    Foundation Board of Directors

    Micronaut Lead Engineer at
    Object Computing Inc.

    Micronaut Developer Advocate

    Involved with Micronaut since its
    inception.

    Micronaut Core committer.
    Micronaut Guides. Micronaut
    Starter, Security, AWS, Views,
    RSS, Problem+JSON, Email,

    3

    View Slide

  4. © 2022 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
    means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI)
    INTRODUCTION

    View Slide

  5. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Open Source
    5
    Apache 2.0

    View Slide

  6. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Modern JVM Framework
    ❖ Micronaut was designed from scratch in 2017, focused on modern
    architectures like microservices and serverless, with the cloud in
    mind.
    6
    All application types
    ❖ Micronaut is a complete solution for any type of application:
    microservices, message-driven producers or consumers, command-
    line apps, serverless functions
    Highly optimized
    ❖ Micronaut leverages Java annotation processors and other
    optimizations to compute the framework infrastructure at compile-
    time, drastically reducing startup time and memory consumption.

    View Slide

  7. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Release Schedule
    7
    • 3.8.0 - 2022 Dec

    • 3.7.0 - 2022 Sep

    • 3.6.0 - 2022 Aug

    • 3.5.0 - 2022 May

    • 3.4.0 - 2022 March

    • 3.3.0 - 2022 Jan

    • 3.2.0 - 2021 Nov

    • 3.1.0 - 2021 Oct
    • 3.0.0 - 2021 Aug

    • 2.5.0 - 2021 April

    • 2.4.0 - 2021 March

    • 2.3.0 - 2021 Jan

    • 2.2.0 - 2020 Nov

    • 2.1.0 - 2020 Oct

    • 2.0.0 - 2020 Jun

    • 1.3.0 - 2020 Feb

    • 1.2.0 - 2019 Aug

    • 1.1.0 - 2019 April

    • 1.0.0 - 2018 Oct
    1 Year - Mayor


    6 Week - Minor


    1-2 Week - Patch

    View Slide

  8. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    AOT: Ahead of Time
    Micronaut computes at build time:
    ‣ All dependency and configuration injection

    ‣ Annotation metadata (meta annotations)

    ‣ AOP proxies

    ‣ Bean introspections

    ‣ All other framework infrastructure

    At runtime
    ‣ No reflection.

    ‣ No proxy generation.

    ‣ No dynamic classloading.

    ‣ No classpath scanning.
    8

    View Slide

  9. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Configuration
    Dependency Injection
    ❖ Can use JSR-330 (@Inject) annotations
    9
    ❖ Properties, YAML, TOML, Groovy, Config4K.
    Validation support
    ❖ Built-in reflection free, faster startup, smaller JAR, reduced memory.

    ❖ Hibernate Validation: full Bean Validation API compliance.
    AOP: Aspect-Oriented Programing
    ❖ Compile-time, reflection free.
    HTTP Client
    ❖ Micronaut includes an HTTP client that has both a low-level API and
    a higher-level AOP-driven API.

    View Slide

  10. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    LANGUAGE AGNOSTIC
    10

    View Slide

  11. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Java Version
    11
    8
    11
    17

    View Slide

  12. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    BUILD AGNOSTIC
    12

    View Slide

  13. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    TEST FRAMEWORK AGNOSTIC
    13

    View Slide

  14. © 2022 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
    means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI)
    DEMO

    View Slide

  15. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    GraalVM Native Executable
    15

    View Slide

  16. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    ❖ RxJava 2

    ❖ RxJava 3

    ❖ Project Reactor
    Reactive Library Agnostic
    16

    View Slide

  17. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Serverless
    17

    View Slide

  18. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    CLOUD AGNOSTIC
    18

    View Slide

  19. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Micronaut Runtimes
    19
    Servlet

    View Slide

  20. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Messaging
    20

    View Slide

  21. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Database Migration Tools
    21

    View Slide

  22. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Persistence
    22

    View Slide

  23. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Micronaut Views
    23
    Server Side View Redendering
    Pebble Rocker
    Soy

    View Slide

  24. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Micronaut Security
    24
    Security
    OAuth 2.0
    OpenID Connect
    LDAP
    BasicAuth
    JWT

    View Slide

  25. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Error Handling
    ❖ Vnd.Error

    ❖ Problem+JSON
    25

    View Slide

  26. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Tracing
    26

    View Slide

  27. Copyright © 2022 by Object Computing, Inc. (OCI).

    All rights reserved.
    Service Discovery
    27

    View Slide

  28. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Monitoring
    ❖ Micrometer

    ❖ JMX

    ❖ Elasticsearch
    28
    API
    ❖ GRAPHQL

    ❖ GRPC

    ❖ Open API
    Containers
    ❖ Kubernetes K8S
    MISC
    ❖ Cache

    ❖ Email

    ❖ Picocli

    ❖ RSS

    View Slide

  29. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Micronaut Resources
    ❖ micronaut.io/launch

    ❖ micronaut.io/docs

    ❖ micronaut.io/guides

    ❖ micronaut.io/blog

    ❖ micronaut.io/category/webinar

    ❖ micronaut.io/resources/community-support

    ❖ github.com/micronaut-projects/micronaut-core

    ❖ micronaut.io/foundation

    ❖ micronaut.io/commercial-support

    ❖ objectcomputing.com/products/micronautsolutions
    29

    View Slide

  30. Copyright © 2021 by Object Computing, Inc. (OCI).

    All rights reserved.
    Q & A
    30

    View Slide

  31. © 2022 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
    means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI)
    OCI Contact Information
    Sergio del Amo Caballero
    OCI Micronaut Core Development Team
    [email protected]
    Jen Wiese
    Community Engagement Manager
    [email protected]

    (314) 579-0066
    micronaut.io

    View Slide