SciCoDE project

From Sccswiki
Revision as of 06:35, 5 May 2011 by Atanasoa (talk | contribs)
Jump to navigation Jump to search

Creating a simple project in sciCoDE

In this section we will create the Hello World project in sciCoDE. As implementation language we are going to use java.

Creating the project

  1. Inside Eclipse select the menu item File > New > Project.... to open the New Project wizard
  2. Select sciCoDE Project then click Next to start the Open the new sciCoDE project wizard New Java Project wizard:
    • On this page, type "HelloWorld" in the Project name field, and then click Finish.project_1.png
      File:Project 1.png
  3. In the Package Explorer view, expand the HelloWorld project. The project is structured as followed:
    • src : contains the main "sci"-file, which stores the state of the workbench and a sidl file with the SIDL description of the components.
    • components : contains the java or c++ sources of the components in this project
    • includes : contains dependent SIDL files
    • import : a folder where scicode stores the files of imported components
project.png
File:Project.png

Writing the SIDL description

The next step is to define the Hello World components. The application will consist of three parts:

  • a user interface, which will be used to enter the user name
  • a kernel, which will merge the user name with the "hello world" string
  • a visualization, which will print the whole string on the console.

In this example this three parts are converted to components. The main idea is to pass the string entered in the first component(UI) to the kernel. The kernel will compute the new value of the string and forward it to the visualization. The only thing what we need to implement this scenario is a simple interface to pass strings between components. Our workbench setup should look like this: hello_world.png File:Hello world.png

Compiling the SIDL description

After creating SIDL description we need to compile it with the build-in SIDL-Compiler. Initially the compiler is not turned on. To do this select Project->Properties and then the sciCoDE compiler option to see the configuration setup. compiler_settings.png
File:Compiler settings.png The compiler configuration provides three options:

  • create the components classes in Java
  • create the components classes in C++/JNI
  • create the java-Wrapper classes of an existing remote application

If your SIDL is dependent from another external SIDL document, you can insert such kind of dependencies in the Include Path-box.The output folder shows where to store the generated files. Normally the builder is set to "build automatically". This means that after activating the compiler the component classes will be generated immediately and Package-explorer view will be refreshed.