6 ms·
Capacitor: Cross-platform native runtime for web apps
- the-dude 5y agoHow come all top level comments are from the same time? ( for me, now, 47 minutes ago )
- MikeTheGreat 5y agoThat's a really interesting observation! To be fair, there's only 4 top-level comments from that same time. Given a big enough audience it's reasonable to think that this would happen from time to time. There doesn't appear to be any particular bias / agenda from the posts (that I can see) so I'm guessing it's just coincidence.
- the-dude 5y agoAh, it seems to be a submission from the second hand pool ( https://news.ycombinator.com/pool https://news.ycombinator.com/pool ). That would make sense, as it popped up on the FP?
- jsnell 5y agoI think it's a HN feature related to a post with existing comments being boosted to the frontpage by a moderator. The timestamps of both the post and the existing comments are faked for a time period to appear consistent with the time of the boost rather than the original post. I.e. all the comments were not posted at the same time just now, but over a longer time period hours ago.
- ssss11 5y agoAnyone using this care to weigh in with pros/cons/comparisons?
- glutamate 5y agoTheir docs have a comparison with Cordova here: https://capacitorjs.com/docs/cordova https://capacitorjs.com/docs/cordova
- yesimahuman 5y agoNot a direct answer to your question but this was a great write up from the BBC (they use Capacitor): https://medium.com/bbc-design-engineering/shipping-progressive-web-apps-everywhere-190a421c606a https://medium.com/bbc-design-engineering/shipping-progressi...
- simonbarker87 5y agoI’ve made 3 apps with Ionic and Capacitor (2 released, one large that I abandoned). While it’s great the enormous draw back is reliance on crappy community plugins and using old Cordova stuff to access native features. They have nice premium stuff behind the enterprise paywall but they don’t offer prices and make it pretty clear that they’re not interested in speaking to a small indie dev. I eventually abandoned my “big” project on Ionic due to this issue. This was about a year ago. I looked at React Native and that seems to at least have more options but I’m not sure if it will be better.
- _fat_santa 5y agoThe two biggest advantages of RN in my mind are that it has no paywalled content like Ionic/Capacitor and that the ecosystem is very very active, very Soldom do you run across "crappy community plugins" like you will with Cordova/Capacitor/etc. Sure there are many "crappy plugins", but there's almost always a much better option to those.
- yesimahuman 5y agoI know developers are allergic to paying for anything but if you're a company working on a really critical app, the reality is Ionic and Capacitor offer something you just can't find in any other mobile ecosystem today: direct support and officially-supported enterprise integrations. The premium features we have are almost all enterprise-focused ones that indies and startups frankly just don't have a lot of need for or they already have community-supported options. Our approach there is to monetize things that are "must have" for enterprise but only "nice to have" for everyone else. If they are "must have" for everyone we try to make those free. And you can actually call us and get dedicated support. Can you imagine Facebook or Google ever doing that? With that revenue we are able to invest back into the OSS technology and we're also aligned with actual users of the stack. This isn't an internal project at a big tech company that we just happened to OSS for goodwill but only build for ourselves. At the end of the day our users are our #1 focus, not internal projects. Capacitor is younger than RN but the ecosystem is growing around it and I've been excited seeing more 3rd party vendors officially support Capacitor (Sentry, for ex) and the quality of the first-class Capacitor plugins has gotten a lot better this year (and we've also chipped in to help where we can). Capacitor has a huge addressable market since all web technologies work with it and I think that will help it become a pretty big force in mobile. People don't realize this but Cordova powers a lot more apps than both RN and Flutter today. There's just a ton of web devs in the world.
- taylorfinley 5y agoMaybe I've just been doing this too long but my first reaction was "Another one??"
- boomskats 5y agoCapacitor has been around for a while, at least for a couple of years. I think it's the Ionic team's response to the EOL for Cordova/Phonegap. I've been stung by ionic/drifty a couple of times, but I really hope this project survives. There are some great ideas here.
- the-dude 5y agoRecently I had to rebuild an iOS app originally built in Ionic2 / Cordova 4.5. I was pleasantly surprised it basically built in one go on a fresh MacOS install with the latest Ionic and Cordova 6.5. I didn't expect that.
- yesimahuman 5y agoSorry you've been stung before! Capacitor is definitely here to stay. The project has been taking off recently and is powering the majority of apps for our users and customers today. Also we're starting to see more platforms that used to be powered by Cordova start to switch to Capacitor so that should further solidify its staying power.
- say_it_as_it_is 5y agoWeb Native Apps?
- agloeregrets 5y agoYeah, this was made by the team behind ionic...which has a long history Of trying to twist words in their favor and sell their framework. Personally,it's just Cordova in a different suit and isn't remotely related to what native means on mobile. The entire reason they are selling their framework so hard is under the enterprise tab in the menu.
- yesimahuman 5y agoIt's not just Cordova in a different suit. There are a lot of similarities, but there are some pretty big differences. For example, Capacitor has first-class support for Progressive Web Apps and can be used as a library you link with that comes with an abstracted set of APIs for accessing native/device features on iOS/Android/Desktop/Web with the same codebase. There are a ton of small decisions that all add up to a pretty dramatically different experience and our Web Native moniker represents our focus on building an app that is native to the web and then running it on all the platforms you care about with full access to the native features you need on each platform. And don't just take my word for it, the feedback from actual users is that the experience is dramatically better than Cordova. For example, see the 2020 State of JS survey results: https://2020.stateofjs.com/en-us/technologies/mobile-desktop/ https://2020.stateofjs.com/en-us/technologies/mobile-desktop... Also on the Enterprise tab, the other way to look at this is we have a sustainable revenue and funding model for the project that is aligned with actual users of the project (as opposed to this being an internal project we just happened to OSS for goodwill/hiring benefits). I'm really proud of that and consider it a huge advantage of the project.
- hulitu 5y ago1F or 1pF ? I wish that people will be more creative when choosing names for their pet projects. It really helps when searching.
- candiddevmike 5y agoCapacitor user here (with Mithril/Typescript). It's OK for what it does but everything feels very fragile and I get freaked out anytime I have to touch the Android or iOS code for fear of breaking it. The plugin ecosystem is also a bit of a quagmire of abandoned repos and figuring out if you can still use things from Cordova without too much fuss. I tried going the TWA route for the Play Store but there isn't an IAP solution yet (and I can't use Stripe because...). I look forward to not needing Capacitor in the future, but for now it mostly stays out of the way.
- Gys 5y ago> everything feels very fragile and I get freaked out anytime I have to touch the Android or iOS code for fear of breaking it. The plugin ecosystem is also a bit of a quagmire of abandoned repos That is exaclty how I feel about my RN app ;-)
- exhilaration 5y agoThere were a bunch of mostly positive comments about Capacitor in yesterday's PWA Builder discussion if you want to compare the two: https://news.ycombinator.com/item?id=29040793 https://news.ycombinator.com/item?id=29040793
- endisneigh 5y agoIt's a shame that the rules are so convoluted for the App and Play stores. Otherwise you could make a "App Director" app and then just have people use your web app. As native functionality is needed it will delegate to the "App Director" app. Perfect example being notifications and interfacing with things like the calendar and contacts. This sort of app wouldn't be allowed on both stores.
- solarkraft 5y agoWhy would it not be allowed on Google Play?
- gogopuppygogo 5y agoHere is an alternative I've used for years: https://gonative.io/ https://gonative.io/
- yesimahuman 5y agoCapacitor creator and co-founder of Ionic here (company that owns and works on Capacitor). If you aren't familiar with Capacitor, it's a way for web devs to build cross-platform apps using standard web technology and any popular web stack. For example, you can build mobile apps using popular stacks like Next.js + Tailwind as in this example: https://github.com/mlynch/nextjs-tailwind-ionic-capacitor-starter https://github.com/mlynch/nextjs-tailwind-ionic-capacitor-st.... We've got some exciting things in the pipeline like a Project API for automating configuration (whitelabling/CI/etc), E2E testing, easier native HTTP features, resource generation (splash/icon/etc). Happy to answer any questions about Capacitor!
- sroussey 5y agoCapacitor puts all APIs in the same context and thread as the UI. Something that Electron did a long long time ago before realizing the security implications.
- difosfor 5y agoWhat do you mean exactly? Could you give an example?
- dwaite 5y agoXSS gain access to native API
- yesimahuman 5y agoYou are correct that Capacitor plugin API entry points are in the same thread as your web/UI code (which will run in a separate process from your native plugin code given WKWebView sandboxes your app in a separate process. They communicate through message passing only). I don’t think it’s directly comparable to Electron for a few reasons. What Capacitor is doing is more like adding new Web APIs to the browser. You have full control over which of those APIs are exposed and they are all backed by the native sandboxing and permission model available on each platform. Additionally you are almost always only loading trusted local content. Electron exposing node runtime to untrusted remote content running in unsandboxed win32 apps, for example, is a pretty different beast. We do take security seriously though and would be happy to review or consider how we can enable users to lock down their apps even more.
- drannex 5y agoI develop and maintain a relatively popular open source Svelte[1] template (w/ live reload!) to develop cross platform apps. Capacitor really is a beauty to work with. While I disagree on some design decisions (putting build platforms at the root of the directory for one) the overall ecosystem is quite healthy and strong, and while backwards compat with Cordova is hit or miss, its quite good for a tool thats a decade old. [1]. https://github.com/drannex42/svelte-capacitor https://github.com/drannex42/svelte-capacitor
- no_wizard 5y agoHow does this compare with NativeScript? I know it can work with capacitor but unlike ionic it complies down to actual native UI and not mostly web views, is capacitor Ionics answer to just being glorified web views?
- deleted 5y ago[deleted]
- stoicjumbotron 5y agoI'm confused between Capacitor and Ionic. If possible can anyone explain the difference between these two?