Questions tagged as 'ioc'

2
answers

What are the Types of IoC?

Reading the "Pro Spring Security " book by Carlo Scarioni from Apress Publishing, issue 2013, I came across the following text that left me confused about IoC:   The basic idea of DI, a type of Inversion of Control (IoC) , is simply that i...
asked by 07.07.2015 / 02:57
1
answer

Simple Injector + UoW + DDD + Multiple Contexts + Entity Framework

I need to know how to apply IoC for two contexts. The scenario is as follows: I have a Layer called Core (allocates classes that I can reuse in other layers), where I put the interface of IDbContext, IUnitOfWork and UnitOfWork (among ot...
asked by 03.12.2016 / 20:58
1
answer

Dependency injection in .Net Web API project 2

I'm involved in a project that is developing a .Net Web API 2 Fw 4.51 application (with a view to future migration to .Net Core , which is an 'aggravating'), Fluent NHibernate e PostgreSQL , and we're choosing a IoC con...
asked by 27.08.2016 / 12:55
1
answer

What is the Java equivalent of this lambda in Ruby?

In your Inversion of Control text, Fowler uses as an example a Ruby code snippet that promotes that principle to invoke a bind method on the input field of text that passes an event name and a lambda as argument.Whenever the text input box det...
asked by 12.06.2018 / 02:52
2
answers

How to use SimpleInjector in a multi-layer project?

Imagine the classic architecture: ConsoleApplication (Frontend) - > Business Layer (BLL) - > Data Access Layer (DAL) That is, Frontend reference BLL that reference DAL. Note that Frontend does not know the DAL, nor should it. Give...
asked by 28.12.2017 / 22:46
1
answer

Spring boot Autowired in JFrame

When developing a Spring Boot Desktop application, can you inject a @Repository into a JFrame class? If yes how? Any alternative? Code samples: @Repository public interface ItemRepository extends CrudRepository<Item, Lon...
asked by 15.07.2016 / 02:43
3
answers

Controller with repository, Ioc and DI

I'm trying to implement the recording of the data in my views, and I'm having doubts about how to instantiate my% repository% in my controller, even using dependency injection examples, because in builder of my user repository he expects to rece...
asked by 02.09.2015 / 21:58
1
answer

How do I register dependencies with Windsor that are in different layers of the application?

How to register dependencies with Windsor that are in different layers of the application? I do not want to be referencing all the application layers in the presentation layer as most do around. I have the following error that I know becau...
asked by 22.05.2015 / 19:55
1
answer

Autofac. Dispose or not Dispose that is the question

Is there a difference in performance or best practices between the two examples? Example1: private void Teste() { using (var scope = Container.BeginLifetimeScope()) { scope.Resolve<MyViewModel>().ShowName(); } }...
asked by 14.04.2015 / 02:46
1
answer

SimpleInjector: The configuration is invalid. The type is directly or indirectly depending on itself

I have the following problem when applying the SimpleInjector container in a simple application: The configuration is invalid. The type BookAppService is directly or indirectly depending on itself. The cyclic graph contains the following typ...
asked by 31.03.2018 / 00:25