Monday, 20 July 2015

The Spring Framework Series(Introduction)





  1. The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform.
  2. in the next few weeks we would be taking time to break this big framework into bits.. i mean bits... I have heard about theoretical jargons about inversion of control, pretty much sums up why some of us must have knocked our heads to ask if we were really in our field.. believe me a few times it does happen.. especially when u have a serious subtle bug that could have been solved only if u had slept .i.e cached web pages, semi colon in javascript, server configurations and the worst of all calling the wrong method or function...
  3. Let me explain Dependency Injection/ Inversion Of control in my little experience, stack overflow style.. LOL!!. The main aim of dependency injection is to make software components less dependent(loosely coupled rather than tightly coupled.... story for another day)..  such that a change to one part of a sofware doesnt necessarily brings it to ground zero. i would be using my great university as a big example.. im sorry if you dont know that already.. OAU!!... I joke... I joke!

  4.    




 YEAH!!!! This would work but this is a wrong design pattern!

This would work well .. BUTTTTTT......   lemme explain!

1. this is hardcoded because we have to initialize the ViceChancellor object every time we use the University class. which the dependency injection paradigm negates .. it assumes all objects are loosely coupled.

2. It is untestable as we cant Mock the classes easily.. MOCK with mockito!!!!! another story , we would see that later guys..



NOW!!! This is more like IT..

Enough of the running around.. Lets go to  Spring !

The Spring framework is divided into these parts.. One good thing about spring framework is the ability to use any of its parts without using others.



Spring Framework parts

Lets explain each in essence, We would take it part by part.. We Start with Spring Configuration.. Get all these ready before next series. 
1. Eclipse IDE
2. You must have installed maven on system and its plugin
     (http://stackoverflow.com/questions/7111483/installing-apache-maven-plugin-for-eclipse)

Contact me on twitter via @AmaCodeCode or fatimeindare@gmail,com