Skip to content

Commit

Permalink
First draft of rule
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmackay committed Jun 13, 2024
1 parent b14cd00 commit 4b3b6af
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 44 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 34 additions & 44 deletions rules/software-architecture-cheat-sheet/rule.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,69 @@
---
seoDescription: TODO
type: rule
title: Do you know to choose the best software architecture for your system?
title: Do you know how to choose the best software architecture for your system?
uri: software-architecture-decision-tree
authors:
- title: Daniel Mackay
url: https://www.ssw.com.au/people/daniel-mackay
- title: William Liebenberg
url: https://ssw.com.au/people/william-liebenberg/
- title: Luke Parker
url: https://www.ssw.com.au/people/luke-parker
created: 2024-06-13
created: 2024-06-13T17:00:00.000Z
guid: 1CD0006D-24A7-4FBD-B59E-92C25D0D10BC
---

---
type: rule
title: Do you choose the best software architecture for your system?
uri: choose-best-software-architecture
authors:
- title: Ulysses Maclaren
url: https://www.ssw.com.au/people/uly
created: 2024-06-13T14:25:30.000Z
guid: d3b1e3a5-9e3e-4532-b2f6-3c17d833f6a5
---

Choosing the right software architecture for your system is crucial for its success and maintainability. Making the wrong choice can lead to increased complexity, difficulty in scaling, and higher costs. Here are some of the popular architectures and factors to consider when deciding the best fit for your project.

<!--endintro-->

### Popular Architectures
## Popular Architectures

#### Clean Architecture
### Clean Architecture
Clean Architecture emphasizes separation of concerns, making your system easier to maintain and scale. This architecture is designed to keep the business logic independent of the frameworks and tools, which helps in achieving a decoupled and testable codebase.

#### Vertical Slice Architecture
Vertical Slice Architecture structures your system around features rather than technical layers. Each feature is implemented end-to-end, including UI, business logic, and data access. This approach improves maintainability and reduces the risk of breaking changes.
See more [here](https://www.ssw.com.au/rules/rules-to-better-clean-architecture/).

### Vertical Slice Architecture
Vertical Slice Architecture structures your system around features rather than technical layers. Each feature is implemented end-to-end, including UI/API, business logic, and data access. This approach improves maintainability and reduces the risk of breaking changes.

#### Modular Monolith
### Modular Monolith
A Modular Monolith organizes the system into modules that encapsulate specific functionalities. While it runs as a single application, it retains some benefits of microservices, such as independent module development and testing. It’s a good middle-ground between a monolith and microservices.

#### Microservices
See more [here](https://www.ssw.com.au/rules/rules-to-better-modular-monoliths/).

### Microservices
Microservices architecture involves splitting the application into small, independently deployable services. Each service focuses on a specific business capability and can be developed, deployed, and scaled independently. This approach is beneficial for complex and large-scale applications with multiple teams working on different parts.

### Factors to Consider
See more [here](https://www.ssw.com.au/rules/rules-to-better-microservices/).

## Factors to Consider

### Are your requirements certain?
If requirements are likely to change, Clean Architecture or Vertical Slice Architecture can offer more flexibility.

1. **Are your requirements certain?**
- If requirements are likely to change, Clean Architecture or Vertical Slice Architecture can offer more flexibility.
### Do you have multiple domains?
For applications with multiple domains, Modular Monoliths or Microservices can provide better separation and modularity.

2. **Do you have multiple domains?**
- For applications with multiple domains, Microservices can provide better separation and modularity.
### Do you have many teams?
If you have many teams, Microservices or Modular Monolith can help in reducing inter-team dependencies and allow parallel development.

3. **Do you have many teams?**
- If you have many teams, Microservices or Modular Monolith can help in reducing inter-team dependencies and allow parallel development.
### Do you need independent deployments?
If independent deployments are necessary, Microservices is the best choice due to its isolated nature.

4. **Do you need independent deployments?**
- If independent deployments are necessary, Microservices is the best choice due to its isolated nature.
### Do you need independent scalability?
Microservices allow each service to be scaled independently based on its specific needs, which can be more efficient and cost-effective.

5. **Do you need independent scalability?**
- Microservices allow each service to be scaled independently based on its specific needs, which can be more efficient and cost-effective.
### Do you have DevOps maturity?
Microservices require a mature DevOps culture to manage deployments, monitoring, and scaling effectively. Without this, the overhead can be overwhelming.

6. **Do you have DevOps maturity?**
- Microservices require a mature DevOps culture to manage deployments, monitoring, and scaling effectively. Without this, the overhead can be overwhelming.
### Is the team experienced?
The complexity of Microservices can be challenging for less experienced teams. Vertical Slice Architecture although simple, has fewer guardrails when compared to Clean Architecture and can lead to a mess if not managed correctly. This leads to recommending Clean Architecture for less experienced teams that need more structure.

7. **Is the team experienced?**
- The complexity of Microservices can be challenging for less experienced teams. Clean Architecture or a Modular Monolith might be more suitable in such cases.
## Architecture Decision Tree

### Choosing the Right Architecture
![Architecture Decision Tree](architecture-decision-tree.jpg)

## Examples

Here are some practical scenarios to illustrate the decision-making process:

Expand Down Expand Up @@ -104,10 +101,3 @@ Figure: Good Example - A Modular Monolith provides some modularity benefits with
:::

By carefully considering these factors and understanding the strengths and limitations of each architectural style, you can choose the best architecture for your system, ensuring a balance between flexibility, scalability, and maintainability.

### Further Reading

- [Clean Architecture](https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html)
- [Vertical Slice Architecture](https://jimmybogard.com/vertical-slice-architecture/)
- [Modular Monolith](https://martinfowler.com/bliki/MonolithFirst.html)
- [Microservices](https://martinfowler.com/articles/microservices.html)

0 comments on commit 4b3b6af

Please sign in to comment.