Results 1 to 5 of 5

Thread: Dependancy injection in Android projects

  1. #1
    Join Date
    Apr 2011
    Posts
    13

    Default 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. #2
    Join Date
    May 2010
    Location
    Angolo Terme, BS, Italy
    Posts
    57

    Default

    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!

  3. #3
    Join Date
    Apr 2011
    Posts
    13

    Default

    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

  4. #4
    Join Date
    May 2010
    Location
    Angolo Terme, BS, Italy
    Posts
    57

    Default

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

  5. #5
    Join Date
    Nov 2010
    Posts
    175

    Default

    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.
    Roy Clarkson
    Spring Mobile Projects Lead

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •