Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 1.53 KB

faq.md

File metadata and controls

13 lines (7 loc) · 1.53 KB

Frequently asked questions

Why are many classes final with package-protected members, and not open to extension?

First and foremost, this repo is a client library for the Structurizr cloud service and on-premises installation. It allows you to write Java code to create an in-memory object graph representing a software architecture model and views (a "workspace"), serialize that to JSON, and upload it via a web API. The workspace has an OpenAPI definition, but this library also implements a number of rules (think of them as the "business logic") to ensure that the workspace is valid. These rules include, for example, ensuring that all containers with a software system have unique names, and that you can't add components to a system context view.

Removing the final modifier from the classes and leaving the them open for extension allows you to bypass/break these rules, which will likely lead to the serialized workspace definitions being incompatible with the Structurizr cloud service and on-premises installation. The output of this library also needs to be compatible with all of the other client libraries.

You are welcome to fork this library for your own purposes. Alternatively, you can build a thin wrapper around the library, to provide your own custom functionality, or perhaps a more fluent API ... many teams have done this.

Can I submit a pull request?

It depends on the nature of the change. Please open an issue first to discuss it.