Live data from Hacker News

Apache Cordova: after 10 months, I won't using it anymore

geekcoder.org

61–70 of 96 posts

Re: Apache Cordova: after 10 months, I won't using it anymore

#61

Earlier quoted context omitted.

Is there a reason they don't ship with a simple web server to server out the static files, similar to `python -m SimpleHTTPServer`?

Why would they want to? Both platforms have webviews that can render HTML from a file, or passed in strong form, or whatever you like. Why point it at an internal web server? If anything, it'd add overhead to the system that's unnecessary.

Apparently WKWebView does not support loading from file. That's why he suggested wrapping it in a localhost HTTP server.

Re: Apache Cordova: after 10 months, I won't using it anymore

#63

On performance, the new WKWebView on iOS (with Nitro JS + GPU rendering, including WebGL), and the Chromium webview on Android 5.0+ (or Crosswalk for Android 4.0+, similar features all round), radically changes the performance story. It's almost identical to the system browsers now. Facebook's comments about HTML5 were back in the dark ages when the webviews generally used horribly slow software rendering and didn't…

> radically changes the performance story

So that it's only 100 times slower than a native app instead of 200 times?

Re: Apache Cordova: after 10 months, I won't using it anymore

#64
post #54

Earlier quoted context omitted.

I think it is also a question of ressources, I built a pretty good backbone app with cordova, I would say that you can get 90% there ( https://www.cakemail.com/mobile ). The question is also what can you afford. Can you afford to have 2 ios & 2 android devs? Can you afford to build 2 times all the UI features, etc. For a small company, small budgets, if you have strong front-end devs & designers you are probably goin…

You can get the same with Xamarin, Qt and similar tools that offer a better native integration than a web view. Even if I have to code native like widgets in QML, it is surely way better than hacking around the DOM.

I've found loading QML-based interfaces to be slow on low to mid range android phones. It feels sluggish to start the app. I wonder if the alternate (QWidgets on an OpenGLContext) is still better than random DOM hacks?

Re: Apache Cordova: after 10 months, I won't using it anymore

#65
post #64
post #54

Earlier quoted context omitted.

You can get the same with Xamarin, Qt and similar tools that offer a better native integration than a web view. Even if I have to code native like widgets in QML, it is surely way better than hacking around the DOM.

I've found loading QML-based interfaces to be slow on low to mid range android phones. It feels sluggish to start the app. I wonder if the alternate (QWidgets on an OpenGLContext) is still better than random DOM hacks?

The commercial version compiles QML into native code.

http://doc.qt.io/QtQuickCompiler/

Re: Apache Cordova: after 10 months, I won't using it anymore

#66
Every time I read one of these "this common, popular tool actually SUCKS", it seems like the author is trying to use it in a way it wasn't really intended (or obviously shouldn't be used).

Of course you aren't going to get native performance out of cordova. You are going to get webview performance out of it. If you need native performance, write a native app.

Re: Apache Cordova: after 10 months, I won't using it anymore

#67

Earlier quoted context omitted.

I think it is also a question of ressources, I built a pretty good backbone app with cordova, I would say that you can get 90% there ( https://www.cakemail.com/mobile ). The question is also what can you afford. Can you afford to have 2 ios & 2 android devs? Can you afford to build 2 times all the UI features, etc. For a small company, small budgets, if you have strong front-end devs & designers you are probably goin…

For basic application there's no need for very deep knowledge of the platform, so you can find people who know iOS and Android equally well and just write two different apps. As Cordova might introduce more problems than advantages, writing two identical apps might actually be faster, if app is not that huge. And native fast responsive app with smooth animations might earn you more, than HTML container. I wrote a sim…

> but you have to write a lots of spaghetti-code

What? As someone who does a LOT of vanilla JS, what do you consider "spaghetti code"?

Re: Apache Cordova: after 10 months, I won't using it anymore

#68
post #65
post #64

Earlier quoted context omitted.

I've found loading QML-based interfaces to be slow on low to mid range android phones. It feels sluggish to start the app. I wonder if the alternate (QWidgets on an OpenGLContext) is still better than random DOM hacks?

The commercial version compiles QML into native code. http://doc.qt.io/QtQuickCompiler/

Sweet, will check try this out tonight! Thanks for the tip!

Re: Apache Cordova: after 10 months, I won't using it anymore

#69
post #20

FUD. Ever heard of WebSQL for storing your data? After 10 months, you should have been able to work around nearly anything you mention in your article.

> After 10 months, you should have been able to work around nearly anything you mention in your article. But that's exactly the point. Ages ago this comment on HN summarized the situation perfectly... https://news.ycombinator.com/item?id=7442766 "It takes less time to learn and build native instead of trying to hammer Javascript into a hole it doesnt fit into, and spending hours attempting to optimize it's performanc…

> It takes less time to learn and build native instead of trying to hammer Javascript into a hole it doesnt fit into, and spending hours attempting to optimize it's performance to no end...

...depending on the size of the app.

I have an open source project that I devote a handful of hours a week to. I absolutely do not have the capacity to create native apps for desktop, iOS, and Android. It's great if the writer of that comment has either a tiny app that does nothing important or has a ton of free time, but not everyone is so lucky to be able to maintain an app on 3+ separate platforms.

Javascript is the one language all devices speak well, so as someone who is proficient in it, has an existing (somewhat complicated) app, and wants to port it to mobile as quickly as possible, rebuilding everything twice in two different languages and two different UI platforms is just not an option.

Post reply on HN