News for hackers. Stuff that matters.
Re:Apache Cordova: after 10 months, I won't using it anymore by mahouse on Monday July 06, 2015 @07:59AM (#9838426)
This is a very bad article. The real problems with Cordova are:

* Core functionality is broken between releases. If you ask in the IRC support channel, they will even tell you not to update if things work well! What if I need a new feature?

* Documentation is absurdly horrible or even plain wrong. I have been told several times to refer to the source code to find out how something works.

* If you face any problem, chances are you will never find an answer in Google. You may find some StackOverflow thread if you are lucky, where several clueless people argue about things they do not know and then arrive to a wrong conclusion. (The programming skill levels of Cordova users on those communities are usually very low.)

* Critical functionality (things such as local notifications) is not included. You must rely on 3rd party plugins, that could be well maintained, or could be not maintained at all.

Yes obviously a Cordova app does not look native. It's not native and it will never be. Period.

Re:Apache Cordova: after 10 months, I won't using it anymore by posabsolute on Monday July 06, 2015 @08:59AM (#9838758)
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 going to get a good cordova app & you can move your company much faster.

You have big bugdets? Hire the native devs, get the 100% performance & experience from native.

Re:Apache Cordova: after 10 months, I won't using it anymore by vbezhenar on Monday July 06, 2015 @09:25AM (#9838899)
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 simple game using cordova and I won't do it again. HTML+CSS+JS just not suited for mobile app development (I didn't try react native, those guys might change the game). Either you use frameworks and everything is just bad or use vanilla JS and everything might work, but you have to write a lots of spaghetti-code and device support might be limited.

The real unmatched benefit of using cordova (or any other webview) is the ability to deliver updates for your app without bothering with App Store moderation.

Re:Apache Cordova: after 10 months, I won't using it anymore by posabsolute on Monday July 06, 2015 @09:41AM (#9838985)
You seems to only think about consumer apps, there is a lot of companies doing b2b. I agree that for games cordova is a very poor choice.

Unfortunately I can't agree that you can easily find easily good IOS & Android devs, I'm sure that some that can do it out there, but generally one platform always suffers more.

Has for Cordova issues, from my experience, nothing was so atrocious that writing 2 apps would have been faster.

"Either you use frameworks and everything is just bad or use vanilla JS and everything might work"

I think you might be thinking about games saying that, again I can't agree, if you don't understand what your framework does in your back that's another thing, but you can easily write optimized code when you control your render.

For example Ionic is a very good mobile UI framework for angular. It however wont save you if you start adding random things to the DOM while doing an animation.

Re:Apache Cordova: after 10 months, I won't using it anymore by moron4hire on Monday July 06, 2015 @11:04AM (#9839583)
> 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 by mgkimsal on Monday July 06, 2015 @12:04PM (#9840080)
"vanilla spaghetti" might be a new term we can start using :) leaves a bad taste in everyone's mouth!
Re:Apache Cordova: after 10 months, I won't using it anymore by pjmlp on Monday July 06, 2015 @09:28AM (#9838918)
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.

Re:Apache Cordova: after 10 months, I won't using it anymore by emidln on Monday July 06, 2015 @10:25AM (#9839295)
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 by pjmlp on Monday July 06, 2015 @10:31AM (#9839337)
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 by emidln on Monday July 06, 2015 @11:19AM (#9839699)
Sweet, will check try this out tonight! Thanks for the tip!
Re:Apache Cordova: after 10 months, I won't using it anymore by leoh on Monday July 06, 2015 @12:56PM (#9840467)
I think it was a great article. A lot of people go in with the assumptions that the author has. At my last position we used Cordova. Like you, I was against it from the beginning because it is so unlike native. Yet many are under the impression that using Cordova means writing half the amount of code and/or taking half the amount of time that it would take to write separate iOS and Android apps. They think it's possible for reasons specified in this article (generally: that experiences are native-like and development is not harder than native); namely:

- that it can be like native; I regularly heard from management "What is so difficult about CSS? Why is it taking so long to build widget X?"

- that there is no reason why it can't be fast; I regularly heard from management "iPhones have >1ghz processors after all -- why can't it be faster?!"

- that the plugin ecosystem is bad -- "Why can't we just do X? Why do we have to build this?"

I agree with your criticisms as well. The lack of documentation, plugins, breaking between releases, and general help is surely lacking. But this is by no means a "bad article."

Re:Apache Cordova: after 10 months, I won't using it anymore by thekingshorses on Monday July 06, 2015 @02:32PM (#9841174)
Non-engineers are the biggest problem building HTML5 apps.

Everyone from VPs, Directors, to HR knows HTML, and they all have opinion about how it should be. They all want you to build a Facebook like app with 2 developers and works on all platforms.

Re:Apache Cordova: after 10 months, I won't using it anymore by thekingshorses on Monday July 06, 2015 @12:30PM (#9840247)
These right here are the problems with Cordova.

Cordova is not a replacement to build native apps. Its a tool that allows you to build really good apps that works on all platforms.

My app[1] wouldn't have exist without Cordova. And based the feedback, most users are fine with it.

I have yet to find a solid native app that is available on all platforms, not belongs to a big company or a startup with huge funding, and made by 1/2 developers.

[1]

https://play.google.com/store/apps/details?id=com.premii.hn

https://itunes.apple.com/us/app/hacker-news-yc/id713733435?m...

http://hn.premii.com/ (HTML5)

Re:Apache Cordova: after 10 months, I won't using it anymore by joshcrowder on Monday July 06, 2015 @08:14AM (#9838492)
This would of made for a much better article. I couldn't agree more!

I'm currently working on a Hybrid React app, performance issues aside the real issue is documentation and support. As soon as you are beyond a basic web app wrapped in a container you realise quickly Corodova will always be a second class citizen.

On a more positive note React Native (https://facebook.github.io/react-native/) is mind blowingly amazing. I really can't recommend it enough, especially for Javascript developers.

Re:Apache Cordova: after 10 months, I won't using it anymore by deutronium on Monday July 06, 2015 @08:23AM (#9838552)
I'm looking to use something like Cordova to develop a fairly simple app for both Android and ios,

so far it looks like React is for Mac only, looking at https://facebook.github.io/react-native/docs/getting-started... ?

Edit: It looks like i'm missing something as I can see Android apps built with it on http://www.reactnative.com/built-with-react-native/

Re:Apache Cordova: after 10 months, I won't using it anymore by kriro on Monday July 06, 2015 @09:31AM (#9838938)
There's also http://reapp.io/ It can produce apps that run on Android but last time I checked the documentation was pretty iOS centric.
Re:Apache Cordova: after 10 months, I won't using it anymore by colinramsay on Monday July 06, 2015 @09:15AM (#9838845)
That's React Native, not standard React for the Web.

http://facebook.github.io/react/

Re:Apache Cordova: after 10 months, I won't using it anymore by deutronium on Monday July 06, 2015 @09:31AM (#9838936)
Ah gotcha, looks like Android support is coming to React Native soon, fingers crossed
Re:Apache Cordova: after 10 months, I won't using it anymore by lewisl9029 on Monday July 06, 2015 @09:41PM (#9843195)
> Yes obviously a Cordova app does not look native. It's not native and it will never be. Period.

You can get pretty close to looking native with a framework like Ionic: http://showcase.ionicframework.com/

Of course, it's not native, so there are going to be corner cases where things don't look quite the same, but I'd be hesitant to make such an absolute statement about the future when you can already get so close today.

Performance and compatibility issues for Cordova apps can be often traced back to outdated webviews, and you can resolve much of it by embedding an up-to-date webview with your app: https://crosswalk-project.org/