SlideShare a Scribd company logo
1 of 27
Tim Hobson
Principal Engineer, Chief Caffeine Officer @
Java on Rails - Using Spring Boot For
Rapid Application Development
About Me
2
Software Developer with a bad habit of leveraging
frameworks
Not a fan of re-inventing wheels every project
Still believe you can move fast with good architecture
Agenda
3
Why Spring Boot
Code
RAD
GOAL: Spring Boot has been demystified, looks promising, and you
are inspired to give it a test drive.
Rapid Application
Development
Rapid Application Development
Components, Frameworks and
Platforms
The platform choice you make should enable you to move fast
using the best of breed frameworks and components
Components
6
High-level software systems are built using
components (or modules)
Leveraging existing components
– saves time,
– reduces opportunity for defects,
– lets you focus on your value added work.
EG: Database connection pools, JSON and XML
Parsers, Security libraries, HTTP Clients etc…
As an application developer, you are not being paid to
build commodity services
Choices, Choices…
7
97,613 packages49,603 packages
87,864 packages
89,387 packages
27,580 packages
Frameworks
8
Frameworks typically provide a collection
of curated Components that work
seamlessly together
Frameworks provide implied (or explicit)
patterns and practices to help maintain
good architecture and maintainability
Frameworks provide proven combinations
of components in use for known use
cases.
Choices, Choices…
9
Platforms
10
Platforms go beyond software components and
frameworks
– Tooling
– Deployment
– Management
– Testing
– Maintenance
– Versioning
Platforms are trying to create cohesive
technology experiences for developers and
businesses
Less for you to worry about, more time to focus
on your domain
Making Good Choices
11
What do I need in the short term?
What might I need in the future?
How has the framework evolved, will it continue?
Are there enough people skilled in this
framework?
Is the documentation and support good?
Is it an ordeal or a joy to work with?
There are more considerations than how easy “Hello
World” is
Why Spring
Boot?
?
A Cohesive Platform
The Spring Platform consists of components and
frameworks that are useful in and of themselves, but
are brought together through Boot in a way that lends
itself to true RAD.
The framework is road-tested, and continues to be
actively developed, keeping up with the latest
technologies and patterns (Big Data, Reactive,
HATEOS, Microservices, Cloud-deployed) and actively
partnering with other OSS projects.
Spring Boot
What is it?
– Dependency Management “Simplification”
– Automatic Component Configuration
– Cross-cutting infrastructure services
– Deployment and Packaging alternatives
How does it do it?
– “Starter Packs” of dependencies
– Convention-based configuration
– Production-ready services such as metrics, health,
app lifecycle.
– Maven and Gradle plugins
Dependency Management
16
Starter Packs bring together Spring and Third-Party
dependencies needed to do something functionally:
– Web
– Data
– Security
– Test
Versioning controlled by a parent pom.xml
Include the starter packs you need, and go.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
The Magic of Auto-Configuration
17
Configures based on what is in your
classpath
Configures based on what @Beans are in
place and which aren’t
Configures based on your application.yml
or application.properties
@EnableAutoConfiguration
So What’s So Great About That?
EG: Writing a JSON Service that reads from a DB
18
Spring Boot Way
• Use/Include Spring Boot
Starter Parent in
pom/Gradle, add Spring
Boot Starter Web and JPA
• Write Controller, Service,
Repository Beans and
Domain Objects
• Write Application class with
@EnableAutoConfiguration
• Run as a Jar.
Old Spring Way
• Configure Web Container
• Create Web Project
• Configure POM/Gradle/Ant dependencies (with
versions) build and and packaging (150 lines +)
• Configure web.xml with Spring context config
files, dispatcher servlet, servlet mapping, Spring
security Filter, etc..
• Write Controller, Service, Repository Beans and
Domain Objects
• Configure *.xml files (Or annotated
@Configuration Beans) with Bean definitions,
View resolvers, content-negotiation, controller
mapping, resource handling, error handlers, db
pooling, connections, profiles,
transactionmanager, jdbc templates or JPA
config.
• Write code to import initial data from script
Infrastructure Services
19
Audit
Metrics
Guages
Tracing
Configuration Views
Remote management via SSH
All Part of the Actuator Component
Package and Deployment Alternatives
20
Package as a JAR
– Choose embedded container (Jetty, Tomcat)
– Configure container programmatically and/or via
application config
– Run using java –jar
Package as a WAR
– No web.xml required
– Spring Dispatcher Servlet is auto-configured
– Deploy to any Servlet container
Choices, Choices…
Do you already use
Spring?
• Simplify your configuration
• Keep up with the latest
version compatibility matrix
• Introduce Circuit Breaker
patterns, distributed
configuration, metrics and
management APIs
• Get stuff done faster
Are you considering
using Spring?
• Skip the rewrite for the JVM
and write durable code!
• Leverage Dependency
Injection, AOP, abstractions
and integrations for major
data stores, security
standards, web standards
and more.
• Fail to understand why it was
known as “hard to use”.
Code
To-Boot
https://github.com/hoserdude/to-boot
git clone git@github.com:hoserdude/to-boot.git
Sample App to demonstrate all manner of things,
cobbled together in about 2 days.
See README.md for instructions
Things We Will Explore
Boostrapping (POM, Application.class)
Controllers (Routes, Marshalling, Resource Handling)
Views (Thymeleaf, AngularJS)
APIs (Swagger, DTO definition)
Security
Persistence (Config, Repositories, Domain Beans)
Application Structure, DI
Monitoring and Metrics
Deployment Options
24
Closing Thoughts
Find Out More
26
• http://spring.io/projects
• http://spring.io/guides
THANK YOU
@hoserdude
@hoserdude
@hoserdude
hoserdude.com

