CompatibL Generator

Overview

CompatibL Generator is a tool for creating any type of code that is too labor intensive to create by hand. It includes a comprehensive template library developed by CompatibL for a variety of code types, and a flexible template engine for the users to create their own definitions. To describe the code structure, CompatibL Generator uses FreeStyle, a flexible XML format for capturing source code and object models without regard to the programming language or API for which they were originally developed.

CompatibL Generator is a great way of eliminating repetitive programming tasks. It can generate wrappers for legacy or third party APIs, serialization code, validation code, and many other types which that are time consuming or difficult to create by hand. If the type of code you would like to generate is not supported directly, it can be added to the software using the template engine.

One of the most popular applications of CompatibL Generator is creating Java and .NET APIs for C++ or C libraries. The Generator takes care of the complexities of cross-language programming, making the resulting APIs as easy to use as native code.

If you are working with more than one programming language or technology, CompatibL Generator is a tools that can tie together disparate development tools and environments using a single set of FreeStyle definitions. CompatibL Generator works together well with platform specific software such as Visual Studio or Eclipse as a pre-build step which generates the code and definitions for each specific programming language and platform.

How it works

CompatibL Generator uses a single set of cross-platform FreeStyle definitions to manage both edited and generated source files. From this single set of definitions, CompatibL Studio creates native files for each development platform. This includes both fully generated source files such as headers, interfaces, serialization, validation, and all other standard aspects of the implementation, as well as implementation stubs which are subsequently edited by the user. It also creates configuration, schema, and resource files for each platform.

For the edited implementation stubs, the update process preserves edited sections of code during regeneration and alerts the developer when function signature has been modified or new function has been added. This approach is frequently employed by GUI development environments and is familiar to most developers.

The Generator also creates Visual Studio and Eclipse project and solution files and Unix makefiles.

Cross-Platform Programming

CompatibL Generator assures complete equivalence of the code generated for different programming languages and platforms. This includes those cases when a given programming platform lacks native support for a specific feature, for example the ability to serialize any object in C++ into an XML or binary stream. In such cases CompatibL Generator provides an implementation where the compiler or native libraries do not.

CompatibL Generator also supports those cases where the underlying technology is supported by multiple platforms, but not exactly the same way, requiring synchronization of implementation details on each platform. For example, native implementations in C++, .NET and J2EE do not represent a logically equivalent object the same way in XML, binary stream serialization, messaging, database access, etc. As a result significant amount of coding is required to make persistence and communication code interoperable between modules. With CompatibL Generator, every type of serialization and persistence layer is based on exactly the same implementation logic. This means that an object can be serialized into XML or binary code in one programming language and read back in another programming language. The same definition of compatibility applies to all aspects of implementation – making it possible to migrate from one platform to another for each individual module without modifying surrounding code.

Advantages

By using CompatibL Generator as a development tool, you will achieve:

  • Full compatibility of data formats across all languages used in application development – the source code cannot become unsynchronized because it is generated from a single set of declarations.
  • Automation of standardized types of code such as XML and binary serialization, generation of initialization code, and other tasks typically achieved by copy/paste programming. This also improves the reliability of code as copy/paste errors are eliminated.
  • The ability to update the entire set of generated files easily when new requirements arise – for example, making a similar syntax change to every single file which would be prohibitively expensive without code generation given that we currently have more than thousands of different declarations.
  • The ability to generate cross-language serialization code, when a structure can be serialized in one language and deserialized in another.

Coverage

You can use CompatibL for working with C++, Java/J2EE, C#, JavaScript, Managed C++, JNI, Web services/WSDL, SQL, TIBRV, CORBA, Excel, as well as multiple vendor APIs. If we do not support the type of code you are looking for, the required functionality can be added to CompatibL Generator using its template engine.

 

Copyright © 2006 CompatibL