miércoles, 4 de noviembre de 2015

More Hybrid Apps please!

9:43 by Zalakain · 0 comentarios

Finally after a couple months' work, I've finished my new Hybrid App for Android, "San Fermin Quiz"(perhaps to be published for WindowsPhone and iOS, though the "tax" Apple charges discourages me to publish a free App). As with my previous development, "CPE Tráfico", I used Apache Cordova (the open source version of Adobe Phonegap) for development. This is the third  hybrid App that I publish, and I consider it new because it is a complete re-make of the previous version of "San Fermin Quiz", though that one too used Cordova/Phonegap plus jQuery Mobile for the front-end. In this case, however, I wanted to work with Ionic Framework (instead of Onsen-UI that was my framework for "CPE Tráfico"). Both are modern presentation frameworks that use AngularJS, Google's MVW framework which I've fallen completely "in love with" after these projects. And if there is just one thing both have taught me is to run away from jQuery like the plague! :D I also learned some more details that I want to talk a bit about on this post, in case it can be of somebody's use.

So, let's start saying that IMHO it keeps gettings clearer that Hybrid Apps are the future of Apps. "Clear as water". "Wasting time" nowadays (sorry if anyone thinks I'm wrong) developing with Swift, Java or any other "mono" platform is, at least, unproductive. Cordova / Phonegap offers everything it requires to develop quality applications on any platform, and only requires JavaScript knowledge. On top of that we can add that developing with JavaScript + AngularJS grows one's toolbelt future-proof (as they have become the "de-facto standard" for any development: web server, web client, IoT, ...), so the benefit is multiplied. It is true that there are some cases that may require the development of a truly "native" App: for example, one that must interact with "intents" not covered by Cordova / Phonegap or done for a very specific device; or those in which tight control of code is a must (such as POS Apps). But what could be the percentage of such cases? 5%?... Therefore, it is very difficult to justify the extra effort to develop "native".

Regarding the use of Ionic compared Onsen-UI, I have mixed opinions. On the one hand, I liked Onsen-UI initially. Its elegance "out of the box" together with some very good examples of code that could be used straigth away in any App(read "copy & paste") to make its skeleton, were some things I quickly appreciated. When I used this framework to develop "CPE Tráfico" I felt comfortable from the start: I liked what I saw, it integrated with Cordova / Phonegap faultless, it helped me understand the basics of AngularJS... Overall I had few problems. But one thing that I found "difficult": Onsen-UI is a development of the Japanese company Monaca, and the information available on the web about this platform is scarce: the truth test is to look for the term "onsen-ui" in Stackoverflow.com which returns 1,213 hits, while searching for "ionic" returns 10,970... True, Monaca is trying to solve this with new products (Cloud Monaca, Monaca Debugger, Monaca LocalKit ...) and adding more members to its team to train and support users (for example Fran Dios @frandiox). And also if you know how to look around and search for information, everything is solved :)
But when I've used Ionic... that's activity! Among the entries in Stackoverflow, their blog and products (Ionic Lab, Ionic Market, ...) and some of the authors who are writing articles about it (Raymond Camden, Christophe Coenraets, Ashteya Biharisingh, Simon Reimler ... and many more) it is not uncommon to find information and direct solutions to any problem. Truth is there is no comparison in on this point (well, at least for now). Another difference is the way to develop a project. Ionic installs on your development machine a handy CLI which allows immediately running the development App in your own local web server, whilst monitors the code and automatically updates itself when code is changed. You can also compile the app (although I prefer to do this on my own with Phonegap Build) and deploy it on an emulator or on a physical device connected to the machine. A very good way to accelerate development times and simplify testing (Monaca has created something similar for Onsen-UI, Monaca LocalKit, but I could not test it). And something more "invisible" but ultimately helpful: Ionic CLI creates a structure of files and folders to start our project in an organized manner. With Onsen-UI this is done manually thus there can be differences between projects that can negatively impact development ("Where is the library I created for ..."). This is in Ionic side becomes clearer (though one can screw things up if wants to, of course). Something I don't like about Ionic? Well, his OOTB visual style is ugly, very weak compared with Onsen-UI where everything is more visually pleasing (plus Onsen-UI lets you use Font-Awesome icons besides Ionicons for your project, though this can also be achieved in Ionic with some effort). But apparently this is part of the business strategy of Ionic, as they have recently launched Ionic Market where you can buy themes, plugins and packages for your Ionic starter applications. Luckily I found Ionic Material which is a free and simple way to implement Material Design on my Apps.

Ultimately both are very good frameworks, but Ionic today is much more accessible. Will this be like VHS and Beta? Who knows, maybe. I could not make a more thorough comparison that would be more appropriate to opt for one or the other (hey, I am a "one-man-shop" Apps developer using my spare-time!:) ): functionality, performance (this would be especially important to know about, so if anyone has information about this: please share!), supported platforms and versions, tests on real devices, update frequency, error resolution, future planning...

Maybe / certainly the next projects I have in mind will help me learn more: an app for Market Research, another app for Camera fans... Hybrid rules!

comentarios

0 Responses to "More Hybrid Apps please!"

Publicar un comentario