SPRING FRAMEWORK
Before getting into Spring Framework, we will see what Java Framework is?
Java Framework is a collection of predefined classes and functions that are used to process input, manage hardware devices, interact with the system software, etc. It's a java platform for developing software applications & java programs. Suppose you're a civil engineer and you are given a building to construct. What will you do as a first step? You will create a basic structure or plan. This basic structure is a framework, For developing the building we require some tools, like a hammer, chisel, etc.
Similarly, in software development, some examples of the frameworks are Spring, SpringBoot, Hibernate, etc. Some examples of tools are maven and Gradle.
These are some of the Advantages and Disadvantages of Java Frameworks
Advantage :
1) Efficiency: The code which you are going to use will be efficient.
2)Secure: it's gonna be secure
3)We want Less Expense
4)Support: Support in the form of documentation or the form of
various stack overflow threads coming in.
so it's going to be very easy for us to manage any problem which we have.
There are various disadvantages evenly associated with the java framework
1)You got restriction: We are restricted to use an API, the way it is, so you can’t modify it now.
2)Then the code is public: which means that you are going to use any of the APIs. The same API is exposed to the public.
3)finally, the custom-built features: If you have an API, you can write your code, but if you don't know the technology behind the API, thus you may face challenges,
So, we have various java frameworks available now. We have GWT, Hibernate, Spring, Grails, Hadoop, Structs, etc.
Specifically, we are supposed to discuss the Spring Framework.
Spring Framework
It is the most popular application development framework for enterprise java. Spring makes programming Java quicker, easier, and safer for everybody. Spring's focus on speed, simplicity, and productivity has made it the world's most popular Java framework. It has been an Open Source Java Platform since 2003.
Why do we need it?
When we're working on web/ software/ enterprise development, We have a module in spring. For Eg: One of the common issues we face is dependencies. {ie, one object needs some other object }. Spring says you don't have to worry about that. I will give you the features of IOC and dependency Injection
So, then What is IOC and Dependency Injection?
IOC {Inversion Of Control } means letting a framework take control of the execution flow of your program, to do things like creating instances of the class, inject dependencies, etc. To enable this framework, we use abstraction.
IOC Container is a common characteristic of a framework that implements IOC. The Spring IOC Container is responsible for instantiating, configuring, and assembling objects known as beans as well as managing the life cycle.
Dependency Injection: is a design pattern in which a class requests dependencies from external sources rather than creating them. It achieves that by decoupling the usage of an object from its creation
These are some of the other features of the spring framework.
-
Open Sources - You can anytime have access to code, you can manipulate it and u can use as in your domain
-
Comprehensive Tool - We got comprehensive tools available in the spring framework
-
Light Weight - It is Lightweight when we talk of the memory part.
-
Solves Problems - It is very much relevant in solving the problems. Because it follows the design pattern and it effectively solves all the problems which we face in the enterprise edition of java.
-
The framework of Framework - you can use a lot of frameworks within the spring framework.
-
Avails array of resources - We got a lot of resources. So you can avail a lot of features within the spring framework. Even support like unit-testing is also available in the spring framework itself.
You must be logged in to post a comment.