A Techno Blog, mainly about Java

Frameworks and such

A co-worker pointed me to this article by Rod Johnson on J2EE frameworks and the application programming model. The article is dated as January 2005.

The application code calls a class to perform a service (i.e LOG4J) ,  whereas a framework calls application code and manages the flow of control.

Thus, frameworks are are a set of classes that make up a resusable design that are used by extending them rather than instantiating them. One important point on that is mentioned is that successful open source frameworks are better tested than creating an in house one. People are more open to adpot an open source framework if it delivers clear benefits, whereas in house frameworks are often mandated.

Struts – an open source MVC framework (pull data from model, pushes data to view). Its a layer on top of the Servlet/JSP model.

Hibernate – first popular O/R Mapping open source solution. It was poular due to ease of use.

Spring – integrating the application stack. Model in which application objects decopled from the J2EE environment (i.e reusable) and the framework instantiates the and configures them for use. Also, provides declaritive transaction managemnt of POJO.

Web Layer – accpets input from the user . Presents results it recives from the application layer for a given request. As well, displays an error messages or warnings. (Struts )

Application layer – accepts input from the web tier, invokes the
proper  application object. The application objects will invoke business object(s) to
accomplish the requested tasks. The results the application objects  recieve from the business objects are pushed presentation layer for display. (Spring)


Business  Layer – Made up of business objects which perform
specific tasks or services. They invoke data access objects to communicate
with the database.

Data Access  Layer –  This consists of data access objects that communicate
directly with the database. Data access
objects (DAOs) contain methods that each execute specific queries against the
database. DAOs extract the results of queries into object collections that are
returned to the business objects. (Hibernate)



Continue reading

August 20, 2005 Posted by | IoC | Leave a comment