Statements
|
EZMorph's key strenghts are:
-
Supports transformations for primitives and Objects
-
Supports transformations for multidimensional arrays
- Supports transformations with DynaBeans
- JDK 1.3.1 compatible
- Small memory footprint (~76K)
|
Morph is a Java framework that eases the internal interoperability
of an application. As information flows through an application, it
undergoes multiple transformations. Morph provides a standard way to
implement these transformations. For example, when a user submits data
using an HTML form in a J2EE application, the data typically goes
through three transformations. First, HTTP request parameters are
converted to presentation-tier command objects. Second, the command
objects are converted into business objects. Finally, the business
objects are persisted to a database.
In addition to
providing a framework for performing transformations like those
described above, Morph provides implementations of many common
transformations, including all three of the transformations in the
example above (1 and 2 are done now, 3 is partially done). As you can
see, Morph is surprisingly powerful out-of-the-box, but it can't solve
every problem. Instead, it provides a simple API you can use to harness
its power for your particular situation. It has been built from the
ground up for flexibility and extensibility, and integrates seamlessly
with dependency injection frameworks such as Spring, PicoContainer and Hivemind.
Many of the ideas in Morph were inspired by the Apache Jakarta Commons BeanUtils project, the Apache Jakarta Commons sandbox component called Convert and the Context notion of the Apache Jakarta Commons Chain
project. Morph synthesizes ideas from these various areas into one
consistent API. Implementations are be provided that solve many common
problems such as mapping HTTP request parameters to POJOs and
converting a SQL statement into Java objects.
|
Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another.
Typically, these Java Beans will be of different complex types.
Dozer supports simple property mapping, complex type mapping, bi-directional mapping, implicit-explicit
mapping, as well as recursive mapping. This includes mapping collection attributes that also need mapping
at the element level.
Dozer not only supports mapping between attribute names, but also automatically converting between types.
Most conversion scenarios are supported out of the box, but Dozer also allows you to specify custom
conversions via XML.
The mapper is used any time you need to take one type of Java Bean and map it to another type of Java Bean.
Most field mapping can be done automatically by Dozer using reflection, but any custom mapping can be
predescribed in XML format. Mapping is bi-directional so only one relationship between classes needs
defining. If any property names on both objects are the same you do not even need to do any explicit
property mapping for these fields......
|