Skip to main content

Solution Strategy

The most fundamental goals regarding the solution strategy are described in the following. They mostly focus on the main watermarker library component.

GoalDescriptionDetails / Example
ExtensibilityThe library is designed to allow easy extensibility for devs working on the core library as well as users of the library (but it has not been tested to see if this works as intended yet). Most functions only require interfaces instead of specialized classes to allow creating your own classes with different behavior.Interface FileWatermarker which allows adding support for other file types.
FlexibilityFor most of the functionalities we created an interface and then implemented our default implementation. If this implementation does not meet the requirements, it can be exchanged with another class implementing the interface.Transcoding Interface allows specifying your own alphabet.
UsabilityOffering extensibility and flexibility often introduces a lot of complexity which makes it hard to understand how the library can and should be used. To make the usage easier we created convenient classes and functions which reduce the flexibility but should make it easy to use the library for general use-cases. Only users with special requirements have to look into the more flexible and complex APIs.A dedicated usage documentation shows various examples.
No PerformanceThe library does not focus on performance. Whenever we had to make a decision between performance and usability we chose the option for better usability.-
Code QualityThe code quality is very important for us. We want to ensure that every dev is able to work on the code base by providing documentation and enforcing a good code style by using linters.The Contributing guide defines several aspects for good code quality and processes around it.
TestingFor every new code added to the library, tests have to be added to validate the functionality. This includes unit tests as well as integration tests. Furthermore, extensive tests also provide a good point of reference for new devs on how the code should be used.Existing tests for all builds (commonTest), Java (jvmTest) and JavaScript (jsTest) as well as GitHub testing workflows.
Error HandlingWe handle errors (and warnings) as values, not as exceptions. Our library should not throw any exceptions, instead functions which can fail should return a Status or a Result if they return a value.The cross-cutting concept for error handling describes all details.

Devs working on the project need to understand these goals and implement them in their daily practice!