What should I learn before learning Spring?

How to code or program.

Knowing Java means you know a programming language, not that you know how to program. Knowing how to program means that you know the structuring principles to putting an application together. You know when to use a linked list instead of an array.

The way I began to learn programming is the book: The Structure and Interpretation of Computer Programs. Also known as SICP. Read it and do the exercises. More than once.

I have run across many people who read Java, and even write some Java. But all they could really do is crib code snippets. The did not understand how the whole thing worked.

Also, I think you don’t need any other specific prerequisites to learn Spring. But it is still enormous, if you move beyond Spring IOC, you might want to peek into JavaEE a bit and get a foundation of what’s there.

Once you’re comfortable coding using Spring, then you might want to get certified.

We halved the price of our simulators at www.springmockexams.com and www.javamockexams.com for limited time only –  take a look here bit.ly/SMEBP and here bit.ly/JMEBP

What is Java Spring Framework?

Spring is frame work for different kinds of application development. It can provide bunch classes which is internally used the J2EE supplied classes. Meaning, we can say that spring is an alternate to struts but complement to J2EE.

Spring Framework Features 

Spring Framework is non invasive: No need for you to implement any interface or inherit any class from this framework to your classes.

Spring Framework is Light weight: Spring is a vast framework so users divide the whole spring in to different modules which are dependent to other module , except Spring core module.

End-to-end Development : Spring framwork supports almost all aspects of application development,  so users would be able to develop a complete application using it.

Spring Framework supports differet types of application development: We can develop any type of applications using Spring Framework. Example: Core java, web Application, Distributed application, Enterprise application.

Spring Framework is versatile: It can be integrated into any technology.

Spring Framework ports dependency injection: The dependency between classes are managed by spring framework.

Dependency injection:

Spring core is one module which deals with dependency management. This means that arbitrary classes provided to spring, can manage dependency.

What is dependency?

From a project point of view, multiple classes are specified with different functionality. Each of these classes required some functionality of other classes, Example:

  1. class Engine
  2. {
  3. public void start()
  4. {
  5. System.out.println(“Engine started”);
  6. }
  7.  
  8. }
  9.  
  10. class Car
  11. {
  12. public void move()
  13. {
  14. // For moving start() method of engine class is required
  15. }
  16. }

Here class Engine is required by class car so we can say class engine is dependent to class Car, So instead of we managing those dependency by Inheritance or creating object as fallows.

By Inheritance:

  1. class Engine
  2. {
  3. public void start()
  4. {
  5. System.out.println(“Engine started”);
  6. }
  7.  
  8. }
  9. class Car extends Engine
  10. {
  11. public void move()
  12. {
  13. start(); //Calling super class start method,
  14. }
  15. }

By creating object of dependent class:

  1. class Engine
  2. {
  3. public void start()
  4. {
  5. System.out.println(“Engine started”);
  6. }
  7.  
  8. }
  9. class Car
  10. {
  11. Engine eng=new Engine();
  12. public void move()
  13. {
  14. eng.start();
  15. }
  16. }

Instead of managing dependency between classes, spring core handles the dependency management. However, the classes must be designed with some design technique that is Strategy design pattern.

Thanks for reading our “What is Java Spring Framework?” article. If you liked it, then please share with your friends and colleagues. If you have any feedback or doubt then please leave us a comment.

By the way, I am also really happy to announce some very exciting news: to celebrate the imminent release of Spring 5 and Java 9,  we launched our simulators SALE CAMPAIGN. We halved the price of our simulators at www.springmockexams.com and www.javamockexams.com for limited time only. Take a look here bit.ly/SMEBP and here bit.ly/JMEBP

If you are interested in collaborating with us, you can join our partner program at bit.ly/SMEPART  and here bit.ly/JMEPART