How many of you guys have heard about Spring and Spring Boot frameworks? If you are a so called "Java guy" , you'll probably have heard and might have even worked with these two frameworks. In this blog post I'll give you all a brief introduction to these two frameworks , including a comparison between these two. In the latter part of this post I'll show you how to create a simple Spring Boot application in 5 minutes.
So what is this Spring Framework? Spring is actually a very popular application development framework for the Java platform, specifically useful in developing enterprise Java applications.
There are several reasons behind its popularity among the Java community:
2.Type in the name of group (package name) and artifact (project name). At this stage no need to add any dependencies because all the dependencies will be automatically downloaded by Spring Boot. Then click Generate Project button.
3. Once the button is clicked a zipped project will be downloaded to your PC.
4. Extract the project folder inside the zipped folder to a know location .
5. Open a suitable IDE (ex: Eclipse) and import the extracted project folder.(Note: This might take a while as there are a large no.of maven and Spring Boot dependencies to be downloaded). Once completed it will look as follows:
6. Run the selected source file (as in the above picture), and see the output.
    
This is only a brief introduction about the basics of Spring and Spring Boot frameworks. Actually the most exciting features of these frameworks lies further beyond. So if you are interested in learning more, there are a huge number of tutorials, documentations and etc up there on the internet, where you can learn to be a expert on these frameworks.
There are several reasons behind its popularity among the Java community:
- Inversion of Control
- Aspect- Oriented programming
- Data Access
- Transaction Management
- Model-View-Controller architecture
- Remote access framework
Now lets have a look at the Spring Boot Framework. Spring Boot framework was developed on the existing spring framework. As we discussed above , Spring having so much great features and being very popular among the developers , what made people to use Spring Boot over the Spring framework? There were actually a few shortcomings of Spring framework which caused the emergence of the Spring Boot framework. With the Spring framework following problems were encountered :
- Lot of configurations and boilerplate code to manage
- Bootstrapping the project involves a lot of time
- Harder to integrate frameworks and libraries
- No clear support for microservices
Spring Boot uses a new development model that makes developing Java applications very easy by avoiding some tedious development steps and configurations. It also brings in several features that solves the above mentioned problems with Spring framework:
- Convention over Configuration.
- Standardization for Microservices.
- Integrated (embedded) server for development.
- Support for 3rd party libraries.
- Easier integration with other frameworks
Spring Boot provides lots of starter packages and plugins to develop and test Spring Boot applications very easily and quickly using build tools like Maven and Gradle.
Creating a Spring Boot application using Maven just in 5 minutes
1. Go to the site https://start.spring.io/. Following window will be displayed2.Type in the name of group (package name) and artifact (project name). At this stage no need to add any dependencies because all the dependencies will be automatically downloaded by Spring Boot. Then click Generate Project button.
3. Once the button is clicked a zipped project will be downloaded to your PC.
4. Extract the project folder inside the zipped folder to a know location .
5. Open a suitable IDE (ex: Eclipse) and import the extracted project folder.(Note: This might take a while as there are a large no.of maven and Spring Boot dependencies to be downloaded). Once completed it will look as follows:
6. Run the selected source file (as in the above picture), and see the output.
This is only a brief introduction about the basics of Spring and Spring Boot frameworks. Actually the most exciting features of these frameworks lies further beyond. So if you are interested in learning more, there are a huge number of tutorials, documentations and etc up there on the internet, where you can learn to be a expert on these frameworks.


Comments
Post a Comment