More Related Content

What's hot

J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenlissa cidhi
 
Delivering Schema as a Service
Delivering Schema as a ServiceDelivering Schema as a Service
Delivering Schema as a ServicePete Sharman
 
Application server vs Web Server
Application server vs Web ServerApplication server vs Web Server
Application server vs Web ServerGagandeep Singh
 
Enterprise Application Guidelines
Enterprise Application GuidelinesEnterprise Application Guidelines
Enterprise Application GuidelinesGuru Lakshmeekar B
 
Mule anypoint data gateway
Mule  anypoint data gatewayMule  anypoint data gateway
Mule anypoint data gatewayD.Rajesh Kumar
 
Anypoint platform architecture and components
Anypoint platform architecture and componentsAnypoint platform architecture and components
Anypoint platform architecture and componentsD.Rajesh Kumar
 
Datasheet was pluginforrd
Datasheet was pluginforrdDatasheet was pluginforrd
Datasheet was pluginforrdMidVision
 
Mule esb-connectors
Mule esb-connectorsMule esb-connectors
Mule esb-connectorshimajareddys
 
Kluczowe elementy infrastruktury...
Kluczowe elementy infrastruktury...Kluczowe elementy infrastruktury...
Kluczowe elementy infrastruktury...Alicja Sieminska
 
Deployment Patterns in WSO2 Enterprise Integrator
Deployment Patterns in WSO2 Enterprise IntegratorDeployment Patterns in WSO2 Enterprise Integrator
Deployment Patterns in WSO2 Enterprise IntegratorWSO2
 
ESB Evaluation Framework
ESB Evaluation FrameworkESB Evaluation Framework
ESB Evaluation FrameworkWSO2
 
Presentation for taste of it 2014 wide - no clients
Presentation for taste of it 2014   wide - no clientsPresentation for taste of it 2014   wide - no clients
Presentation for taste of it 2014 wide - no clientsRobert LeRoy
 
7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications7 Stages of Scaling Web Applications
7 Stages of Scaling Web ApplicationsDavid Mitzenmacher
 
IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)Ian Robinson
 
Developing, Debugging and Administrating Your Integration Scenarios with WSO2...
Developing, Debugging and Administrating Your Integration Scenarios with WSO2...Developing, Debugging and Administrating Your Integration Scenarios with WSO2...
Developing, Debugging and Administrating Your Integration Scenarios with WSO2...WSO2
 

