
If you are a Java developer interested in learning more about Android, or if you're determined you want to master that new and thriving mobile platform, chances are you have more experience working on the server side than on embedded platforms. After all, most of the success that Java has had has been concentrated around Web and Enterprise applications rather than mobile apps. (Yes, Java ME has been around for a while, but its importance was never too high, and the technology has become almost obsolete as of today.)
I crossed that boundary too, having had most of my experience around Web frameworks and various enterprise technologies. Converting my Java skills to re-apply them to Android was not always easy, but the process was fun. Let me share some ideas of how a server-side Java developer could turn into an Android developer with relatively little pain and much gain.
Step One: Get the Environment Early
As a developer, you probably share my opinion that without practice there can be no real skill. It is important to test everything you learn, train your brain as well as your fingertips. Thus, I suggest that you install the Android development environment as early as possible. I recommend my another article for a step-by-step guide of Android environment installation. One small note for you as for an active developer - don't install the ADT on the Eclipse instance you use for server-side development. Install a separate Eclipse instance for that.
The Android tools are quite stable and mature, and the emulator is very good for training and very good in general. The ability to immediately try whatever you read about is very helpful and motivating for any self-trainee.
Step Two: Refresh Your Basic Java
I'm sorry to say that but many server side developers step aside from what is considered the best programming practices, and sometimes just fundamental truths of Java. While server technologies are inherently focused on higher level issues and they will forgive you many kinds of suboptimal programming, memory leaks, wrong choice of collections etc., a mobile platform will not tolerate that. Regardless of how progressive Android is, it's still a resource-restricted environment.
That doesn't mean you have to program in Dalvik bytecodes or native code only to write smooth applications. That just means you need to be very scrupulous about every allocation you make, every stream you open and watch the docs for every kind of resource that you need to dispose manually. Also, be sure that you understand what exactly happens in every line of Java code that you write.
Yes, you can write an Android app with a non-Android mindset, or even no mindset at all. But if you just have a look at the Market as it is today, you can see that 80% of apps are, well, crap. With the liberal philosophy that backs the whole Android project, we expect the Market to evolve by having users choose the best apps that will survive and set new bars for the rest. However, that's not going to happen if good Java developers do not apply their best skills and efforts to build really good apps.
Step Three: Make an App
The barriers for starting your Android education are very low. The development tools run on various platforms. You don't strictly need a hardware device (of course, you need it for production code but not really for training). Experimenting is very easy.
That is why I suggest that as soon as you feel you've accumulated some knowledge of the API, try making a simple app for yourself. You can implement your own idea or even try to copy some existing app. Just be sure to make it simple, so you have good chances at succeeding and thus motivating yourself to do more. As you learn more, try to continuously apply your skills to improve the existing app or start a new one. That will allow you correlate your theoretical knowledge with actual app development.
Conclusion
Although it will take some effort to switch from the server side to Android, you are in a privileged position compared to those who know no Java at all. Just be sure to accept the platform as it is, don't try to pigeonhole mobile development reality into your server side mindset, and be sure to have a lot of fun!
Author:
Ivan Memruk
mindtherobot.com