Resources and Resource Management

Creating a Project

A tutorial consists of a number of resources, such as chapters containing text, files with source code, images and so on. Those resources are grouped together under a Project.

In order to create a new Project select FileNewProject. A dialog appears in which you can enter the name of the project. Multiple projects can be managed at the same time. Each of the projects must have a unique name.

After the project has been created a new entry representing the project appears in the Project Explorer. It has 5 empty sub-entries, so-called Categories.

Chapters Contains the chapters of the tutorial. Chapters are mainly explanatory text with embedded source code and maybe some images.

Code files Contains the source code files to be documented.

Code snippets Contains the code snippets that have been inserted into a chapter.

Images Contains images which can be added to a chapter.

Tutorials Contains tutorials. Tutorials are a list of chapters that logically belong together. The point in having multiple tutorials in one project as opposed to multiple projects is the reuse of chapters.If well written, a chapter can be used in more than one tutorial.

Creating a Chapter

Chapters are mainly XML files which contain the text of a tutorial. In order to create a new chapter right-click on the Chapters category and select NewChapter from the context menu. A dialog will appear in which you can enter the chapter name. It is not allowed to have two chapters with the same name.

After the chapter has been created, it is opened in the editor. It has already some content entered, the title and the main heading of the chapter. The title corresponds to the title of an HTML document, which is usually displayed in the web browser's title bar. The title can, but does not have to, be the same as the main heading.

Importing Code files

Code files contain the source code to be documented. In the current version they cannot be manually edited in order to ensure consistency. That means that a copies of the source code files must be under reporitory control. Currently DEFT can import C# files and projects. C# files must have the extension .cs.

To import code files right-click on the Code files category and select ImportCodeFile. A dialog opens in which you can navigate to the file to be imported. If you want to import a complete C# project in one rush select the Solution file (file extension .sln). It is not possible to edit code files. If changes need to be made, the code files have to be updated.

Importing Images

Images can be added to chapters for illustration purposes. First they have to be imported into the repository, though.

Right-click on the Images category and select ImportImage. In the dialog select the images to be imported. Supported image types are, among others, .jpg, .gif and .png.

Creating a Tutorial

A Tutorial is a collection of Chapters that somehow belong together. Grouping Chapters into a Tutorial is necessary for the export: the order of the chapters can be specified and the exported tutorial contains navigation links between them. Usually there is only one Tutorial per Project, but if well written, Chapters can be reused among multiple Tutorials.

To create a Tutorial right-click on the Tutorials category and select NewTutorial. A dialog appears in which you can enter the name. All Tutorials in a Project must have a different name.