Cross-platform mobile web development is heating up and the the performance level is continuing to increase as new an more powerful devices are released. One of the allures to this style of mobile development is the single code base you can use across multiple platforms. With wrappers like Cordova and modern web frameworks you can get up and running super quick, but you incur a technical debt in debug time that you won’t know you need until it breaks in an unexpected way. It will break if you work on a sufficiently complex application.
When you start in cross-platform you’re probably thinking about hitting the most devices possible with the least amount of development time. Google reports, as of this posting, that Ice Cream Sandwich and KitKat account for 17.7% of Android installs (http://developer.android.com/about/dashboards). Those devices have it easy because they are coming with Chrome for Android installed. Chrome for Android features the future of debugging mobile web applications with the new remote debugger you can read about https://developers.google.com/chrome-developer-tools/docs/remote-debugging. That is wonderful for the future, but the other 82.3% of devices don’t get this new browser, and that means you don’t get those fancy new debugging features.
In the end, to debug your cross-platform mobile web application I would use a combination of both jsHybugger and Weinre. When you start your project and are thinking about all the speed of development improvements just don’t forget about debugging your program. You’ll want to allow for more time debugging your application on Android than you would on iOS. Eventually this won’t be as much of an issue, and it isn’t an issue at all of you only support Chrome for Android, but for now you’ll need to work with more than one debugging solution to deploy a successful cross-platform mobile web app.
The idea that you’re able to protect your code through minification or obfuscation isn’t new. ActionScript decompilers started coming out much to the dismay of Flash developers and shortly after that the ActionScript obfuscators hit the market. Minification is the process of removing all extra spacing and lines from a file or set of files for the reason of saving space. Obfuscation is the process of making your code illegible, even going so far as to encode strings that are later decoded. Obfuscation can lead to introducing hard to debug issues, and only protects your strings from a first glance as it is simple enough to unencode the entire document and retrieve said strings.
I’ve been reading technical texts for years; ever since I saw dinosaurs come to life in Jurassic Park. I went to the library and started reading all the books on genetics a middle school library might have. I didn’t then and still don’t really know what I was reading, but I just kept reading for a while until my interest waned. Somewhere along the line I got the idea that this was how to be successful:
- Read non-fiction books
- Learn “useful” knowledge
I continued this trend when I first began my interest in computers. I tried staying away from books that covered a product (FrontPage!) since they moved so fast. I read several books talking about compilers, but I never got anywhere. I couldn’t find that piece to take the text in the book and run it on my family Windows computer. I was stuck programming on my calculator which taught me a lot of basics. None stop reading, I kept reading technical books and haven’t stopped for years. I just finished getting an MCSD that took four books. I’m so tired of working like this though, there has got to be a better way of making it in life. In my quest to master one thing I’ve become a polyglot programmer, never feeling certain if the path I’m on is the one that will lead me to the financial success I seek.
That’s what it ultimately comes down too, what technology can one become invested in that will take them to financial freedom they desire. Work for yourself, or at least remotely the majority of the time. Own a nice McMansion home you can decorate during holidays that has a two car garage in a neighborhood you can feel safe in and that has great internet speeds. I’ve found out the answer; there is no right choice.
I jumped ship on Flash development a few years back but even with that I could have continued and move into Flex and Air, both are still being used in enterprise development. That leaves me with trying to make educated guesses about which technology will enable me to reach my goal faster. Technology is wonderful and a kind of hell in that way. You can get work and complete a task in a myriad of ways. Too many choices can lead to over analysis and a paralyzing feeling that I’m making the wrong choice. There it is again, the fear that I’m making the wrong choice to get to my end goal.
There is no right choice, no one technology that will open a door that wouldn’t have opened otherwise. So long as you have your nose in a book and your head down learning you’ll never take enough action, you’ll never see the door open when it finally does. It’s not enough to learn something without acting upon it. So here’s to action over planning, to decisions over analysis in the new year. No one will see all the knowledge you’ve got and point you to that open door. Don’t wait, write, program, start something, because just knowing how to run a program won’t get you anywhere.