Magazine
 
JBoss Seam
 
leads to the reduction of the database round trips.

Web 2.0 applications also manages complex relational models for its data. Social networking sites mainly manages and represents the relationships among the users. Today, Seam is the sole technology that supports lazy loading for web application in the right direction.



4. A Web Framework that Understands ORM

Today’s most of the applications use the Object Relational Mapping (ORM) solutions. However most of these applications use those business and web frameworks which are not designed for ORM. Such framework does not even handle the persistence context throughout the interaction lifecycle starting with a request to render a response. Initially Seam was designed to promote as a ORM best practices. In case of Seam, no more DAOs are required to write; only lazy loading can work. Since the extended persistence context behaves like a natural cache and reduces database round trips therefore the ORM performance greatly improves. Since Seam
integrates the ORM layer with the business and presentation layer, therefore ORM objects can be observed working directly.

5. POJO Services via Dependency Bijection

Seam is a “lightweight framework” as it uses POJO (Plain Old Java Objects) as its services components. No framework dependent interfaces or abstract classes exist in Seam which does not allow the components to get hooked into the applications. This generates a curiosity to know the things like how do the POJOs interact with each other to develop an application and How do they interact with the services of the container.

Seam uses the most commonly used designed pattern known as “dependency injection” (DI) to connect to the POJO components with each other. Seam maintains the life cycle of all of its component with the implementation of the DI design pattern. Whenever a component uses another component then it shows this dependency to Seam with the help of annotations. Seam decides the injection place of this component according to the application’s current state.

Let’s take a seam component say P which needs to create another component say Q. It does that simply by expanding the dependency and “outjects” the component Q back to Seam for another components say R to later use it. This type of bi-directional dependency management is known as dependency bijection.

6. Avoid XML Abuse

Java annotations play an important role to express and manage the Seam configuration metadata. In the beginning of J2EE, XML was supposed as the better option for configuration management. Framework designers put all the configuration related information (such as Java classes and method names) into the XML files. However, it was not an optimised solution because XML configuration files are repetitive in nature i.e. already existing information in the code is repeated just to connect the configuration with the code and this makes
Oct 2007 | Java Jazz Up |28
 
previous
index
next
 
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69 , 70, 71, 72, 73, 74, 75, 76, 77, 78,   Download PDF