FXL Project - Introduction
Preface
The software of the future must be flexible in order to adapt to continuous change. The Flexible XML-based Languages (FXL) project is a research project that uses the universal basis of xApproach and other modeling approaches to provide consistent solutions for varying tasks in current software applications. By illustrating the use of FXL/xApproach principles in several contexts, e.g. industrial projects concerning Service-Oriented Architectures (SOAs) and Web Services, it's general relevance can be underscored. The following sections help to introduce related background information and the current fields of application.
The XML-based Approach (xApproach)
xApproach is a term for some basic principles that repeatedly emerged within the FXL project. First of all, it describes the fact that every document of a certain non-XML-based programming language can be alternatively converted into a XML-based representation/model (see Figure 1). This xLang model does not require a special format, e.g. specific element names, but implies the fact that a reverse converter can create the original representation (with or without information loss). Additionally, each model can be equipped with several views (plain-text, graphical, etc.) that are optimized for specific needs.
Code Representation Principle
Figure 1: Representation Principle
The second principle concerns the aspect of model transformation capabilities. Every document xLang can be easily transformed into a derived document xLang* that differs from the original document with, for example, changed functionality or structure. The transformation T1..Tn are described with the help of XML transformation languages (like XSLT, xQuery, TL1.0, etc.) and can be executed via new or common tools (e.g., a pipeline controller PC for XSLT-tasks). Figure 2 depicts the underlying process.
Code Transformation Principle
Figure 2: Transformation Principle
Both principles suffice to reap several advantages concerning different fields of application. Some of them are mentioned below:
1. Creation of Domain-specific Languages (based on XML models that can be easily integrated in MDSD approaches and tool chains such as MDA/UML, EMF/eCore, etc.)
2. Customization of Software/Software Generators (removal/modification of existing code blocks, insertion of new code blocks, (de)activation, etc.)
3. Technology Mapping (e.g. mapping from a high-level abstraction to low-level technologies or languages)
4. Separation of Concerns (realization of crosscutting concerns, dynamic or static weaving via XML transformations, etc.)
5. XML Binding (e.g. to realize correlations between xLang documents and objects )
The FXL Core Framework
The FXL Core Framework implements the main principles of xApproach. First, this includes the representation principle. The (plain-)text-to-model transformations are realized with the help of the parser generators (e.g., ANTLR) and tailored Abstract Syntax Tree (AST) walker routines. For this, each supported language is specified in a XML schema file, whereby the plain-text oriented grammar files are equipped with a Java-based tree-walker that maps the AST-nodes to the specific XML model (elements, attributes, etc.). Additionally, all integrated languages (such as DSLs) need a specific transformation file that is able to convert the model representation back into the corresponding plain-text representation. In this context several transformation languages, like XSLT, xQuery or TL1.0, are available and supported by the reference implementation. The FXL Core also includes modules for the realization of intra- and inter-model transformations. Therefore an XML pipeline engine, that supports the XML Pipeline Definition Language Version 1.0, was implemented. This engine is able to execute several pre-defined process types (transformations, merging, etc.). In this way, flexible, XML-based transformation capabilities are provided. Additionally, the framework leverages common modeling approaches and tools such as MDA/MOF, EMF/eCore, etc.
The FXL Editor
The FXL Editor was developed with the intention to bring the FXL Core capabilities into the development phase and make it accessible to programmers. The GUI-based editor application consists of a basic project editor and the additional core functionality components. This includes an xView option for source code documents, graphical pipeline execution, varying libraries and support for the complete xBuild processes. With editor version 1.1 extra perspectives, e.g. for maintenance (allowing the customization of variation points) and run-time, are added. A complete download can be found here. Basically, a standalone application and FXL Eclipse plug-in are available.
Flexible XML-based Languages (FXLs)
All FXLs are based on the principles of xApproach which enable a flexible creation of higher abstraction levels and domain-specific languages. The fact that for every programming language Lang a representation xLang (model) can be generated, enables customized languages and the flexible mapping to varying target technologies/languages. In this context, several advantages can be reaped, e.g. concerning the creation of a Service Language Layer or an optimized Transformation Language.
Service Language Layer (SLL)
Current approaches in the field of service-oriented architectures and Web Services (WS) leave numerous challenges unaddressed. This, for example, concerns the technical complexity, comprehension and several flexibility aspects. Regarding complexity and comprehension, the WS standard and technology jungle (SOAP, WSDL, UDDI, BPEL, WS_Transaction, JAX-RPC, JAXM,  etc.) creates difficult and time-intensive constraints that must be mastered. SLL addresses these open issues and introduces a flexible domain-specific language for Service Oriented Architectures (SOAs). Figure 3 depicts the underlying technology process which uses a platform-independent model that can be converted to several platform-specific ones.
SLL-based Technology Mapping / Cross Compilation
Figure 3: SLL Technology Mapping
In the first step it makes sense to use SLL for any kind of (web) service description and to avoid any advance decision for implementation technologies. Via the subsequent application of the representation principle, SLL can be converted into an XML-based model xSLL that is the starting point for the flexible mapping from the existing "high-level" abstraction to "low-level" technologies. The mapping routines are be provided by the transformation principle implementations, whereby each target technology transfer must be defined in a concrete inter-model transformation file (e.g. TL1.0). By this means, in one case the xSLL based service description can be, e.g., mapped to a WSDL + BPEL description and in another case converted into an WSDL + Apache Axis implementation. Further information is available in the SLL Guide.
Transformation Language (TL)
The Transformation Language Version 1.0 (TL1.0) is an domain specific language for the development and description of language transformation processes (e.g., intra-model and inter-model). TL1.0 forms an optimized layer of abstraction that can be converted to current XML transformation standards like XSLT or xQuery. In this way, all transformations can be described without a decision for a concrete standard or technology and with the flexibility to choose an individual solution. The TL1.0 implementation is shipped with the FXL Core Framework.