Spring Class_04.2020_CORE_IoC Flashcards
(145 cards)
What is Spring Framework?
It’s enormous amount of libraries which help build web apps
How many libraries does Spring consists?
near 250
Why spring is lightweight framework?
Because it minimizes amount of written code by developer
Basic idea behind Spring is
Simplify traditional approach to designing J2EE apps
Who is the creator of Spring?
Rod Johnson
What is Rob Johnson specialization?
enterprise java architect
Difference between library and framework
you code call LIBRARY
FRAMEWORK call your code
(* and contains library functions)
How Spring Framework reduce time of development?
Spring handles the infrastructure
so you can focus on your application
What is POJO?
plain old java object
How Spring work with POJOs?
apply enterprise services to POJO
Spring implements various design …
patterns
…, Builder, Proxy - patterns were implemented in Spring
Factory
What is IoC purpose?
compose fully disparate components into a working app
Когда невозможно использовать другие реализации зависимого класса и тестировать главный и зависимый классы раздельно?
Когда главный класс инициализирует зависимый класс в конструкторе
Как разделить главный и зависимый классы?
Создавать раздельно
Как можно связать классы при раздельном создании?
установить сеттером или передать параметр в конструктор
какие проблемы могут быть при установке сеттером
переменная до установки сеттером= null
при этом к ней могут обратиться
основные проблемы раздельного создания экземпляров классов: порядок создания, установка сеттером всех экземпляров, …
порядок параметров в конструкторе
How to automate creating of objects and their connections?
Dependency Injections
How does Dependency Injections work?
define dependencies and inject them
How to configure dependencies?
xml, annotations, java
Who can inject dependencies?
application context can make it
Which file do we use to configure objects via xml?
application-context.xml
How does tag for class called?
bean