Wednesday, April 2, 2014

Dependency Injection, Annotations, and why Java is Better Than you Think it is

That may not be shocking to you. I did help write a book full of Java code, after all. It's shocking to me, though. I wasn't a fan when I started writing Android apps, I wasn't a fan when we began the Big Nerd Ranch Guide, and I still wasn't a huge fan when we finished it. My beef was not original or well thought out, but here are my issues, roughly: It's verbose. There's no shortened syntax for implementing callbacks, like blocks or lambdas, so you have to write a lot of boilerplate to implement even a simple interface. If you need an object that holds four things, you have to create a class with four named fields. It's rigid. Writing sensible Java constantly requires you to specify exactly which exception you're catching, to specify which type you're taking in, to check and make sure that your references aren't null, and to import every class you need to use. And while there is some flexibility at runtime, it's nowhere close to what you get in the Objective-C runtime, much less something like Ruby or Python


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

Android, Android Development, Android Resources, Android Samples,Mobile Development Tutorials,Mobile Developments