What's hot (20)

J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for women
 
SharePoint Topology
SharePoint Topology SharePoint Topology
SharePoint Topology
 
Delivering Schema as a Service
Delivering Schema as a ServiceDelivering Schema as a Service
Delivering Schema as a Service
 
Websphere - About IBM HTTP Server & WAS Plug-in
Websphere -  About IBM HTTP Server & WAS Plug-inWebsphere -  About IBM HTTP Server & WAS Plug-in
Websphere - About IBM HTTP Server & WAS Plug-in
 
Application server vs Web Server
Application server vs Web ServerApplication server vs Web Server
Application server vs Web Server
 
Enterprise Application Guidelines
Enterprise Application GuidelinesEnterprise Application Guidelines
Enterprise Application Guidelines
 
Mule anypoint data gateway
Mule  anypoint data gatewayMule  anypoint data gateway
Mule anypoint data gateway
 
Anypoint platform architecture and components
Anypoint platform architecture and componentsAnypoint platform architecture and components
Anypoint platform architecture and components
 
Datasheet was pluginforrd
Datasheet was pluginforrdDatasheet was pluginforrd
Datasheet was pluginforrd
 
Alfresco Architecture
Alfresco ArchitectureAlfresco Architecture
Alfresco Architecture
 
Mule esb-connectors
Mule esb-connectorsMule esb-connectors
Mule esb-connectors
 
Managing the cloud
Managing the cloudManaging the cloud
Managing the cloud
 
Kluczowe elementy infrastruktury...
Kluczowe elementy infrastruktury...Kluczowe elementy infrastruktury...
Kluczowe elementy infrastruktury...
 
Websphere - Introduction to SSL part 1
Websphere  - Introduction to SSL part 1Websphere  - Introduction to SSL part 1
Websphere - Introduction to SSL part 1
 
Deployment Patterns in WSO2 Enterprise Integrator
Deployment Patterns in WSO2 Enterprise IntegratorDeployment Patterns in WSO2 Enterprise Integrator
Deployment Patterns in WSO2 Enterprise Integrator
 
ESB Evaluation Framework
ESB Evaluation FrameworkESB Evaluation Framework
ESB Evaluation Framework
 
Presentation for taste of it 2014 wide - no clients
Presentation for taste of it 2014   wide - no clientsPresentation for taste of it 2014   wide - no clients
Presentation for taste of it 2014 wide - no clients
 
7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications
 
IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)
 
Developing, Debugging and Administrating Your Integration Scenarios with WSO2...
Developing, Debugging and Administrating Your Integration Scenarios with WSO2...Developing, Debugging and Administrating Your Integration Scenarios with WSO2...
Developing, Debugging and Administrating Your Integration Scenarios with WSO2...
 

Similar to Java on Rails SV Code Camp 2014

Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application developmentClarence Ho
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)John Pape
 
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...Amazon Web Services
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsmichaelaaron25322
 
RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)Rahul Singh
 
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache TomcatCase Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache TomcatVMware Hyperic
 
Journey to cloud engineering
Journey to cloud engineeringJourney to cloud engineering
Journey to cloud engineeringMd. Sadhan Sarker
 
Software Architecture in Architecture design .ppt
Software Architecture in Architecture design .pptSoftware Architecture in Architecture design .ppt
Software Architecture in Architecture design .pptguruswamyd785
 
SharePoint Advanced Administration with Joel Oleson, Shane Young and Mike Watson
SharePoint Advanced Administration with Joel Oleson, Shane Young and Mike WatsonSharePoint Advanced Administration with Joel Oleson, Shane Young and Mike Watson
SharePoint Advanced Administration with Joel Oleson, Shane Young and Mike WatsonJoel Oleson
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352sflynn073
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And ScalabilityJason Ragsdale
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsChris Bailey
 
