Announcement Announcement Module
Collapse
No announcement yet.
Dependancy injection in Android projects Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dependancy injection in Android projects

    Hello,

    I'm new in Android development and I would like to continue to use DI in my projects. (Create my application context in the onCreate method)

    I think spring-android doesn't provide DI mechanism... Am I wrong?

    By googleing, I found a framework called tiny-spring (http://www.tinyspring.com/)

    Is it part of the spring framework?

    Thanks in advance for your answers and advises.

    Stephane

  • #2
    I don't know tinyspring.. But if you want to take a look, I'm using http://code.google.com/p/roboguice/ to inject daos and services.

    And if you wan't save some line of code take a look at http://androidannotations.org/ that is integrated with spring android rest!

    Comment


    • #3
      Thanks for this answer.

      At first glance, it seems that both framework can achieve depency injection. I'll give a try to both.

      But I ask myself why it (DI) isn't included in spring-android-core...

      Stéphane

      Comment


      • #4
        I think it's to maintain the small size of package..

        Comment


        • #5
          That's correct, DI is not supported in Spring for Android. We have researched this issue, and because of performance concerns, at this time it is not a problem that Spring is addressing. We may address it in a future release, but for now we chose to focus on the core REST functionality.

          Comment

          Working...
          X