greetgo.depinject

Depinject core: dependency injection implementation using in greetgo!

Лицензия

Лицензия

Группа

Группа

kz.greetgo.depinject
Идентификатор

Идентификатор

greetgo.depinject
Последняя версия

Последняя версия

2.2.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

greetgo.depinject
Depinject core: dependency injection implementation using in greetgo!
Ссылка на сайт

Ссылка на сайт

https://github.com/greetgo/greetgo.depinject
Система контроля версий

Система контроля версий

https://github.com/greetgo/greetgo.depinject.git

Скачать greetgo.depinject

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/kz.greetgo.depinject/greetgo.depinject/ -->
<dependency>
    <groupId>kz.greetgo.depinject</groupId>
    <artifactId>greetgo.depinject</artifactId>
    <version>2.2.2</version>
</dependency>
// https://jarcasting.com/artifacts/kz.greetgo.depinject/greetgo.depinject/
implementation 'kz.greetgo.depinject:greetgo.depinject:2.2.2'
// https://jarcasting.com/artifacts/kz.greetgo.depinject/greetgo.depinject/
implementation ("kz.greetgo.depinject:greetgo.depinject:2.2.2")
'kz.greetgo.depinject:greetgo.depinject:jar:2.2.2'
<dependency org="kz.greetgo.depinject" name="greetgo.depinject" rev="2.2.2">
  <artifact name="greetgo.depinject" type="jar" />
</dependency>
@Grapes(
@Grab(group='kz.greetgo.depinject', module='greetgo.depinject', version='2.2.2')
)
libraryDependencies += "kz.greetgo.depinject" % "greetgo.depinject" % "2.2.2"
[kz.greetgo.depinject/greetgo.depinject "2.2.2"]

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
org.testng : testng jar 6.14.3
org.easytesting : fest-assert-core jar 2.0M10

Модули Проекта

Данный проект не имеет модулей.

greetgo.depinject

Здесь на русском

Implementation of Dependency Injection pattern based on code generation by greetgo!.

References

Features

  • NO dependencies;
  • Minimum size;

    What goes into production, contains only one class with one small static method, the rest is interfaces and annotations

  • The definition of the beans topology (the speed of this operation is O (n*n), where n - the number of beans), occurs at the compilation stage, not at runtime;

    This allows to make the system runtime always fast, and independent of the number of beans in the system

  • Initialization of beans occurs in the order of use, not in the order of dependencies, therefore, if the beans are not used, they are not created

    For example, BEAN_1 contains a reference to BEAN_2. Now, when initializing BEAN_1, BEAN_2 will not be initiated. BEAN_2 will be initiated only when it is accessed directly. This makes the speed of the system runtime independent of the number of beans.

  • Reflection is not used in bean-containers, hence everything is properly optimized!

Disadvantages

  • an access to the bean can only be done through the method get(). Unfortunately, it does not work out directly (as in Spring @Autowired), because the bean must be initialized at the first access, not when the dependency is formed.

    Access can be done in this way:

  class SomeBean {
    public BeanGetter<SomeAnotherBean> someAnotherBean;
    public void someMethod() {
        someAnotherBean.get().helloWorld();
    }
  }
  • Fields BeanGetter must be public! (Because the reflection is not used in production);
  • Complicated build (it is necessary to generate the bean-container code, compile and add it to the distribution);
  • Currently, only TestNG is supported. (It's great if someone implements greetgo.depinject.junit) ;

Версии библиотеки

Версия
2.2.2
2.2.1
2.2.0
2.1.8
2.1.7
2.1.6
2.1.5
2.1.3
2.1.1
2.1.0
2.0.3
2.0.1
2.0.0
1.1.4