company logo

Create projects

A root project is usually created, when starting the ClassEditor or Designer the first time. The root project typically contains the database model definitions and OSI script implementations for defined persistent classes. When you open a development database the first time (e.g. calling Class Editor), a message pops up informing you that you are going to create a new database (New database created at ...).

Now you are prompted to define your project options, which are used to initialize project settings:

The project name denotes the root project, which has usually the same name as the project source. Another suggestion is calling it resources, since usually, the root project contains the project or application resources as the database schema, database methods, forms etc.

The folder might be changed, but should not. As interface type, the pre-selected IFT_odabaOSI or any other should be chosen.

  • IFT_odabaOSI - Implement functions as OSI (ODABA Script Interface) functions. Usually, the resource project uses OSI implementations which is the simplest way of implementing functions.
  • IFT_odabaInterfaceCPP - Implement functions as C++ functions using the ODABA API. This type is usually selected for implementing common functionality in a project or for implementing database or application context classes.
  • IFT_odabaInterFaceDotNet - Implement functions as C# functions using the ODABA API. This type is usually selected for implementing common functionality in a project or for implementing database or application context classes.
  • Mixed and system interface are reserved for ODABA system programmers and should be selected by experienced users, only.

When changing the interface type, the suggested programming language will be selected (e.g. CPP when selecting IFT_odabaInterfaceCPP). One may mix C++ or CSharp (C#) implementations with OSI, i.e. any implementation class in a C++ or C# project may contain mixed function implementations. One may, however, not mix C++ and C# within a project. For C# projects, vs (Microsoft visual studio) should be selected as build environment (Build-ID). C++ projects may choose between vs, gcc (GNU compiler). When you are going to use the ODABA build environment (obe), obe should be selected. One also may define any other environment (see Build Support).

Since programming languages cannot be mixed within a project (except OSI, which is allowed in any project), implementing code in different programming languages requires different projects. The project type defines the type of project to be created. Projects are classified by content, but the main reason is, that different project types require different interface support (e.g. for context classes).

  • PIT_Resource - is the default project type for the root project. The resource project typically contains data model definitions, which might be defined directly within the project or within several modules or sub projects.
  • PIT_ClassLibrary - should be selected when the project provides common functionality in a dynamic library (dll).
  • PIT_ConsoleApplication - should be selected in order to provide one or more executable files, which may be called from console command line.
  • PIT_DBContextInterfaceDLL - should be used for the project containing the business rules for the database. Business rules are implemented in specific database context classes in C++, C#, OSI or mixed.
  • PIT_GUIContextInterfaceDLL - should be used for the project containing the application rules. Application rules are implemented in specific GUI context classes in C++, C#, OSI or mixed.
  • PIT_GUIApplication - might be used in order to create any kind of GUI application not using the ODABA GUI framework

It is suggested to create separate projects for implementing business rules (database context classes) and application rules (GUI context classes). Besides, one also may define one or more projects containing common features, which might be referred to in database context classes as well as in GUI context classes.

In order to create a new project, Project/Insert/Create project (or Create sub project) has to be selected from the main menu or appropriate toolbar button. Usually, when creating a new project, external resources are generated automatically. In order to refresh external resources or reinitialize external resources in case of an error, the action Project/Insert/Initialize External Resources might be selected from the main menu.

Related topics