no container: a modern java stack with bootique

21
No Container a Modern Java Stack with Bootique by Andrus Adamchik @andrus_a

Upload: andrus-adamchik

Post on 16-Apr-2017

505 views

Category:

Software


3 download

TRANSCRIPT

Page 1: No Container: a Modern Java Stack with Bootique

No Containera Modern Java Stack with Bootiqueby Andrus Adamchik @andrus_a

Page 2: No Container: a Modern Java Stack with Bootique

About Me

• Member and VP of the Apache Software Foundation.• Run a company called ObjectStyle.• Develop open source technologies: ORM, dependency

injection, REST, no-container.

Page 3: No Container: a Modern Java Stack with Bootique

–Anonymous Java Programmer

“I use Java at work all the time, but I prefer Node.js for my own projects.”

Java Paradox

Page 4: No Container: a Modern Java Stack with Bootique

Evolution of Java*• 1998: Write a runnable app.• 2001: Write a container web app with JSP/EJB.• 2004: Write a container web app without JSP/EJB.• 2010: Write a container web app without web.xml.• 2016: Write a runnable web app without container.

* Disclaimer: light sarcasm and oversimplification

Page 5: No Container: a Modern Java Stack with Bootique

Container Inversion

• App as an all-inclusive .jar.• Former container parts are included as libraries.• App is runnable and owns its main() method.

Page 6: No Container: a Modern Java Stack with Bootique

#WYSIWYR: What You See Is What You Run

• Another way of saying "get off container and reclaim your main() method".

Page 7: No Container: a Modern Java Stack with Bootique

BootiqueMinimally opinionated app launcher and integration technology.

Page 8: No Container: a Modern Java Stack with Bootique

Brief History• First commit in December 2015.• Collaboration between ObjectStyle and National Hockey

League.• Fully open-source under Apache License.• Successfully applied in complex enterprise environments.

Page 9: No Container: a Modern Java Stack with Bootique

Demo

Page 10: No Container: a Modern Java Stack with Bootique

Modules, Configuration, Commands

Page 11: No Container: a Modern Java Stack with Bootique

Modules

• Core

• Cayenne• Curator (Zookeeper

client)• JDBC • Jersey

• Jersey Client• Jetty• Job• LinkMove• LinkRest

• Liquibase • Logback• Metrics• MVC (Mustache)• Test

Page 12: No Container: a Modern Java Stack with Bootique

Configuration

Page 13: No Container: a Modern Java Stack with Bootique

Configuration Transformed into Factories

Page 14: No Container: a Modern Java Stack with Bootique

Commands (and Options)

Page 15: No Container: a Modern Java Stack with Bootique

Testing with JUnit

Page 16: No Container: a Modern Java Stack with Bootique

Bootique vs. JavaEE

Page 17: No Container: a Modern Java Stack with Bootique

Integration Technology for Java.

WYSIWYR (apps are runnable). Requires container deployment.

Can integrate any 3rd-party modules. Integrates a predefined set of specs.

Unified config for all app parts. Container and apps are configured separately.

Everything is programmable Container is somewhat programmable, but YMMV.

Universal Java launcher Specialized opinionated environment.

Page 18: No Container: a Modern Java Stack with Bootique

Bootique vs. SpringBoot

Page 19: No Container: a Modern Java Stack with Bootique

Integration, WYSIWYR (apps are runnable), extension auto-loading, etc.

Command dispatch feature. All available commands run sequentially.

Guice DI Style: explicit modules, explicit overrides.

Package-based implicit "modules". Annotations spread around.

Features can't be turned on by accident. @Conditional built into the core.

Unopinionated Core Opinionated

Page 20: No Container: a Modern Java Stack with Bootique

What Apps is it Good for?• Any web apps you used to write in the past, but also....• Microservices.• Apps you distribute to users.• Cron jobs.• JavaFX apps.• Quick prototypes.

Page 21: No Container: a Modern Java Stack with Bootique

Questions?

• @BootiqueProject• http://bootique.io/• https://github.com/nhl/bootique (don’t forget to it !)