• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between Spring Boot and Spring

 
Greenhorn
Posts: 14
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the difference between Spring Boot and Spring (which I didn't realize came with Tomcat...I don't recall seeing it on my cloud VM bundles here at work).
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring Boot simplifies the creation and configuration of Spring applications.  I don't know about you, but I've run into problems with Spring trying to get the correct version of a dependency to work with a particular Spring library or figuring out which configuration switch to set in order to get the expected behavior.  You ever play Myst?  It's like that.
Spring Boot removes a lot of the mystery out of Spring by defining the expected behavior up front.  Dependency versions are explicitly declared, so one doesn't have to hunt around for the correct version of X to go with Spring version Y.  It can also embed a server (Tomcat, Jetty or Undertow) with the application which makes deployment easier and, I presume, using containers like Docker easier as well.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Formally, it's not "Spring", it's The Spring Framework. Just "Spring" for short.

Spring has at its core a Bean Factory - a service class that servers as a general-purpose creator and dispenser of JavaBean objects. Given the name of a bean in its inventory - which is often defined by an XML file and/or annotations on included bean classes - the factory can then create and initialize an instance of that bean. Or, if the bean is defined as a singleton object, create the first instance and pass references to it to subsequent requesters.

Along with basic construction, the factory may also inject references to other Spring-managed beans into a bean being initialized before it's returned to the requester. That implements the Inversion of Control (IoC) or "wiring" pattern where you don't make beans connect themselves to each other, but instead have the framework do it automatically. Which makes it easier to build a project out of pre-defined parts as well as swapping plug-compatible parts for things like testing. I like to consider it the software equivalent of a TinkerToyâ„¢ set.

Over the years, a number of functional support subsystems ("Projects") have been built as optional add-ons to the core Spring. For example, Spring Data deals with persistent data storage and provides an abstract mechanism for database CRUD functions and finders. Under it are different flavors such as raw JDBC, JPA, graph databases (Neo4J) and NoSQL databases. Spring Data takes care of a lot of the repetitive coding automatically, including error recovery and it normalizes error exceptions to make it easier for an application to tell why a request failed.

Spring Data is popular, but there's a lot more, including Spring Scheduling, Spring Batch, Spring Web, Spring Security, and on and on.

Spring Boot is a relatively new and very popular Spring Project. Instead of developing individual webapps that must be configured and deployed into webapp servers, Spring Boot builds a stand-alone application that contains a webapp server and a user application all rolled into one and ready to launch with a single command. This is certainly useful for making desktop-based web apps (At one time, VMWare had a console app like that, but alas, before Spring Boot), but in today's container-based paradigm it's a natural fit for a container. A relatively simple Dockerfile, a Spring Boot executable and you can be deploying a whole farm of elastic hosts in less than an hour!

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic