Pros and Cons
Triton
Why use Triton? Why spend time creating a Component Library for Kongsberg, when there are perfectly suitable 3rd party options out there? This document outlines the pros and cons of using Triton Component Library, so that any project can make an informed choice about whether to use it or not, and understand the benefits and drawbacks of choosing Triton.
What Triton aims to achieve
- To optimize speed and quality of design and development for Kongsberg applications
- To enhance collaboration and code reuse between projects
- To maintain consistency and quality in Kongsberg applications
Pros
- Promotes collaboration between projects
- Enables code reuse between projects
- No license needed and full control of code -> safety, health, maintainability
- Matches Triton Design System exactly out of the box
- Provides updates automatically with no added effort, eg. when design changes are made
- Allows many projects to contribute -> promoting shared ownership of the code
- Works in combination with other 3rd party libraries
- Is framework agnostic
- Design changes come from a single source of truth, and developers for each project need only update one NPM dependency
- Migration from the legacy Triton v1 to Triton v2 requires low effort, and this one-time transition will not break the code base
Cons
- Requires effort to develop
- The library is still in early development, and as a result more bugs are expected compared to more mature 3rd party libraries
- Existing Triton 1.0 HTML code should be replaced with TritonCL equivalents
- Understanding and using Triton may be new to developers, who are used to other technologies
Third Party Libraries
Triton is compatible with other third party libraries. This means that despite being a new approach, Triton allows developers to continue using technologies they are familiar with, while exploring Triton. Sometimes Triton will does not satisfy the specific needs of a project. In such scenarios, the use of third party libraries in conjunction with Triton is an escellent option, both reducing workload and increasing flexibility. Developers can also suggest new components to include in future Triton releases, or contribute directly to the Component Library.
Pros
- Maturity - fewer bugs, more built-in functionality etc.
- Familiarity - some developers are used to other technologies
- No contributions expected from our teams
Cons
- Each project has to customize the styling to fit the design system
- Does not get design updates
- No ability to contribute
- No code reuse support between projects
- Adds external dependencies
- No control over the security of the components
- Requires licensing, which may also incur costs
- Poor scaling as the amount of projects with individual solutions increases
Recommended Reading
To learn more, here is a list of recommended reading for custom component libraries