AsyncTask and the Mayfly

AsyncTask and the Mayfly

 

I was going to write this post exclusively on the AsyncTask loader in Android studio, but after reading a number of blog posts, YouTube comments and recalling a conversation I had at the Google Dev Group meeting a couple weeks ago, I think I want to touch on a slightly different subject; framework lifecycle and the hack’n’patch nature of the tech industry.

Multithreading is an important part of mobile development, more so than in a traditional computer program because of the limited RAM and internet connectivity. Moving network requests and other such tasks to a background thread allows for a more fluid and immersive experience. Using the AsyncTask loader is how Android was presented to me, so when I went to learn more on my own, that’s where I began my search. After watching a couple videos on the Android Developer YouTube channel and reading some posts on Stack Overflow, it seemed that while using AsyncTask isn’t that difficult, not many “professional developers” use it in a professional context. According to a number of users, most developers use multithreading libraries and dependency injectors like Needle and Dagger in their day-to-day activities. I don’t know about you, but trying to learn something while concurrently being told I will never use the skill I am trying to master is terribly demoralizing. I am going to have to trust that the folks over at Udacity and Google are asking me to learn this for a good reason. I suspect it is one of those things that every Android developer has to understand at a fundamental level, so that if a library or dependency injector is not longer supported, the developer can still use the basic AsyncTask loader.

This bring me to my second point, the lifespan of frameworks and libraries. I haven’t been in this industry long enough to experience it much myself, but a discussion topic I see mentioned very frequently revolves around the short lifespan of frameworks. From what I have read, most experienced programmers use them if the company they work for uses that framework, but when they aren’t required to do so they use only well established and well maintained libraries and frameworks. While most of my reading has revolved around JavaScript, the same principle applies to Android development.

I understand if this isn’t news to most professional developers, but this revelation comes as somewhat of a surprise to a newcomer like myself. For now, I think the best course of action is to stick with what my instructors tell me to learn, and if I find myself struggling in a personal project, learning a new framework isn’t the worst use of a free day.

Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s