Giter Club home page Giter Club logo

Comments (3)

fr4nk1 avatar fr4nk1 commented on August 18, 2024

Hello Pierre,

I'm glad that my code helps you.

Indeed your aproach is correct. RestAdapter must be in the InteractorModule
because many interactors will use RestAdapter.

If I have a free moment this week, I will update the code.

Thanks for your time and to report me this.

Best regards.
-Fran.

2015-04-27 8:49 GMT+02:00 Pierre Degand [email protected]:

Hello,

Great article about MVP + Dagger 2 + Retrofit. Helped me a lot.

I just have a question about the RestAdapter. In the current version of
the code, the RestAdapter is a self implemented Singleton (with some flaws
in the impl tbh) and not a dependency provided by Dagger ?

Why did you choose to do like this and did not put this dependency in the
InteractorModule ?
The RestAdapter could be injected in the constructor of the
FindItemsInteractorImpl and you will have the behavious properly
implemented with Dagger2.
Or maybe i'm missing a point of Dagger and/or Retrofit that prevents you
to do such things.

Thank you


Reply to this email directly or view it on GitHub
#1.

from retro-dagger-example.

vwmattr avatar vwmattr commented on August 18, 2024

I added PR 2 to inject the RestAdapter in the InteractorModule. Took it as an opportunity to try and test my understanding of what I learned from the blog post and this repo. Please let me know if that is what you had in mind @fr4nk1 or if there's something you'd change to improve that.

from retro-dagger-example.

fr4nk1 avatar fr4nk1 commented on August 18, 2024

I like your approach @vwmattr . I am thinking in reuse the method in other interactors and it's good.
@pdegand I going to close this issue, this approach resolve the problem ;)

from retro-dagger-example.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.