Explanation of Directory Structure and Rules

From OpenPetra Wiki
Revision as of 22:42, 17 November 2010 by Pokorra (talk | contribs) (→‎PetraTools)
Jump to navigation Jump to search

Introduction

This article describes the existing folder structure of the source code, and gives a short description of the contents and purposes.

We will soon have more detailed documentation of the source code, generated from the in-code comments.

C# Source code

All C# Source code is in the csharp directory.

Some Third-Party tools and dlls are in csharp/ThirdParty. Their license is compatible with the GPL, and each directory has a text file with the licensing details and links to the origin of that software.

Ict.Common

The directory csharp/ICT/Common contains some general libraries, eg. connecting to different types of databases, a printing system, String Helper functions, etc.

Ict.Petra.Shared

The code in directory csharp/ICT/Petra/Shared is intended to be shared between Server and Client. This means, that no access to the database is available in these files, since they must be run on the client as well, which does not have access to the database.

csharp/ICT/Petra/Shared/Interfaces is a special directory, which has Interfaces for functionality that the Server offers to the Client. Most of the interfaces are generated automatically, using nant generateGlue</glue>.

csharp/ICT/Petra/Shared/lib/RemotingSinks contains code that is used to encrypt the communication between Server and Client, using a public/private key mechanism.

Then we have for each module a subdirectory, eg. csharp/ICT/Petra/Shared/MPartner, which contains Constants, and routines that can be useful on both the Server and the Client.

There is a data directory for each module, which contains generated code for matching the database tables to C# classes, and for defining typed datasets, eg. csharp/ICT/Petra/Shared/lib/MPartner/data. More documentation on this will follow soon.

csharp/ICT/Petra/Shared/MReporting is another special directory specific to reporting functions that are used across all modules.

Ict.Petra.Server

csharp/ICT/Petra/Server/app contains code that is necessary for the basic operation of the Server, eg. starting and maintaining app domains for each connecting client, connect to the database, etc.

The main PetraServerConsole.exe is compiled from a project in csharp/ICT/Petra/Server/app/PetraServerConsole.

csharp/ICT/Petra/Server/lib contains most of the business logic.

There is a data directory for each module, which contains generated code for accessing the database, eg. csharp/ICT/Petra/Server/lib/MPartner/data. More documentation on this will follow soon.

TODO: we have not tidied up the connectors yet for all the modules. For the MFinance module we have a directory csharp/ICT/Petra/Server/lib/MFinance/connect. This should contain generated code for the server that provides the services to the client.

Ict.Petra.Client

We have also an app directory, and the main Client executable is in csharp\ICT\Petra\Client\app\PetraClient.

There are the folders CommonForms, CommonControls, and CommonDialogs, which are used in the other windows.

lib contains directories for each Module. lib/MCommon contains code that is used across several modules.

Each module has a subdirectory gui which contains yaml files, they are generated with nant generateWinforms. There are also ManualCode files for everything that cannot be generated automatically.

Server Admin

This is a tool for shutting down the server, and also allows the administrator to check who is currently logged in etc.

Server Plugins

At the moment, we have a few plugins for authentication against another service, eg. phpBB.

Client Plugins

We have for example a plugin for importing german bank files.

PetraTools

This contains several tools for generating code, some NAnt extensions for executing operations on the database, and much more.

Testing

We want to have Unit tests and integration tests in this directory.