ariatemplates / editor-backend

Server side processing for AT editors
0 stars 3 forks source link

Edition backend.

This project aims at providing a solution for source code edition, providing services decoupled from any user interface, with an effort of abstraction of the underlying models.

Introduction

Please read the introduction if you never did it and don't know what the project is all about.

Reading the meta-documentation (disclaimer: this is not complete) is:

File system layout

Versioning

To ignore:

Documentation

As mentioned, the goal is to implement a generic solution to handle source code edition, whatever the language, whatever the UI used behind (i.e. the tool(s)).

If you want to implement a client using this backend, please read this tutorial.

Architecture

You can view an architecture schema by importing the xml file in the doc into the web application draw.io (you can copy the content directly, click on menu item Options>Advanced>Edit...).

We call the tools used to actually edit source code: frontends. They provide the (G)UI.

We call the application serving source edition features (processing): the backend.

A frontend is a client of this backend (therefore acting as a server application), and they communicate through standard means.

Here is a quick description of the stack:

This project aims at providing everything except the last part: indeed, a frontend is a consumer of the project.

List of known frontends

Ideas for new frontends

Contribute

I would first give an advice to apply everywhere: READ CAREFULLY THE DOCS.

Environment

To be able to develop the project or even use the product you need to:

Tested on Microsoft Windows 7 Enterprise 64-bit SP1.

Setup

Install the node modules, by launching from this current directory the command (it might take some time):

npm install

Also, some components inside the package need to be generated, so run from anywhere the command:

npm run build

Try

Test

You can also run the set of tests, and you MUST DO IT when you develop, before requesting any integration of your work.

For that, simply run the npm script:

npm test

Development utilities

To avoid rebuilding the grammars manually anytime you change them, or any other file that needs to be rebuilt, you can use the provided watch script. Run it from the root of the package, like this:

npm run watch

However, for now it doesn't handle restarting the whole application (the server) when a change is made in its code, because this is a bit heavy and requires some subtle logic to keep it handy.

But you can use the native npm script to restart the application:

npm restart

This is possible due to the fact that a stop script has been added in addition to the start one. So you can also do:

npm stop

to shut the server down, instead of manually sending a kill signal.

Development

All folders inside this project have a main documentation file like this one, where they describe everything needed to understand it, and to contribute to it. So please refer to them.

Sub-sections below discuss about development at the whole project scale.

Package definition

You can update the package by modifying the content of the package.json file.

For that you'll need to know the npm package.json specifications.

What can be done among others:

You can also contribute more widely to the packaging of the project by implementing scripts that can be launched by npm and binaries that can be installed by it.

Resources

References

Interesting external libraries: