Live data from Hacker News

Capacitor: Universal Web Applications

capacitor.ionicframework.com

11–20 of 52 posts

Re: Capacitor: Universal Web Applications

#11
post #8

Is this a competitor to React Native? RN seems to be the ideal: truly native components but a JS programming model.

> RN seems to be the ideal: truly native components but a JS programming model.

I'm not sure i would call React Native "ideal". I think it's "progress" though.

Re: Capacitor: Universal Web Applications

#12
Capacitor creator/Ionic co-founder here. Didn’t expect to see this on the front page! Disclaimer: it’s still alpha.

We’re building Capacitor based on feedback from the Ionic community to improve our ability to move across platforms such as App Store/web/electron, make it easier to interact with Native SDKs, mix web and native UI, and manage native app projects/tooling.

One feature I'm really excited about is having Web UI implementations of many Native experiences when running on the web/electron. Here's an example of how the `Camera` plugin looks when running in the web: https://twitter.com/maxlynch/status/961749127657910272. This uses our new Ionic Web Components so you can easily use these controls with low overhead even if you aren't using Ionic.

We hope Capacitor will be useful to other web developers that want to build mobile and desktop web apps, even if they aren’t using Ionic, and we’re building support for hitting the hybrid sweet spot of native UI shell (nav/menus) with web content.

Capacitor will eventually be replacing Cordova in Ionic’s toolchain so it’s going to be a core part of the experience.

Re: Capacitor: Universal Web Applications

#13
post #5

Why not just PWAs? I think the browser has come a long way, and a great number of things can now be accomplished in the browser without any additional frameworks. We built Bx ( https://usebx.com ) without any frameworks and it feels much like a native app on a phone or tablet when added to the home screen.

As soon as you like to access any sensors on the device, the PWA sadly isnt an option anymore.

It depends on the sensors you need access to. An iOS PWA has access to Geolocation, Magnetometer, Accelerometer, Gyroscope, Camera, Audio, Apple Pay, etc.

Re: Capacitor: Universal Web Applications

#14
Glad to see they're moving beyond Cordova's main issue: trying to fully automate the native build processes with disastrous results.

I am perfectly happy opening up Xcode to build and configure. Same with Android Studio. Trying to find a "Cordova solution" to very common build tasks was a continual nightmare for me.

I ended up just switching to React Native to wrap a progressive web app. It makes no sense since I'm only using a single React component (UIWebView), but the build / deploy process was just so much easier to manage than the mess of Cordova scripts and outdated/broken plugins.

Re: Capacitor: Universal Web Applications

#15
post #5

Why not just PWAs? I think the browser has come a long way, and a great number of things can now be accomplished in the browser without any additional frameworks. We built Bx ( https://usebx.com ) without any frameworks and it feels much like a native app on a phone or tablet when added to the home screen.

PWAs are awesome, but we don’t see it as either or. If your app needs access to proprietary native SDKs then you need a native app. Capacitor gives you optionality to do both with the same code.

Re: Capacitor: Universal Web Applications

#16
post #5

Why not just PWAs? I think the browser has come a long way, and a great number of things can now be accomplished in the browser without any additional frameworks. We built Bx ( https://usebx.com ) without any frameworks and it feels much like a native app on a phone or tablet when added to the home screen.

As soon as you like to access any sensors on the device, the PWA sadly isnt an option anymore.

That may be, but I tend to see soo many apps now days that just need basic rendering. I almost wish there was a revolution to go back to when the IOS app store just installed links to URLs. It's so terrible inside phonegap apps such that apps simply can't save my f-ing password! Instead of building out more mobile features to complete the progress made by HTML5 we keep going back to native apps for no reason. Yes I get that there is a certain class of apps that MUST be native, but I would argue the bulk of apps don't need this.

Re: Capacitor: Universal Web Applications

#17

Glad to see they're moving beyond Cordova's main issue: trying to fully automate the native build processes with disastrous results. I am perfectly happy opening up Xcode to build and configure. Same with Android Studio. Trying to find a "Cordova solution" to very common build tasks was a continual nightmare for me. I ended up just switching to React Native to wrap a progressive web app. It makes no sense since I'm o…

You're hitting on something we hear a lot, and that's a use case we are really going after. Even if you use RN today with a webview, there's no core way to expose plugins/modules to that web view (like Cordova does). I think there's a middle ground here where the web layer is first class but it's easier to drop into native code and manage your native project as you wish, while staying as close as possible to the standard tools/APIs that each platform developers typically use. If we can save you 95% of the time on your app, and have simple escape hatches to get full control, that's a win.

Re: Capacitor: Universal Web Applications

#18
post #5

Why not just PWAs? I think the browser has come a long way, and a great number of things can now be accomplished in the browser without any additional frameworks. We built Bx ( https://usebx.com ) without any frameworks and it feels much like a native app on a phone or tablet when added to the home screen.

PWAs are awesome, but we don’t see it as either or. If your app needs access to proprietary native SDKs then you need a native app. Capacitor gives you optionality to do both with the same code.

Instead of this madness device manufacturers could work together with HTML5 cons... to make a set of APIs that access native things, and for not-so-standardized features they could use prefixes kinda like we did in CSS. The websites accessing these HTML5 APIs would simply check for their existence first, then start using them. Usage of the APIs would then kick of device specific permission prompts, etc... Think about the integrations too, we would no longer have to set up application forwarding URLs like twitter:// to route to our app, everything would work from any device!

Even if manufacturers don't work together, if they at least provided JS API access built into their native browsers - then we can build shims on top of them.

Re: Capacitor: Universal Web Applications

#20
post #5

Why not just PWAs? I think the browser has come a long way, and a great number of things can now be accomplished in the browser without any additional frameworks. We built Bx ( https://usebx.com ) without any frameworks and it feels much like a native app on a phone or tablet when added to the home screen.

I fully support PWAs, but it's not just a matter of doing what's practical, it's also a matter of user expectations. It's become standard business strategy that you need an app store presence whether or not it's an effective way to deliver functionality. Plenty of users (iPhone users in particular) just expect it.
Post reply on HN