Here's a few of the things that I learned:
Most updates break something
...be it a plugin, the build process or something else. If you're working with other developers it is crucial to use the same version of Cordova on all development machines! I should mention that this experience mostly comes from my projects being several months or years apart, which of course leads to breaking changes when updating from one major version to another. But that brings me to my next point:
Outdated plugins and documentation
There is a lot of very popular plugins that are simply no more maintained by the original author. The one that I had most problems with was phonegap-facebook-plugin (in retrospective I could have saved myself a lot of time by noticing the plugin still referring to "phonegap" rather than "cordova"). Thankfully there is a popular fork available which keeps maintaining the plugin, but that again is not compatible to the latest version of Cordova. Well, at least there is another fork for that which is a sign for how active the community is.
The same problem goes for documentation and the information available in general. While searching for a problem you are likely to dig up lots of articles from anno 2014. Not a problem per se, but reread the previous to paragraphs if you don't see why this is a problem for Cordova.
Weird bugs.
One more thing that almost cost me my sanity is that Cordova by default does not honor a website's viewport setting. An experienced web developer might have figured that out a lot faster, but it took me hours to understand why a website looked different when rendered in Cordova vs a browser. The solution was to use a plugin that was... well outdated and not compatible to the latest version of Cordova. :) Fortunately I was able to fix that easily.
I guess that's it for now. I was able to let the steam off! Please don't get me wrong: Cordova is great for some things, but I wish the whole developer experience would be more "consistent" in general.
No comments:
Post a Comment