SPRNG PDF
SPRNG PDF
SPRNG PDF
Webapplication Framework
========================
These frameworks provides abstraction on top of Servlet,JSP and simplifies MVC
architecture based development.
M=> Model
V=> View
C=> Controller
eg: Struts(Apache foundation)
SpringMVC(Part of Spring)----> interface21(pivotal team)
JSF(Java Server Faces) -----> from SUNMS/OracleCorporation
WebWork -------> symphony
ORM Framework
=============
These frameworks provides abstraction on top of JDBC and simplifies to
develop object based DBS/w independent persitence logic
eg: Hibernate ------> redhat
TopLink ------> oracle
Ibatis ------> apache
Application Framework
====================
It is an allrounder framework that provides abstraction on top of mulitple jee
technologies and even on some frameworks to
develop all kinds of logic and different type of app's.
eg: Distrubuted application
eg:myntra application
flipkart application
amazon application....
eg: facebook application(webapplications)
eg: Spring,SpringBoot
Invasive Framework
=================
=> Devleoper class will extend or implement an interface given by framework api.
=> Because of exends and implements the devloper code would be tightly coupled
with framework api.
=> It won't promote portablity(moving the classes to new framework would not
execute).
eg: Servlet,Struts(1.X)
Note: working for a company with a bond.
Non-Invasive Framework
======================
=> Devloper class will not extend or implement any interface given by
framework api.
=> No exends and implements keyword, the devloper code would be loosely
coupled with framework api.
=> It promotes portablity(moving the classes to new framework would execute).
eg: Spring,Hibernate,......
Note: working for a company wihthout a bond.
Terminologies
-------------
1. MiddlewareServices
2. Java Bean
3. LocalClient vs RemoteClient
1. MiddlewareServices
These are addition/option/secondary logics that can be enabled or disabled on
primary logic of an application/project to make it more
perfect and accurate.
Eg: banking project
primarylogic(Mandatory logic) => deposit money,withdraw
money,check balance,openining account........
Secondarylogic(Optional logic) => Logging(history),
Auditing(Keeping
track of user activities),
Security(Authentication+Authorization)...........
3. LocalClient vs RemoteClient
===========================
If App/Comp and its client are staying on the same jvm then that client
is called as "LocalClient" to that App/Component.
If App/Comp and its client are staying on two different jvm of same or
different machine then that client is called as
"RemoteClient" to that App/Component.
Normal apps can have only local client, whereas Distrubuted apps like
EJB/RMI/WebServices can have both local and remote clients.
Spring Vs Struts
Answer. No, Struts will be used to build only webbased application
Spring can be used to build any type of application.
SpringMVC is an alternative to Struts.
Spring vs Hibernate
Answer. NO, hibernate is orm framework to build peristence logic
Spring has its own orm module through which it promotes
abstraction
SpringORM,SpringDataJPA is an alternative to hibernate.
SpringCore
==========
=> It is base module for other modules.
=> This module is given to supply Spring containers to perform Dependancy
management.
=> This module gives 2 spring containers/IOC[Inversion Of Control] containers
called
a. BeanFactory Container
b. ApplicationContext Container(Latest one)
=> These 2 containers perform the following operations
a. It manages the SpringBean/Object life cycle
b. It performs Dependancy Management
a. Dependancy LookUp[JNDI]
b. Depenancy Injection[commonly used]
What is SpringBean?
Any Java class(PreDefined/userDefined/ThirdParty api) whose object is created and
managed by Spring container is called "SpringBean".
Dependancy Management
=====================
=> It is the process of assigning dependant object to Target object by loading
both the classes and by creating the objects for both
the classes.
=> The classes/objects which uses the other class services is called "Target
class".
=> The classes that acts like helper class to main/target class is called
"Dependant class".
eg:: Target class => Flipkart, Vehicle,
Student, Mobile
Dependant class => DTDC , Engine ,
CourseMaterial, SIM
1. Setter Injection.
=> It is the process of assigning dependant object to Target object by
loading both the classes and by creating the objects for both
the classes and injecting the Dependent object to Target Object using
Setter is called "Setter Injection".
refer:SetterInjection-01