> For the complete documentation index, see [llms.txt](https://dailyjournal.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dailyjournal.gitbook.io/notes/software-development/software-development-life-cycle.md).

# Software Development Life Cycle

* Behavior-driven development (BDD) is a process that was born out of Test-driven development (TDD).&#x20;
* BDD involves organizing tests such that their behavior is tested, rather than their implementation.&#x20;
* When designing these types of tests, think, “How can I describe, in sentence form, what this code does and what I should expect from it.”

|              BDD             |           TDD           |
| :--------------------------: | :---------------------: |
| Behaviour Driven Development | Test Driven Development |
|     starts with use cases    |  starts with test cases |
|         includes TDD         |                         |

## Domain Driven Design

The concept of **Domain-Driven Design** implies that the structure of a software solution is built around a certain business domain and matches its requirements.

DDD implies that you distinguish a certain bounded context, which is a set of entities tightly connected with each other but minimally connected with other entities in your system.

Bounded context is a good fit for a microservices architecture. It is much easier to build a microservice around a bounded context.

{% embed url="<https://www.mobilelive.ca/blog/value-of-tdd-bdd-ddd>" %}

## Repository Pattern

A repository is nothing but a class defined for an entity, with all the operations possible on that specific entity.

&#x20;A Repository Pattern can be implemented in the following ways:

* **Non-generic:** This type of implementation involves the use of one repository class for each entity. \
  For example, if you have two entities Order and Customer, each entity will have its own repository.
* **Generic:** A generic repository is the one that can be used for all the entities, in other words, it can be either used for Order or Customer or any other entity.

#### Unit Of Work in Repository Pattern

Unit of Work is referred to as a single transaction that involves multiple operations of insert/update/delete.

In other words, it means that for specific user action (say registration on a website), all the transactions like insert/update/delete and so on are done in one single transaction, rather than doing multiple database transactions.
