-
Notifications
You must be signed in to change notification settings - Fork 14
Align architecture.md to latest DIP, DEB & BEP #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c3723fa
8d50ae8
ee38cce
02e627b
171f860
fb7d565
5aa326d
22e9532
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,44 +22,35 @@ This section lists all high level architectural principles that have a relevant | |
|
|
||
| --- | ||
|
|
||
| ## Consider reading best practices | ||
|
|
||
| We do recommend to read the best practices for [RESTful](/api-principles/restful/best-practices/) and [Event-Driven](/api-principles/eventdriven/best-practices/) APIs before designing and implementing a new interface. It is quite a long lecture, but for a deep understanding of the implications of some design decisions, we believe that you will profit a lot from this common knowledge. | ||
|
|
||
| ## Architecture Design, Development and Operation Principles | ||
| *@see also: the complete [Architecture Design, Development and Operation Principle](https://confluence.sbb.ch/x/NqCydQ) \[internal link\]* | ||
| ## Design, Development and Operation Principles | ||
| We split up our applications along business functions, build them on the basis of development stacks and design them for sustainable and stable operational use. | ||
| *@see also: the complete [Design, Development and Operation Principle](https://confluence.sbb.ch/display/VORGABEN/DEB+Design-+Entwicklungs-+und+Betriebsprinzip) \[internal link\]* | ||
|
|
||
| ### `MUST` Team decomposition and architecture decomposition are aligned | ||
| Development teams build the core unit in the phase of decomposition and separation of concerns into different applications ... Each application is assigned to exactly one development team ... Dependencies between applications are also dependencies between teams. | ||
|
|
||
| ### `MUST` APIs belong to business capabilities | ||
| An API itself is not a business capability, but it transports the teams core business values to other teams. Therefore, a team providing a business capability must own and provide the according API. This API must explicitly not be owned and/or maintained by other teams. | ||
|
|
||
| For engineering teams, focusing on building business capabilities, it is tempting to delegate the API capabilities to a team which is the expert of building and providing APIs. But during the last decades we have learned, that introducing an API team which publishes the API for an other team introduces an additional organizational and technical dependency which slows down evolution, complicates failure tracing and increases cost in creation and maintenance. | ||
| We design our applications along business functions in sizes that our teams can manage. | ||
|
|
||
| ## Delivery Principles | ||
| *@see also: the complete [Software Provisioning Principles](https://confluence.sbb.ch/x/ugMtU) \[internal link\]* | ||
|
|
||
| ### `MUST` Reuse before make | ||
| Teams must reuse functionality of other teams when the desired functionality is already existing. We prefer contributions to existing APIs (e.g. following [InnerSource](https://innersourcecommons.org) principles) than to rewrite already existing functionality of other teams. | ||
| For new applications, we prefer market solutions over in-house development. We support a business need with an existing application and reuse it through APIs. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is imho not entirely correct. The meaning before relates to reuseing an api before making a new one, which can be defined in the api principles. The new statement is a generic one from the DEB (and is true) but it is not in the scope of the api principles to define or relate such architectural guidelines about applications. I'll clarify the statement about reuse functionality.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with Thierry. The intention of this paragraph corresponds with rule 2 in the DIP (Chapter 2.3.2): Using interfaces |
||
| *@see also: the complete [Delivery Principle](https://confluence.sbb.ch/display/VORGABEN/BEP+Bereitstellungsprinziphttps://confluence.sbb.ch/x/ugMtU) \[internal link\]* | ||
|
|
||
| During the process of software provisioning, the most actual and applicable [API Principles](https://schweizerischebundesbahnen.github.io/api-principles/) must be part of the decision criterias. | ||
|
|
||
| ## Data and Integration Principles | ||
| *@see also: the complete [Data and Integration Principle](https://confluence.sbb.ch/x/1wMtU)\[internal link\]* | ||
|
|
||
| ### `MUST` Teams share business capabilities and data over APIs | ||
| Teams must focus on collaborating with other teams. They consume existing business capabilities and data over APIs. | ||
| We share and use SBB data and functions throughout the whole group. We handle data with care. When sharing and using the data, we adhere to its data privacy | ||
| requirements (e.g. data privacy regulations). | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. while the data protection part is corrrect (and a valuable addition) I would suggest also to add the dimension of confidentiality.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While all of that above is correct, it's also pretty redundant with the DIP, where confidentiality is also included. Quoting: |
||
| *@see also: the complete [Data and Integration Principle](https://confluence.sbb.ch/display/VORGABEN/DIP+Daten-+und+Integrationsprinzip) \[internal link\]* | ||
|
|
||
| Applications and their data are very valuable assets. Every team must publish it's business capabilities and data over well defined APIs using the [RESTful](restful/restful.md) or [Event-Driven](eventdriven/eventdriven.md) architectural style. APIs are accessible, well documented and designed with consumer oriented focus. | ||
|
|
||
| The owner and master of data assets must always be clearly defined and well know to both sides of a dependency. | ||
|
|
||
| ### `MUST` Composition of applications is done over well defined APIs | ||
| Dependencies between applications are always built over well defined interfaces (APIs). There must be no quick-and-dirty workarounds like direct access to a database of an other application. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the reason to delete the requirement the heading and the follwing statement? The DIP applies to APIs for data master but also for apis from systems who are not.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, you could argue that having this in the API principles is kinda redundant. The DIP clearly states, what is being said in the above. |
||
| ### `MUST` Data master share business functions and data over APIs | ||
| As data masters, we share the data and functions of our business capabilities. We provide the functions and data to other applications through over well defined APIs using the [RESTful](restful/restful.md) or [Event-Driven](eventdriven/eventdriven.md) architectural style. | ||
| We published them in the [API Repository](https://developer.sbb.ch) for further use in conformance to the API principles listed here. | ||
|
|
||
| ### `MUST` We reuse existing APIs from the API Repository | ||
| Before building up a new dependency between applications and teams, we check for existing capabilities in the [API Repository](https://developer.sbb.ch). | ||
| We use existing functions and their data through the APIs available in the [API Repository](https://developer.sbb.ch). We obtain data from the leading application (data master). | ||
|
|
||
| ## API best practices | ||
| While not part of an official regulation, following API principles have proven to be valuable at SBB and throughout the software industry. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This statement in the first part of the sentence is imho not correct. The API Principles are part of an official regulation (the DIP refers to the api principles) and can be enforced in the moderation process.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thierry is correct, as almost always. See DIP, Chapter 3.1: |
||
| We do recommend to read the best practices specifc to [RESTful](/api-principles/restful/best-practices/) and [Event-Driven](/api-principles/eventdriven/best-practices/) APIs before designing and implementing a new interface. It is quite a long lecture, but for a deep understanding of the implications of some design decisions, we believe that you will profit a lot from this common knowledge. | ||
|
|
||
| ### `MUST` Hide Complexity | ||
| The Design of an API must follow the principle of [information hiding](https://en.wikipedia.org/wiki/Information_hiding). As already described above, APIs transport business capabilities, but they **must not** transport the complexity of the system behind the API. This means it is relevant that an API hides implementation details. An API should be understandable and intuitive for humans that are not very familiar with the API's business domain. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API Principles should not offer opinions about the structure of applications. The statement itself is valid, but should (and afaik is) defined in other regulations.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreeing as well. Furthermore, we should not build redundancies to our architectural principles. The functional design of applications is described in the DEB principle.
Also quoting the DIP:
"The data is aligned with the business-oriented domains. Where applicable, the data
meets the requirements from data target architectures and conceptual data models.""