Hello Android developers, I'd like to announce the final release of RoboGuice 1.1!
http://roboguice.org RoboGuice is a framework that brings the simplicity and ease of Dependency Injection to Android, using Google's own Guice library. If you've ever used Spring (the #1 enterprise framework on Java, more popular than JEE itself) or Guice, you already know how convenient this style of programming can be. To give you an idea, take a look at this simple example of a typical Android activity: class AndroidWay extends Activity { TextView name; ImageView thumbnail; LocationManager loc; Drawable icon; String myName; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); name = (TextView) findViewById(R.id.name); thumbnail = (ImageView) findViewById(R.id.thumbnail); loc = (LocationManager) getSystemService(Activity.LOCATION_SERVICE); icon = getResources().getDrawable(R.drawable.icon); myName = getString(R.string.app_name); name.setText( "Hello, " + myName ); } } This example is 18 lines of code. If you're trying to read through onCreate(), you have to skip over 5 lines of boilerplate initialization to find the only one that really matters: name.setText(). And complex activities can end up with a lot more of this sort of initialization code. Compare this to the same app, written using RoboGuice: class RoboWay extends RoboActivity { @InjectView(R.id.name) TextView name; @InjectView(R.id.thumbnail) ImageView thumbnail; @InjectResource(R.drawable.icon) Drawable icon; @InjectResource(R.string.app_name) String myName; @Inject LocationManager loc; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); name.setText( "Hello, " + myName ); } } In this example, onCreate() is much easier to take in at a glance. All the platform boilerplate is stripped away and you're left with just your own app's business logic. Do you need a SystemService? Inject one. Do you need a View or Resource? Inject those, too, and RoboGuice will take care of the details. RoboGuice's goal is to make your code be about your app, rather than be about all the initialization and lifecycle code you typically have to maintain in Android. RoboGuice has been in development since August 2009. 1.0 was release in March of 2010, and since then has become the #1 dependency injection framework on Android, used in several big name Android applications. 1.1 has been baking for about 10 months and is pretty stable at this point. What's new in RoboGuice 1.1? + Maven support + Testing support + Improved performance + Improved logging + A very cool Event system + And more: http://code.google.com/p/roboguice/wiki/ReleaseHistory We know that RoboGuice won't be for everybody. Although RoboGuice never prevents you from doing things the Android way, some people will still prefer seeing everything spelled out explicitly in their code. And other people who write extremely high performance applications such as games may not want to incur the small overhead imposed by yet another framework. But for people who want to build simple and straightforward code that's easily testable and easy to read, I encourage you to give RoboGuice a try. We hope you like it. Stop by our discussion forums if you'd like to have any help getting started. Cheers, Mike PS. 1.1 owes a lot to its many contributors. I'd like to shout out to: Manfred Moser, Adam Tybor, John Ericksen, Pierre-Yves Ricau, Tolik N_A, Christine Karman, Stephen Ng, Paul Butcher, Donn Felker, the robolectric guys at PivotalLabs, the sonatype guys, and Sam Berlin at google guice. Thank you for all your help and contributions! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

