7 ms·
Ask HN: Is phonegap/cordova still relevant?
I did use phonegap a few years ago and it seemed very lacking. Partly the fact that phones were not powerful enough to make apps feel native enough. Has anything changed? Is it worth revisiting? Or should I give React Native a go instead?
(I am not planning to develop anything graphics intensive)
- martinni 10y agoI'm not a phone gap expert by all means, so I can't speak for it's new ability. But I wasn't very pleased with my experience when I did have to use it. Now that Xamarin is free, it's very hard to say no to such a powerful tool.
- kyriakos 10y agoIf I am not mistaken doesn't with Xamarin mean you need to build the UI code once for each platform?
- sharemywin 10y agoThis says you can share 96% of the code base across platforms: https://www.xamarin.com/forms https://www.xamarin.com/forms
- pdappollonio 10y agoXamarin Forms dev here. This is true. I wrote an audiotour app and I was able to reuse everything. The only thing I couldn't reuse was the audio player because of differences between platforms, but still you can use plain old Xamarin.Android and Xamarin.iOS. Pretty good results and you save ton of time.
- sharemywin 10y agocurious is there design pattern for that? could you still have one code base similar to how different processors are compiled? or some kind of wrapper component? seems like there should be someone to write the code once and not need to make a copy.
- Sidetalker 10y agoXamarin provides a bunch of generic controls that act as bridges to their corresponding platforms. It has enough flexibility that you can build the UI code from scratch for each platform, but you could probably put together a simple form based application with a single UI source.
- izacus 10y agoYes, and that is why those apps look and feel better - you use OS native widgets that users are familiar with and feel as their OS does. Meanwhile you still can share most of the code in the app.
- bo0mb 10y agoThat's where React Native comes in ;) Build for IOS/Android/UWP/Ubuntu/OSX all in the same base.
- micaksica 10y agoThis is what I came here to say. Cordova is relevant, yes, and many people use it. For basic applications, Cordova applications can feel "native enough". However, I don't think Cordova is necessary anymore with Xamarin.
- lukehaas 10y agoI think Cordova is increasing in relevance. Over the last couple of years mobile devices have reached a level of performance that makes hybrid apps feel native. When you combine Cordova with Ionic you can create write-once apps that deploy to any device and have a native look and feel.
- danudey 10y agoNot to dispute your assertion, but I've been hearing that PhoneGap/Cordova has 'felt native' for as long as it's been around, and that's never been true. Has it finally changed, and is it really worth it compared to e.g. writing an app in React instead?
- ryanworl 10y agoIt depends on your goals. If you're doing relatively basic things, a hybrid app can feel indistinguishable from a native app on iOS. Android is tough because the hardware varies so much. Displaying text fields, scrolling tables, images, etc. will work well and feel native on iOS and on higher-powered Android devices. Going outside of those lines into a lot of animation and that kind of thing is slower and will not feel native anymore. I actively recommended against hybrid apps for years to people who hired me, but for the last year or so I would have felt safe recommending it with the caveats above. My experience is mostly with Ionic, which is a layer on top of Cordova, but I imagine most of these frameworks are the same.
- placebo 10y agoYou might want to check out Framework 7 (http://framework7.io/ http://framework7.io/). Discovered it only a few months ago and it's the best work I've seen so far to achieve a native look when using Cordova
- aikah 10y ago> When you combine Cordova with Ionic you can create write-once apps that deploy to any device and have a native look and feel. Ionic hardly feels "native", especially since it is based on AngularJs which is dog slow to begin with. Stop overselling Ionic.
- deleted 10y ago[deleted]
- bg0 10y agoIt's basically writing an angular app and sticking it on someones phone. Unless you're making a game, you can build some pretty powerful web apps and throw them into ionic to make an indistinguishable mobile app.
- onlymind 10y agoIt's very much relevant. I've just built and released an app using Ionic 2. Nearing 25k users. Check out Ionic 2. Build something quick. Test on your phone.
- bo0mb 10y agoWith the addition of React Native and Xamarin going free why would you? Hybrid apps will never feel native. You can even go graphic intensive with RN, it doesn't muddy you up if you need to do stuff with swift/obj-c.
- WorldMaker 10y agoSome development teams can't afford the developer effort to polish UI specifically for every platform. For some apps it doesn't matter if it "feels native" if it can access the platform features it needs.
- aikah 10y ago> Some development teams can't afford the developer effort to polish UI specifically for every platform. For some apps it doesn't matter if it "feels native" if it can access the platform features it needs. Then don't write an app in a native wrapper, write a website if you cannot afford basic mobile app development.
- flukus 10y agoThat assumes a connection is always available.
- aikah 10y agoNo it doesn't, HTML5 has offline features.
- WorldMaker 10y agoI mentioned "access the platform features it needs". Off the top of my head, big things that still haven't yet quite crossed into the deeper web platform: - Offline (getting close with things like Service Workers, but not quite there yet) - Geolocation (also getting close here in browser support, but not quite yet) - Camera (caniuse suggests we're getting maybe close to browser support, but also not quite yet) The particular canary in this coal mine (and clear when looking at caniuse stats) is that iOS Safari is still lagging a lot in some of these HTML5 "app platform" features. (I wish I could just ignore iOS altogether, but obviously there are a lot of iOS devices out there.)
- seanwilson 10y agoLots of people are still using Cordova (especially for enterprise apps) and in-app browser support is getting better all the time. There's a huge number of upsides to having a single codebase that works on Android, iOS and the web. Native will obviously give the best UX but comes at a high cost which you have to weigh up against other factors. There's a very vocal group online that will tell you hybrid apps are the worst thing ever but when you do a hybrid app well most people don't notice.
- WorldMaker 10y agoCordova is still quite relevant. The better question may be a question of developer balance. React Native (and similarly Xamarin) requires extra work per each platform where things don't quite overlap and native controls are different enough on the given platform. In terms of balance for a small team, "raw" HTML5 on Cordova can still be a time saver for reaching all the platforms with the exact same UI. Admittedly, yes that's likely not a true "native" UI and will look/feel more like a "website", but for some projects that least common denominator is more important the time/developer effort of polishing the UI especially for each platform.
- mixedCase 10y agoI'm very happy building a frontend for an ERP system with Vue.js that works with the same codebase on Cordova and on web browsers. And currently my favorite Android app is a Hacker News client written in Cordova. Would I use it to write a game? Anything that runs in the background? Something that needs to start instantly and die instantly? No. But it's a great tool if it's paramount to keep platform support overhead to a minimum and you need to have something identical or similar running in the browser.
- deleted 10y ago[deleted]
- aikah 10y agoThe first thing you need to ask yourself is do you need an app in a native wrapper or a simple website ? 99% of the time you don't need a website. There is plenty of ways to make a website work offline on mobile.
- hahamrfunnyguy 10y agoI am assuming you mean "99% of the time you don't need an app". My experience is that when a customer asks for an app, a mobile friendly website will usually meet their requirements AND be 1/3 the cost.
- leoh 10y agoI've worked with Cordova, and in many cases, I don't think it's appropriate. In particular, apps that: * require native functionality (i.e. access to photos, GPS, notifications) * are sufficiently complex UI-wise ... are not well served by Cordova. Why? * when you start needing native functionality, you will find that the plugin ecosystem is often lacking; having to modify or write your own plugins means that you have suddenly have three languages (JS, Obj-C/Swift, Java) to contend with instead of two (Obj-C/Swift, Java) * iOS and Android development kits make it easy to create apps that feel like they belong on their respective platforms — there is no need to spend developer or UI/UX looking for a library with lots of UI elements or developing a look/feel Moreover, even relatively simple things like table layouts that "feel nice" — e.g. highlight when you tap on them, implement swiping to delete elements, allow for re-arranging — are significantly more onerous to implement in JS as opposed to natively. If your app is sufficiently simple and doesn't fall prey to these pitfalls, you might want to consider Cordova. But if you really don't need native functionality, you might as well just get `UIWebView` working yourself.
- hahamrfunnyguy 10y agoI agree, especially with your first point. I always say if you need more than one native plugin, Cordova is a poor choice. If your app is just a thin client for a bunch of cloud based services, it is a pretty good one.
- deleted 10y ago[deleted]
- Hitman666 10y agoA lot of “I’m not an expert, but let me tell you it sucks” stories. Most people who actually do make money with Ionic/Cordova just go bazinga from these comments. So, I'm just gonna c/p what I wrote [here](http://tutorials.pluralsight.com/front-end-javascript/getting-started-with-angular-2-by-building-a-giphy-search-application http://tutorials.pluralsight.com/front-end-javascript/gettin...): > ...at this point you may still say: Yeah, sure, but I've heard that React/Ember/NameYourPoison is way better. I will answer this question similarly as I did in a conference talk I gave a few months ago: Please just stop with the analysis paralysis already. Pick a framework (any framework for that matter) that the community is using, use it, and see how far it gets you. All these talks about X being slow or Y being better just make no sense until you try it yourself for your use case and preference. With this said, I have to add that it would be unwise not to keep an eye on the 'latest and greatest' frameworks. So, please note that I'm not defending Ionic's honor, with all due honesty it has its problems (speed and lack of plugins to name a few - however, truth be told it has the most of the lot). And, if it's obvious that we would do way better with technology XYZ, I'd be the first to say 'K, no probs, let's learn and use it'. But, until Ionic (and soon Ionic 2) keeps showing results, I'll bet my money on that horse. And now for a twist "heeey, but that NativeScript looks shineeeey!" > Who are you, dude!? #3 at [StackOverflow in Ionic](http://stackoverflow.com/tags/ionic-framework/topusers http://stackoverflow.com/tags/ionic-framework/topusers), author of [Ionic book](https://leanpub.com/ionic-framework https://leanpub.com/ionic-framework).
- collyw 10y ago>With this said, I have to add that it would be unwise not to keep an eye on the 'latest and greatest' frameworks. It will consume a lot of your time.
- Hitman666 10y agoTrue, that's why I said only to 'keep an eye', and potentially check only ones that seem more than a mere hype. Of course, all in a reasonable 'not to get burned out' time frame (though, as you may agree, this means way too many things to different people).
- max_ 10y agoAll my apps (responsive HTML) are served via HTTP and rendered via WebView() api for both iOS and Android
- alasdair_ 10y agoIonic is pretty good, especially if you are a developer that knows angular already (even more so if a webapp is your main business and it's already in angular). If you are not writing games, Ionic works really well, especially for shops with only a few developers.
- sheraz 10y agoI find that they are quite relevant. In fact, I begin by prototyping all new app-ish projects as mobile web (twitter bootstrap). Then, if we need better access to phone features (push messaging), I will simply wrap it in cordova. Admittedly, I do have to fight with some plugins, but I try to not stray too far from well supported ones. Also, you should know that you can get 60 frame/second on canvas. There are may casino slot style games that do just this. I believe flipboard does as well?
- a-saleh 10y agoDepends on what do you want to achieve? We utilize Cordova heavily in product I am working on, but more on a meta-layer, meaning, that user is able to create his simple application with drag-drop ui, see a preview in browser and then package it to a phone-installable file. We even had integrations for apparmor/apperian, so that the user is able to upload the app to their corporate app management right away. If I were to build a single app, I would go native. Or xamarin, because I used it already, know how to get around its quirks, and like C# :)
- dotnetkow 10y agoAbsolutely! Despite critics, they can feel native due to increasingly better phone hardware and picking a good framework (KendoUI Mobile, Ionic, React Native, Xamarin). I use KendoUI Mobile and Knockout.js for mine currently, with plans to probably switch to Ionic someday. Users don't care what the tech is - it's about the experience. I've sold over $100k in apps over 3 years... just launched an Untappd beer app if you're curious - www.getBeerSwift.com.