Are there any android application framework like s

2019-01-26 07:28发布

are there any android application framework like spring?

4条回答
等我变得足够好
2楼-- · 2019-01-26 08:11

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.)

查看更多
我只想做你的唯一
3楼-- · 2019-01-26 08:13

spring-android is a fresh spring portfolio project.

查看更多
再贱就再见
4楼-- · 2019-01-26 08:20

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?

查看更多
Deceive 欺骗
5楼-- · 2019-01-26 08:25

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

The most used dependency injection frameworks for Android:

  • RoboGuice
    easy to plug and play.
    has performance impact.
  • Butter Knife
    refers to itself as "view injection".
  • Dagger
    very powerfull, but it's not intended for views injection.
    can be used together with ButterKnife.
  • 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.

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?].

查看更多
登录 后发表回答