Jesy George_CV_LATEST
Jesy George_CV_LATESTJesy George_CV_LATEST
Jesy George_CV_LATESTJesy George
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0Jasmine Conseil
 
Monitoring Application Attack Surface and Integrating Security into DevOps Pi...
Monitoring Application Attack Surface and Integrating Security into DevOps Pi...Monitoring Application Attack Surface and Integrating Security into DevOps Pi...
Monitoring Application Attack Surface and Integrating Security into DevOps Pi...Denim Group
 

Similar to Java on Rails SV Code Camp 2014 (20)

Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application development
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)
 
Ibm innovate ci for system z
Ibm innovate ci for system zIbm innovate ci for system z
Ibm innovate ci for system z
 
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
 
Mohammed_Murtuza_EAI
Mohammed_Murtuza_EAIMohammed_Murtuza_EAI
Mohammed_Murtuza_EAI
 
RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)
 
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache TomcatCase Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
 
Journey to cloud engineering
Journey to cloud engineeringJourney to cloud engineering
Journey to cloud engineering
 
Software Architecture in Architecture design .ppt
Software Architecture in Architecture design .pptSoftware Architecture in Architecture design .ppt
Software Architecture in Architecture design .ppt
 
SharePoint Advanced Administration with Joel Oleson, Shane Young and Mike Watson
SharePoint Advanced Administration with Joel Oleson, Shane Young and Mike WatsonSharePoint Advanced Administration with Joel Oleson, Shane Young and Mike Watson
SharePoint Advanced Administration with Joel Oleson, Shane Young and Mike Watson
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java Tools
 
Jesy George_CV_LATEST
Jesy George_CV_LATESTJesy George_CV_LATEST
Jesy George_CV_LATEST
 
Amis conference soa deployment. the dirty tricks using bamboo, nexus and xl ...
Amis conference soa deployment. the dirty tricks using  bamboo, nexus and xl ...Amis conference soa deployment. the dirty tricks using  bamboo, nexus and xl ...
Amis conference soa deployment. the dirty tricks using bamboo, nexus and xl ...
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
 
Isset Presentation @ EECI2009
Isset Presentation @ EECI2009Isset Presentation @ EECI2009
Isset Presentation @ EECI2009
 
newSkills_09
newSkills_09newSkills_09
newSkills_09
 
Monitoring Application Attack Surface and Integrating Security into DevOps Pi...
Monitoring Application Attack Surface and Integrating Security into DevOps Pi...Monitoring Application Attack Surface and Integrating Security into DevOps Pi...
Monitoring Application Attack Surface and Integrating Security into DevOps Pi...
 

Recently uploaded

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 

Recently uploaded (20)

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 

