Skip to content

#FM-4 falcon server - ioc#59

Open
marcinvalas wants to merge 3 commits intomasterfrom
falcon-server-ioc
Open

#FM-4 falcon server - ioc#59
marcinvalas wants to merge 3 commits intomasterfrom
falcon-server-ioc

Conversation

@marcinvalas
Copy link
Copy Markdown
Member

@marcinvalas marcinvalas commented Dec 9, 2020

To be honest I do not have any idea what I can add more here. I believe it does not make any sense do duplicate inversify docs,

Also, I can not see too much sense with listing everything what is registered in ioc container, as it can be easily browsed in debug mode (moreover it will constantly change in time).

@marcinvalas marcinvalas marked this pull request as ready for review December 9, 2020 13:04
In order to bring more flexibility in dependencies instance lifetime management, Falcon Server internally implements Dependency Inversion pattern via [Iversify JS](http://inversify.io/) framework.
It means that Falcon Server internals, including extension components (Api DataSources, Extensions end Endpoints) are registered in Inversify container. Even they are setted up via configuration files.

In order to override existing or register new dependency in Falcon Server you need to override `configure` method of Falcon Server:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In order to override existing or register new dependency in Falcon Server you need to override `configure` method of Falcon Server:
In order to override or register a dependency in Falcon Server you need to override the `configure` method in Falcon Server:

Copy link
Copy Markdown
Contributor

@hobadams hobadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good dude!!

## Dependency Inversion

In order to bring more flexibility in dependencies instance lifetime management, Falcon Server internally implements Dependency Inversion pattern via [Iversify JS](http://inversify.io/) framework.
It means that Falcon Server internals, including extension components (Api DataSources, Extensions end Endpoints) are registered in Inversify container. Even they are setted up via configuration files.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could add more info about some internal things that we did, like getting ApiDataSources by using registered keywords, like Config, EventEmitter2, containers (Api, Endpoint, Extension), entries by type - ApiDataSource, {name}DataSource, components and so on. These things are highly useful and important to know.

@mateuszwozniak mateuszwozniak changed the title falcon server - ioc #FM-4 falcon server - ioc Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants