Highly used keywords in Software development
1) Dependency injection
Rather than creating an object inside a function,pass that object into the function as an argument.
In general, there are only three ways an object can get a hold of its dependencies:
1. We can create it internally to the dependent.
2. We can look it up or refer to it as a global variable.
3. We can pass it in where it’s needed.
With dependency injection, we’re tackling the third way (the other two present other difficult challenges, such as dirtying the global scope and making isolation nearly impossible).
Dependency injection is a design pattern that allows for the removal of hard-coded dependencies, thus making it possible to remove or change them at run time.
This ability to modify dependencies at run time allows us to create isolated environments that are ideal for testing. We can replace real objects in production environments with mocked ones for testing environments.
Functionally, the pattern injects depended-upon resources into the destination when needed by automatically looking up the dependency in advance and providing the destination for the dependency
2)Cross cutting concerns
The crosscutting concern is a concern which is applicable throughout the application and it affects the entire application. For example: logging, security and data transfer are the concerns which are needed in almost every module of an application, hence they are cross-cutting concerns.
3) 5 driving factors in Microservice architecture
DATAS
D — Deployability
A — Agility — Ability to respond to changes
T — Testability
A — Availability
S — Scalability
4) YAML
“YAML Ain’t Markup Language” (abbreviated YAML) is a data serialization language designed to be human-friendly and work well with modern programming languages for common everyday tasks.Open, interoperable and readily understandable.
The design goals for YAML are:
- Easily readable by humans.
- Portable between programming languages.
- Matches the native data structures of agile languages.
- Consistent model to support generic tools.
- Supports one-pass processing.
- Expressive and extensible.
- Easy to implement and use.
Both JSON and YAML aim to be human readable data interchange formats. However, JSON and YAML have different priorities.
Relation between YAML and JSON:
Technically YAML is a superset of JSON. This means that, in theory at least, a YAML parser can understand JSON, but not necessarily the other way around.
Both JSON and YAML aim to be human readable data interchange formats. However, JSON and YAML have different priorities. JSON’s foremost design goal is simplicity and universality. Thus, JSON is easy to generate and parse, at the cost of reduced human readability.
In contrast, YAML’s foremost design goals are human readability and support for serializing arbitrary native data structures.
JSON requires that mappings keys merely “SHOULD” be unique, while YAML insists they “MUST” be. Technically, YAML therefore complies with the JSON spec, choosing to treat duplicates as an error. In practice, since JSON is silent on the semantics of such duplicates, the only portable JSON files are those with unique keys, which are therefore valid YAML files.