|
Code consistency
We try to maintain code consistency with several methods. Some of the methods are very general while the others are specific only to the Rosegarden project.
A note on this page: this page is ment to be incomplete and subject to change.
Design patterns
The guide lines below are mostly justifiable
Data integrity
-
Data should exists at least once in the source tree
Context-independent data should exists, preferably, at most once in the source tree
Context independent data definitions are typically in own libraries
Context dependent data, like similar function definitions in different contexts, are often repeated
Note: Removing duplicate data definitions is mostly manual work and may require a profound insight
-
Helps to read and understand the code an to avoid errors (see also Programming style in Wikipedia)
Compilability
Stable branch should be always compilable
If no major restructuring of the code is going on, try to keep also the development branch always compilable
Commits which break the compilability of the code are highly preferred in branches
Model
View
Controller
Every document manipulating action should fulfill the Command pattern in order to be undoable
Documentation
Methodology
-
A single developer is typically also the tester of their own code
We often like to work also in short development cycles where the contributions of a single developer take temporarily the focus of many, nearly all active developers
The period between hard freeze and release is devoted for testing and bug-fixing (and translating)
Releasing
Resign patterns
These design choices typically do not follow the standard. In most of the time, we can live with that. There might appear changes to these choises in future. The reason for the list of resign patterns is that Code smell can be a driver for refactoring.
Data integrity
View
-
In some of our user-accessible actions a necessary level of abstraction is missing — instead of a the full MVC-model for the action, the 'model' has been put to the 'view' part
Missing abstraction, i.e., 'model' part, makes it harder to make changes to the user interface
-
Our user interface probably contains some functions which actually have been never used
The implementation and maintenance of the unnecessary functions may have driven the focus out of the bullet-proof implementation of the functions which are used the most
Controller
-
Every command which manipulates the document do not fulfill the Command pattern properly, thus, in some cases “undo” is broken
If the command is valuable, then we still prefer to “do” even if “undo” of the same command will be broken
Methodology
References
|
|