Passion of IT

Spring: framework of whole J2EE

In the precedent page I’ve talked about J2EE and the main technologies, in a few word J2EE is composed by this layers:

  1. Presentation layer
  2. business layer
  3. persistence layer
  4. database (ETL)

Each layer have a lot of frameworks to simplify the way to make it:

  1. Presentation tier (JSF, Primefaces, Richfaces, struts) that I used in affittavetrina
  2. Business tier:web services, RMI, EJB etc
  3. persistence tier: hibernate, jpa
  4. database: oracle, mysql, DB2

But there is an universal framework that allows to make the whole J2EE, the tiers from 1 to 3, this framework is SPRING and offers the following tools:

  • Spring Model and view: these libraries allow to make the presentation tier in simple html (without any conversion like jsf) and the browser calls a server using REST services: browser of the computer client sends a request to the server via GET or POST HTTP and the server receives this request, writes the response and sends it to the client.
  • Spring Beans is the way for making the communication between client-server: server exposes these beans that client calls to get particular service. These beans contain all business logic that calls external web services or performs particular operations. Spring beans are better than EJB because they are easy to configure and they has three important functionality:
    • Dependency injection: simplify to bind two beans one with the other and separates the creation of a client’s dependencies from its own behaviour: when one or more dependencies (or services) are injected, or passed by reference, into a dependent object (or client) they become part of the client’s state.
    • Aspect programming: allows the developer to call a method of a bean after, before or around that an event is generated.
    • Scheduling: it is possible to schedule the execution of a particular method of the bean for example once a week or once a minute or one time every 6000 ms etc. Like the Quartz framework
  • JDBC Template is the tool of Spring for the persistence of the data.

spring-overview

My Spring knowledge

I Used Spring model and view to develop only one small project for one company and I tested this technology to develop Affittavetrina but I preferred JSF because last year, when I developed affittaVetrina I didn’t know Spring well and I didn’t know that JSF causes memory out of bound exception.

Today I have made an example using all the two functionalities of Spring bean: Aspect programming and dependency injection and in a few hour I finished both these my small examples.

Today is the first day that I used aspect programming and I think that it is like the technology  used by WordPress  to call modules.

And also today I tested a simple scheduler of the execution of a Spring method. Every minute the method is executed as I expected.

Spring beans are used by mule technology that allows the integration of different systems for making workflows called mule flows, I use this technology in EON energy.

 

 

1 Comment

  1. 24 October 2016    

    We are a group of volunteers and opening a new scheme
    in our community. Your web site offered us with valuable information to work on. You’ve done a formidable job and
    our entire community will be thankful to you.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite="
"> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent Comments

Michele Rizzithe website doesn't exist. Ara you a robot? In any case it's difficult that an automatic system writes a comment here since there are two captchas...
Hello there! This is kind of off topic but I need some guidance from an established blog. Is it very hard to set up your own blog? I'm not very t...
We are a group of volunteers and opening a new scheme in our community. Your web site offered us with valuable information to work on. You've done a...
November 2024
M T W T F S S
« Dec    
 123
45678910
11121314151617
18192021222324
252627282930  

Login