Java on Rails SV Code Camp 2014

  • 1. Tim Hobson Principal Engineer, Chief Caffeine Officer @ Java on Rails - Using Spring Boot For Rapid Application Development
  • 2. About Me 2 Software Developer with a bad habit of leveraging frameworks Not a fan of re-inventing wheels every project Still believe you can move fast with good architecture
  • 3. Agenda 3 Why Spring Boot Code RAD GOAL: Spring Boot has been demystified, looks promising, and you are inspired to give it a test drive.
  • 5. Rapid Application Development Components, Frameworks and Platforms The platform choice you make should enable you to move fast using the best of breed frameworks and components
  • 6. Components 6 High-level software systems are built using components (or modules) Leveraging existing components – saves time, – reduces opportunity for defects, – lets you focus on your value added work. EG: Database connection pools, JSON and XML Parsers, Security libraries, HTTP Clients etc… As an application developer, you are not being paid to build commodity services
  • 7. Choices, Choices… 7 97,613 packages49,603 packages 87,864 packages 89,387 packages 27,580 packages
  • 8. Frameworks 8 Frameworks typically provide a collection of curated Components that work seamlessly together Frameworks provide implied (or explicit) patterns and practices to help maintain good architecture and maintainability Frameworks provide proven combinations of components in use for known use cases.
  • 10. Platforms 10 Platforms go beyond software components and frameworks – Tooling – Deployment – Management – Testing – Maintenance – Versioning Platforms are trying to create cohesive technology experiences for developers and businesses Less for you to worry about, more time to focus on your domain
  • 11. Making Good Choices 11 What do I need in the short term? What might I need in the future? How has the framework evolved, will it continue? Are there enough people skilled in this framework? Is the documentation and support good? Is it an ordeal or a joy to work with? There are more considerations than how easy “Hello World” is
  • 13. ?
  • 14. A Cohesive Platform The Spring Platform consists of components and frameworks that are useful in and of themselves, but are brought together through Boot in a way that lends itself to true RAD. The framework is road-tested, and continues to be actively developed, keeping up with the latest technologies and patterns (Big Data, Reactive, HATEOS, Microservices, Cloud-deployed) and actively partnering with other OSS projects.
  • 15. Spring Boot What is it? – Dependency Management “Simplification” – Automatic Component Configuration – Cross-cutting infrastructure services – Deployment and Packaging alternatives How does it do it? – “Starter Packs” of dependencies – Convention-based configuration – Production-ready services such as metrics, health, app lifecycle. – Maven and Gradle plugins
  • 16. Dependency Management 16 Starter Packs bring together Spring and Third-Party dependencies needed to do something functionally: – Web – Data – Security – Test Versioning controlled by a parent pom.xml Include the starter packs you need, and go. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency>
  • 17. The Magic of Auto-Configuration 17 Configures based on what is in your classpath Configures based on what @Beans are in place and which aren’t Configures based on your application.yml or application.properties @EnableAutoConfiguration
  • 18. So What’s So Great About That? EG: Writing a JSON Service that reads from a DB 18 Spring Boot Way • Use/Include Spring Boot Starter Parent in pom/Gradle, add Spring Boot Starter Web and JPA • Write Controller, Service, Repository Beans and Domain Objects • Write Application class with @EnableAutoConfiguration • Run as a Jar. Old Spring Way • Configure Web Container • Create Web Project • Configure POM/Gradle/Ant dependencies (with versions) build and and packaging (150 lines +) • Configure web.xml with Spring context config files, dispatcher servlet, servlet mapping, Spring security Filter, etc.. • Write Controller, Service, Repository Beans and Domain Objects • Configure *.xml files (Or annotated @Configuration Beans) with Bean definitions, View resolvers, content-negotiation, controller mapping, resource handling, error handlers, db pooling, connections, profiles, transactionmanager, jdbc templates or JPA config. • Write code to import initial data from script
  • 19. Infrastructure Services 19 Audit Metrics Guages Tracing Configuration Views Remote management via SSH All Part of the Actuator Component
  • 20. Package and Deployment Alternatives 20 Package as a JAR – Choose embedded container (Jetty, Tomcat) – Configure container programmatically and/or via application config – Run using java –jar Package as a WAR – No web.xml required – Spring Dispatcher Servlet is auto-configured – Deploy to any Servlet container
  • 21. Choices, Choices… Do you already use Spring? • Simplify your configuration • Keep up with the latest version compatibility matrix • Introduce Circuit Breaker patterns, distributed configuration, metrics and management APIs • Get stuff done faster Are you considering using Spring? • Skip the rewrite for the JVM and write durable code! • Leverage Dependency Injection, AOP, abstractions and integrations for major data stores, security standards, web standards and more. • Fail to understand why it was known as “hard to use”.
  • 22. Code
  • 23. To-Boot https://github.com/hoserdude/to-boot git clone git@github.com:hoserdude/to-boot.git Sample App to demonstrate all manner of things, cobbled together in about 2 days. See README.md for instructions
  • 24. Things We Will Explore Boostrapping (POM, Application.class) Controllers (Routes, Marshalling, Resource Handling) Views (Thymeleaf, AngularJS) APIs (Swagger, DTO definition) Security Persistence (Config, Repositories, Domain Beans) Application Structure, DI Monitoring and Metrics Deployment Options 24
  • 26. Find Out More 26 • http://spring.io/projects • http://spring.io/guides