Upload
andrus-adamchik
View
503
Download
3
Embed Size (px)
Citation preview
No Containera Modern Java Stack with Bootiqueby Andrus Adamchik @andrus_a
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.
–Anonymous Java Programmer
“I use Java at work all the time, but I prefer Node.js for my own projects.”
Java Paradox
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
Container Inversion
• App as an all-inclusive .jar.• Former container parts are included as libraries.• App is runnable and owns its main() method.
#WYSIWYR: What You See Is What You Run
• Another way of saying "get off container and reclaim your main() method".
BootiqueMinimally opinionated app launcher and integration technology.
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.
Demo
Modules, Configuration, Commands
Modules
• Core
• Cayenne• Curator (Zookeeper
client)• JDBC • Jersey
• Jersey Client• Jetty• Job• LinkMove• LinkRest
• Liquibase • Logback• Metrics• MVC (Mustache)• Test
Configuration
Configuration Transformed into Factories
Commands (and Options)
Testing with JUnit
Bootique vs. JavaEE
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.
Bootique vs. SpringBoot
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
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.
Questions?
• @BootiqueProject• http://bootique.io/• https://github.com/nhl/bootique (don’t forget to it !)