xfy Component Architecture

1. Overview of xfy Component Architecture

1.1. Need for Ideal Environment to Create and Edit XML Document and Functional Enhancement

Using XML, you can create any XML document that defines elements and attributes to meet your needs for them. Also, with the concept of the namespace introduced, you can now create a compound XML document that uses multiple XML vocabularies in a single document. You could create and edit these XML documents only in the following two ways:

  • Using an Editor to Enter Tags Directly
    You use a text editor or XML editor that can help you enter tags to create and edit your XML document. The document you are editing is displayed along with the tags. You directly work with tags to add or delete elements from the document. To do so, you must have in-depth knowledge of definitions for elements and attributes included in your XML vocabulary. You can, however, edit different types of XML documents and compound XML documents in a single editor. You can also modify the structure of your XML document easily.
  • Using an Editing Tool Specific to Each Type of XML Document
    When you fill in and edit the provided fields appropriately and confirm your editing, the tool outputs the XML document. In order to edit XML documents, you aren't required to have knowledge of elements and attributes. But you must have a specific editing tool for your type of XML vocabulary used in the XML document to be edited. When you edit a compound XML document, the editing tool must support all types of XML vocabulary. You must make changes to your tool itself to modify the structure of your XML document.

However, for the ideal environment for creating and editing an XML document, all of the following conditions are required.

  • Editing every type of XML document
  • No thought required for elements and attributes used in XML document
  • Natural and reasonable editing operation

Also, for the created XML document, it is necessary to save it not only within a file system, but also in network storage or under server program environment. When trying to implement all these demands in one application, it is easy to imagine that the user difficulty because of the large number of functions.

1.2. Flexible Enhancement with xfy technology's Component

xfy technology is intended to eliminate such problems and provides the appropriate editing environment for all XML documents, including compound XML documents. xfy technology implements various features as indivisual xfy component, such as XML document display and editing, XML sub-tree's process and calculation, and file load and save. By appropriately combining these xfy components according to situation and enhancing functionality, you can realize ideal edit environment for target XML document.

In xfy technology, xfy components for some essential functions are provided in advance. Since these xfy components aren't specialized to a single usage, you can use it in any situation where you edit XML documents. And if necessary, you can create specialized xfy component and combine and use it with other xfy components.

The xfy component is usually created with Java language. You can also use the XVCD described later to create a component to display and edit XML vocabulary. Created xfy component becomes available when it is archived to JAR (Java archiver) file format and placed in running environment of xfy technology user agent.

2. Functional Enhancement Example

xfy technology can afford the following functional enhancements:

2.1. Using Additional Component Provided by xfytec.com

In xfy Basic Edition, you can append additional components (components not included in the standard configuration of xfy Basic Edition) provided by xfytec.com by using xfy component's update function.

For information about xfy component's update function, see "Updating and Appending xfy Component" of xfy Basic Edition Operation Manual.

2.2. Appending Display and Edit Functions for New XML Vocabulary

To use a new XML vocabulary in xfy technology, create a vocabulary component that supports the display and edit of XML vocabulary. The component that supports the display and edit XML vocabulary is called vocabulary component. The major vocabulary component examples are shown below.

  • XHTML Component for xfy
  • SVG Component for xfy

Vocabulary component is the most characteristic component for functional enhancement in xfy technology. This component can be created not only by Java language as well as by other components, but also by using script called XVCD described later.

2.3. Enhancing Function Library such as XPath Function

The function library used in xfy technology can be enhanced by creating a component. To enhance function library, create the following components:

Creating these components allows you to add the function or instruction for complicated numeric value calculations or string operations.

2.4. Appending I/O Functions Corresponding to New Protocol and Server

You can create a component to enhance file I/O functions of xfy technology such as addition of new protocol besides protocols provided by xfy technology beforehand or addition of access method to server. These components are called I/O component. Possible functions that provide I/O component are as follows:

  • Retrieving files from server through network
  • Loading files in formats other than XML by converting it into XML format
  • Customizing how to save an XML file

2.5. Appending Functions to Application Window Itself and Reconstruction

The application that uses a mechanism to edit XML document with xfy technology can be created by combining xfy components. A component that may reconstruct application window itself or add function can be created at this time. These components are called application component. xfy Basic Edition is an example of an application using xfy technology.

2.6. Other Functional Enhancements

You can create more types of components besides mentioned above according to your purposes. You can also expand interface definition that a component uses.

3. Implementing Functional Enhancement

This section describes the overview of functional enhancement in xfy technology.

3.1. Developing Vocabulary Component with XVCD

xfy technology provides a Vocabulary Connection mechanism. Vocabulary Connection combines new XML vocabularies to existing XML vocabularies, allowing you to utilize display and edit features provided in the existing XML vocabulary components. XVCD is the script to use Vocabulary Connection. Using XVCD, you can easily create vocabulary components which supports new XML vocabularies.

For technical overview of vocabulary component, see "Vocabulary Connection Technical Overview". In addition, for vocabulary component development overview with XVCD, see "Vocabulary Component Development Overview with XVCD", and for development tutorial based on samples, see "Vocabulary Component Development Tutorial with XVCD" respectively. For information how to read a reference for development, see "How to Read Reference"

3.2. xfy Component Development with Java

Java language allows you to create various xfy components such as vocabulary component.

Xfy component development with Java overview, tutorials, samples, etc., will be provided in the future from xfytec.com.

3.3. JAR File

xfy component created with XVCD or Java becomes available when it is archived to JAR (Java archiver) file format according to given steps and placed in running environment of xfy technology user agent. The relationship between JAR files and xfy components is not necessarily one to one; one JAR file may contain multiple xfy components, or conversely, one xfy component may be composed of multiple JAR files.

Created JAR files become available when placed in the running environment of the xfy technology user agent. The folder structure of the running environment of xfy technology user agent are shown below:

[-] bin                      :  Folder in which executable files of the xfy technology user agent is placed
    [+] common               :  Folder in which JAR files commonly used from multiple components are placed
    [+] plugins              :  Folder in which a JAR files are normally placed
        xfyBasicEdition.jar  :  JAR file that starts xfy technology user agent, or 
                                initializes each JAR file

The JAR file destination that contains common xfy components used from multiple xfy components is different from that which only contains normal xfy components used when necessary. The JAR file that contains common xfy components used from multiple xfy components is placed under a common folder. The JAR file that only contains normal xfy components is placed under the plugins folder. Create folders by vendor in the destination folder to place the JAR files.

The JAR file placed in common folder is loaded upon xfy technology user agent startup. Oppositely, for JAR file placed in plugins folder, only functional enhancement information by components contained in the JAR file is loaded upon xfy technology user agent startup. The program itself is loaded when a function provided by the component is necessary.