Sunday, 15 May 2016

Spring Framework in Hybris

 Spring Framework in Hybris:

Spring is a light weight because of its POJO implementation and open source framework.
 The Spring Framework doesn't force the programmer to inherit any class or implement any interface.
 That's why it is said non-invasive. Spring is a complete and a modular framework for Java platform provided and maintained by Spring source.
The Spring frame work is used by hybris.

Spring bean configuring:

<bean id=”mybean” class=”Mybean” parent=”MybeanParent”>
<!--here parent bean to inherit its configuration-->
<property name=”name1” value=”literalValue”/>
<property name=”name2” ref=”bean1”/>
 <!--property value can be literal or references to another bean-->
<property name=”name3”>
<list merge=”true”><ref bean =”bean2”/></list>
 <property name=”name4”>
<map> <entry key=”key1” value-ref=”bean3”/></map>
<!--lists and maps may be merged with definition in other extenstions--> </property>

Spring provides many components, not all of them are used in Hybris.
Mostly Inversion of control(IOC) and Dependency Injection,Spring MVC,Spring Security,Spring AOP are used by hybris.

Inversion of control(IOC) and Dependency Injection, it makes the code loosely coupled
 so easy to maintain and makes the code easy to test so Inversion of control(IOC) and Dependency Injection used heavily by hybris.

Spring MVC  framework is request-driven, designed around a central servlet that dispatches requests to controllers and offers other functionality that facilitates the development of web applications. Spring MVC. used in presentation layer/Front End in hybris. Mostly Spring MVC used in accelerators.

Spring Security,used for authentication and basic authorization.

Aspect-Oriented Programming (AOP)  hybris not used by default but usable for extending stuff which isn’t customizable by default or implementing cross-cutitng-concerns

No comments:

Post a Comment