NaturalONE Version 8.3.7
 —  NaturalONE in a Nutshell  —

All About Natural Projects

This document covers the following topics:


How to Create a Natural Project?

As already mentioned in the previous chapter, the anchor of a Natural application is the Natural project. Without a project, it is not possible to create new Natural objects or to add objects from the Natural server to the Eclipse workspace.

How are projects created? NaturalONE offers several possibilities for this purpose. The most common are:

This is described in the topics below.

Top of page

Defining a Project from Scratch

What is a Natural project all about? A Natural project is defined in the Eclipse workspace.

Navigator

The folders and files that you create for a project in the workspace can also be found in the file system, with the identical structure and naming. Therefore, the project is the root directory entry of your Natural application.

Explorer

Information about the project is kept in the project properties. To see the current project settings, you select the project and choose the Properties command.

The project is used for two different purposes: to develop Natural applications in the workspace and to configure the associated Natural environment.

A project consists of the project node itself, the project properties, the Natural libraries and Natural objects, and several project-related configuration files.

Within the Natural libraries, you may have different subfolders in which specific components of the application are stored:

The naming conventions for Natural libraries also apply for NaturalONE libraries.

Depending on the type of project, whether the project is intended to be used for developing Ajax applications or web services, additional project entities are available.

If you want to define a new application, defining a project from scratch is the matter of choice. Using the New Natural Project wizard which can be invoked from the Eclipse menu bar, you define all required information for your Natural project. You create the required library and Natural objects, edit the objects in the corresponding Natural editors, prepare the API documentation with NATdoc, and then you are ready to test (that is, execute, test and debug) and to deploy your new application.

If you create a second library (let us call this library LIB2) which uses objects from the first library (LIB1), you have to define LIB1 as a steplib for LIB2. This is done in the library properties.

Top of page

Adding Natural Libraries/Objects to a New Project

If you have existing Natural applications that are stored on a Natural server, this possibility is the matter of choice.

With the Natural Server view, you can directly access a Natural server. In this view, you "open" (map) your Natural environment to NaturalONE. The connection between NaturalONE and the runtime environment is TCP/IP-based. Therefore, you need TCP/IP access to the runtime environment (host name and related port number). On the server, a Natural Development Server (NDV) environment is required. Natural Development Server provides an API for NaturalONE which establishes the communication, understands the commands from NaturalONE and transfers data to NaturalONE. The underlying technology gives you seamless access to different Natural environments (mainframe, UNIX, Linux, Windows and OpenVMS) at the same time. With a single NaturalONE environment, you are able to develop applications for different Natural platforms. And you also have the advantage to use Eclipse for developing applications with different programming languages (such as Java).

To access a Natural server, you map this Natural server environment in the Natural Server view. You have to specify the host name, the port number and a user ID for this purpose. When you open the top-level node that is shown for the mapped server, you can see folders for your existing user libraries, Natural system libraries, and - depending on the platform or configuration - DDMs (see also Contents of the Natural Server View in Using NaturalONE). If you have a huge number of Natural libraries and Natural objects, you may define filters for both items. With an active filter, you gain performance when you expand the related nodes in the Natural Server view. You can easily detect the nodes for which a filter has been set: the icon for such a node contains an additional plus sign.

To download an existing library or object from the Natural server to your workspace, you use the Add to New Project command. You are asked to define a name for the Natural project. The Natural libraries and objects that you have selected are then downloaded to a new Natural project which is automatically created in the workspace. In addition to the Natural objects, a number of required Natural profile parameter settings is also downloaded to the project. This is necessary to "configure" the NaturalONE parser, for example, with the appropriate decimal character (DC), programming mode (SM) or code page setting (CP) - just to mention a few. You may check the parameter settings by opening the project properties. If you are going to change a profile parameter in the project properties, this change also influences the Natural server environment which is defined for this project. This functionality ensures that specific parameter settings are only defined once: in the right place, in the project.

If you are adding Natural objects from an environment which is not protected by Natural Security (NSC), the steplib information of your runtime environment is also downloaded and saved in the project properties. In this case, it is not possible to assign steplib information on library level because this would not be taken into account in the Natural runtime environment. In an environment which is protected by Natural Security and where each secured library may have up to eight steplibs, the steplib information is stored in the workspace, in the library properties. The first download from the server defines the type of environment (protected or unprotected) for which you are developing. In the case of a protected environment, there is no possibility to define steplibs on project level (in contrast to an unprotected environment).

Working with a protected Natural environment requires specific Natural Security settings. For detailed information, see Protecting the Natural Development Environment in Eclipse in the Natural Security documentation, which is part of the Natural documentation. If the Natural runtime environment is not set up correctly, you may not be able, for example, to add objects to the workspace.

Regardless of where the steplib information is defined, NaturalONE makes use of this information. In the Dependency view, you can always see the libraries from which the objects are taken.

Top of page

Checking Out an Existing Project from a Versioning Repository

In the following example, it is assumed that you are already an experienced NaturalONE user and that your Natural project is stored in the repository of a version control system. You are currently working on one PC (let us call it PC1), but now you want to work with your project on a different PC (PC2).

On PC2, you switch to the appropriate versioning perspective - in our example, Subversion (SVN) is used. Select the appropriate repository location and navigate within the source tree to the appropriate project. When you invoke the context menu command for checking out the project, the project is read from the versioning repository and is placed in your NaturalONE workspace.

When NaturalONE is used to store the application in the versioning repository, NaturalONE will ensure that specific configuration files are versioned as well. For this purpose, it is important that you check out the entire project as such from the repository, and not just parts of the project.

Top of page

Importing an Existing Project from another Location

You may add parts of applications to your Natural project using the import feature of Eclipse. When you invoke the Import command, the import wizard is started.

If you want to import from Subversion (SVN), see Checking Out an Existing Project from a Versioning Repository.

But you may also import an existing project from a different workspace.

Top of page

Deploying a Project

After finalizing a development step, it may be necessary to put the project back into the commonly-used Natural environment. The deployment wizard is used to read the project from the versioning repository, to upload the source to the Natural environment and to catalog (compile) it in the Natural environment. Using the deployment wizard, you can generate a deployment package which can be executed without the use of Eclipse. For detailed information, see Deploying Applications in Using NaturalONE.

Top of page