L.J.W
L.J.W

Reputation: 1595

Are there any android application framework like spring?

are there any android application framework like spring?

Upvotes: 9

Views: 2920

Answers (4)

naXa stands with Ukraine
naXa stands with Ukraine

Reputation: 37993

Spring framework for Android - Spring for Android. Currently it has only a couple of features.

The most used dependency injection frameworks for Android:

  • Butter Knife
    refers to itself as "view injection".
  • Dagger 2
    new version of Dagger.
    maintained by Google.
  • AndroidAnnotations
    provides the functionality of Dagger + ButterKnife and a bit more in one framework.
  • Transfuse
    does not have as large of a community as other DI frameworks, though this does not mean that it is bad.
  • Dagger (DEPRECATED)
    deprecated in favor of Google's Dagger 2.
    very powerfull, but it's not intended for views injection.
    can be used together with ButterKnife.
  • RoboGuice (RETIRED)
    it used to be the #1 DI framework on Android.
    easy to plug and play.
    has performance impact.

Choosing the right framework largely depends on your needs.



ps. A tip from Managing Your App's Memory:

Avoid dependency injection frameworks.

Though this recommendation does not apply equally to all DI frameworks[why?].

Upvotes: 6

Wilfred Springer
Wilfred Springer

Reputation: 10927

You might also want to consider Spring ME. Contrary to classic Spring, it is incredibly lightweight. (Where the Spring runtime requires a lot of library code to wire all your beans at compile time, Spring ME is doing all of that at build time, leaving you with a BeanFactory that has no dependencies on a runtime at all.)

Upvotes: 0

Bozho
Bozho

Reputation: 597382

spring-android is a fresh spring portfolio project.

Upvotes: 6

Konstantin Pribluda
Konstantin Pribluda

Reputation: 12367

Look at roboguice: http://code.google.com/p/roboguice/

BTW, nothing prevents you from use spring - as this is pure java framework. but it is heavyweight and probably overkill for your purposes.

Question is - what do you like to inject as dependency?

Upvotes: 5

Related Questions