JiBX
Encyclopedia
JiBX is an open source
Java
framework
for XML data binding
. It solves the same problem as JAXB, XMLBeans
and JDOM
, but works differently. It lets developers
work with data from XML documents using Plain Old Java Object
s (POJOs). The JiBX framework uses a binding definition to tell it how the Java objects
relate to the XML
. It is designed to perform the translation
between internal data structure
s and XML with very high efficiency, and is generally considered the fastest XML data binding framework for Java.
JiBX differs from other Java-XML transformation tools such as JAXB, XMLBeans
and JDOM
in that it is not based on code generation but on "Mapped Data Binding". In other words, the Java class and the XML document being mapped are both treated as first class objects and one is not generated from the other. This approach is particularly powerful in building systems to a Service-Oriented Architecture (SOA) because it decouples the domain model (Java) from the service interface (input and output XML documents).
With traditional Java-XML tools, the XML document is first used to generate a set of Java classes, then in a second step, attributes are copied from these intermediate Java classes to the domain Java classes using a tool like Dozer (or simple getters and setters). JiBX reduces this two-step transformation to a single step. Byte code enhancement is used to embed the conversion code directly into the classes, thus avoiding the generation of additional translation classes.
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...
for XML data binding
XML data binding
XML data binding refers to a means of representing information in an XML document as an object in computer memory. This allows applications to access the data in the XML from the object rather than using the DOM or SAX to retrieve the data from a direct representation of the XML itself.An XML data...
. It solves the same problem as JAXB, XMLBeans
XMLBeans
XMLBeans is a Java-to-XML binding framework which is part of the Apache Software Foundation XML project.-Description:XMLBeans is a tool that allows access to the full power of XML in a Java friendly way...
and JDOM
JDOM
JDOM is an open source Java-based document object model for XML that was designed specifically for the Java platform so that it can take advantage of its language features. JDOM integrates with Document Object Model and Simple API for XML , supports XPath and XSLT. It uses external parsers to...
, but works differently. It lets developers
Software developer
A software developer is a person concerned with facets of the software development process. Their work includes researching, designing, developing, and testing software. A software developer may take part in design, computer programming, or software project management...
work with data from XML documents using Plain Old Java Object
Plain Old Java Object
In computing software, POJO is an acronym for Plain Old Java Object. The name is used to emphasize that a given object is an ordinary Java Object, not a special object...
s (POJOs). The JiBX framework uses a binding definition to tell it how the Java objects
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...
relate to the XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
. It is designed to perform the translation
Translation
Translation is the communication of the meaning of a source-language text by means of an equivalent target-language text. Whereas interpreting undoubtedly antedates writing, translation began only after the appearance of written literature; there exist partial translations of the Sumerian Epic of...
between internal data structure
Data structure
In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks...
s and XML with very high efficiency, and is generally considered the fastest XML data binding framework for Java.
JiBX differs from other Java-XML transformation tools such as JAXB, XMLBeans
XMLBeans
XMLBeans is a Java-to-XML binding framework which is part of the Apache Software Foundation XML project.-Description:XMLBeans is a tool that allows access to the full power of XML in a Java friendly way...
and JDOM
JDOM
JDOM is an open source Java-based document object model for XML that was designed specifically for the Java platform so that it can take advantage of its language features. JDOM integrates with Document Object Model and Simple API for XML , supports XPath and XSLT. It uses external parsers to...
in that it is not based on code generation but on "Mapped Data Binding". In other words, the Java class and the XML document being mapped are both treated as first class objects and one is not generated from the other. This approach is particularly powerful in building systems to a Service-Oriented Architecture (SOA) because it decouples the domain model (Java) from the service interface (input and output XML documents).
With traditional Java-XML tools, the XML document is first used to generate a set of Java classes, then in a second step, attributes are copied from these intermediate Java classes to the domain Java classes using a tool like Dozer (or simple getters and setters). JiBX reduces this two-step transformation to a single step. Byte code enhancement is used to embed the conversion code directly into the classes, thus avoiding the generation of additional translation classes.