-
Notifications
You must be signed in to change notification settings - Fork 0
Siigna main
The mainline of Siigna is the framework of the software. The sole goal of the mainline is to provide functionality that can be utilized by the modules. The mainline should not and does not contain any code to control the application or, in other words, anything that can perform actions upon the user of the application. This interaction should happen by the user and through the user only. This is a key aspect of the modular design written below.
The Siigna mainline architecture is based on the model-view-control design pattern. The mainline has three responsibilities:
- Store and draw shapes
- Manipulate shapes
- Manipulate visual interface
Storing and drawing are not as simple as it seems in Siigna but still probably the most important functionality of the program. In principal though it is pretty straight-forward: Storing happens in the Model which basically is a list of all the shapes currently in the program. The View takes these shapes and draws them on the screen.
In practice, however, we need more than that. What happens for instance when the application closes and all the shapes the user spent painstaking moments to draw disappears? Or; What if the user accidentally deletes all the shapes and reaches for the panic-button which does not yet exist? The answer to these questions are Actions. Actions in Siigna can be seen as "things that can happen to shapes", i. e. creating, deleting, moving, scaling, rotating and so forth. They have two important properties: They can be executed and undone (command pattern if you like). Furthermore Actions are the one single thing that can change the model. Nothing else is permitted to do so.
Besides being used in the client Actions are also sent across the network to possible collaborators. Exploiting feature #1 of actions, execution, we can give these actions to other clients which will receive the exact same changes as the user that sent the actions.
Visual manipulation can happen in two ways: Each Module are given access to their own paint-method with very powerful means to control the graphical environment. Realizing that can be slightly cumbersome we implemented something we called a Display which can display nice-looking boxes on the screen. Nifty, right? These displays are accessed through the Siigna object described below.
- See Siigna object
Like the Modules the mainline is maintained on GitHub at https://github.com/Siigna/main. Feel free to clone the repository and work on your own version of the modules, but please remember that Siigna is licensed under Creative Commons - read more under Siigna license.
- Home - Overview of Siigna
- About - Why we made Siigna
-
Siigna main - The "heart" of Siigna
- Architecture
- Action - Remote and local changes
- Event - How Siigna communicates
- Shape - The figures and geometry
-
Siigna module - The "brain" of Siigna
- Module - How a module is defined
- License - It's open source!
- Contact - Get in touch