ASCoDT Component Lifecycle

From Sccswiki
Jump to navigation Jump to search

ASCoDT covers the full component lifecycle, consisting from component development, component testing, component instantiation and exporting of components. For the development of new component or components instantiation one needs an ASCoDT Project.


The ASCoDT Project

The ASCoDT is used the organise the different source files and binaries needed to compile and run a component-based application.

Project creation

The ASCoDT project can be created through separate new project wizard available through the context menus of the project expoler, navigator or through the File->New->Project menu. The ASCoDT compiler is attached to the project. Additionally the project includes the java run time libraries and can be extended with further jar files.

Project structure

The project structure can be separated in physical and logical structure. The physical structure mirrors the data stored on the file system and the logical structure the data stored in memory needed for the instantion of the components.

Physical structure

The physical structure of the project includes all source files, binaries, files needed for the storage of the logical structure and dependent libraries or sidl files. The following table corresponds to the initial physical setup of the ASCoDT project:

Path Description
sidl for the storage of component sidl files
src for the storage of the generated blue-prints needed to be implemented by the user
component for storage of stubs
workspace for the storage of dynamic repositories

Logical structure

Logically the ASCoDT project consist from one static and multiple dynamic repositories.

  • Static repository: corresponds the definitions of interfaces and components as classes. The static repository is computed every time the project is loaded though the sidl files defined locally in the project and there dependencies. After change of the sidl the static repository becomes non valid. A recompilation of the repositories should be triggered through the Project->Build repositories.
  • Dynamic repository: corresponds to the actual workbench setup - instances of components and ports. The dynamic repository is serialized by save to files readable from the workbench editor.

Defining new component

After defining a new project we continue the development cycle by specifying the component definitions. All component definitions are realised through sidl. The user can create an initial sidl file for his component by using wizard or by creating an ascii sidl-file in the sidl folder of the project. To run the wizard one can use the context menus of the navigation views or the the new component button provided with the ASCoDT-Palette.

new_component.png


This will call the new component wizard. The wizard consists of :

  • Project : current ASCoDT project
  • Target : target component type
  • Component namespace : the namespace of the component in sidl syntax
  • Component name

new_component_wizard.png

After finishing the wizard the ASCoDT runtime creates a sidl file in the chosen project. The sidl file includes the sidl definition of the component in the given namespace.

Compilation

The compilation process in ASCoDT can be separated in two phases:

  • Compilation of component and interface definitions (sidl files - done through the internal ASCoDT compile).
  • Compilation of actual source code (java, c++ , fortran source files - done with makefiles or javac).

After finishing the definition of the components and ports in the sidl file the ASCoDT compiler needs to be invoked to generate blueprints and glew code for the defined components and interfaces. If target language is C++ or Fortran a makefile is generated for the compilation of the native source files. The rest of the code is in java and can be compiled through the Project->Build Components menu. This action will result into reloading of all dynamic/static repositories which use the classes. After finishing the compilation of the source files without any errors the components are ready to be instantiated in the dynamic repositories (workbench).


Component instantiation

To be able to instantiate a compiled component one needs a workbench file. Such one can be created through File->New->Others->ASCoDT->ASCoDT Workbench menu or directly through the New action of the context menus. This will open the New Workbench Wizard.

new_workbench_wizard.png

The compiled components appear in the palette view. To instantiate a component one needs to drop the component from the palette in the workbench. By the instantiation of the component a call to the corresponding constructor is initiated.

Exporting/Importing components

Every compiled component can be exported as binary. To export a component select it on the palette and choose Export Component.. from the context menu. All binaries and descriptions of the component are packed in a zip file. The archive can be imported later from another ASCoDT instance. The imported component can be instantiated like normal component after that.