Live data from Hacker News

Capacitor: Universal Web Applications

capacitor.ionicframework.com

41–50 of 52 posts

Re: Capacitor: Universal Web Applications

#41

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 W…

Can you point me in the direction of any documentation you might have on how a project should be handled with regards to source control? Currently my team doesn't commit the generated platforms/plugins folders but it appears that with Capacitor we might need to start committing some/all of these since it isn't expect to re-generate them from a config.xml like it was with cordova.

Re: Capacitor: Universal Web Applications

#42

I see this is from the ionic people - What are the goals for this vs ionic? Is this supposed to eventually replace it? Will it still be pushing Angular on us, or is it possible to use any JS framework?

This is not a replacement for Ionic! Ionic provides a cross-platform UI layer for mobile web apps. Capacitor is a replacement for Cordova which manages the native SDK interaction and native app project management/tooling side of your app. Once we integrate it into the Ionic CLI, you won't really have to think about which part is Ionic UI and which part is Capacitor.

With this in mind do you plan on offering a path for migration from existing Cordova apps?

Re: Capacitor: Universal Web Applications

#43
post #36

Earlier quoted context omitted.

Gotcha. Thanks for the clarification. My concern is that too often, embedded web apps still never feel right. It's that uncanny valley. I'm sure it's better than its ever been, but do you have thoughts on bridging that uncanny valley? (through maybe some CSS animation libraries that mimic the native controls?)

We'd like to think Ionic does this well, but also I think people would be surprised how many successful, popular apps actually utilize native shell wrapped web views!

Got some examples? (not trying to be a devil's advocate, but I suspect my view on this is a bit outdated!).

Re: Capacitor: Universal Web Applications

#44

Earlier quoted context omitted.

We built a PWA with vanilla javascript that does a lot of augmented reality work with the camera. The main issue is the lack of iOS support. Apple recently updated iOS to include support for the service worker (literally like this week) but it still lacks a huge number of features that chrome on Android has and basically every desktop browser has. You do get access to a lot of the core sensors on the device but the i…

ios supports PWAs (service workers) now doesn't it?

Yes, just released in 11.3

Re: Capacitor: Universal Web Applications

#45
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.

Android webviews is a total turtle (even with hacks and crosswalk).

Re: Capacitor: Universal Web Applications

#46

Earlier quoted context omitted.

We built a PWA with vanilla javascript that does a lot of augmented reality work with the camera. The main issue is the lack of iOS support. Apple recently updated iOS to include support for the service worker (literally like this week) but it still lacks a huge number of features that chrome on Android has and basically every desktop browser has. You do get access to a lot of the core sensors on the device but the i…

ios supports PWAs (service workers) now doesn't it?

Yeah they added it in the most recent version of iOS (11.3) but progressive web apps have a very loose definition the most basic of which is, as you correctly stated, using a service worker. However service workers are just the ground floor of a much bigger building of features that should be able to be leveraged cross browsers.

Re: Capacitor: Universal Web Applications

#47

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 W…

Can you point me in the direction of any documentation you might have on how a project should be handled with regards to source control? Currently my team doesn't commit the generated platforms/plugins folders but it appears that with Capacitor we might need to start committing some/all of these since it isn't expect to re-generate them from a config.xml like it was with cordova.

You commit it all (except what .gitignore already ignores or your IDE adds), the native projects are are not build but source artifacts here. Benefit: Once the project is created, you can modify and adapt it in any way you want and have those changes versioned like all other code changes.

Re: Capacitor: Universal Web Applications

#48
post #40

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 W…

Why not add changes to Cordova instead of making a replacement?

Capacitor is not Cordova plus a bit of stuff, but a total reimagining how such a tool should work. Cordova for example is defined by dynamic platforms you can add or remove, or that builds are (or can be) done with the CLI. Capacitor has none of that.

Re: Capacitor: Universal Web Applications

#49
post #42

Earlier quoted context omitted.

This is not a replacement for Ionic! Ionic provides a cross-platform UI layer for mobile web apps. Capacitor is a replacement for Cordova which manages the native SDK interaction and native app project management/tooling side of your app. Once we integrate it into the Ionic CLI, you won't really have to think about which part is Ionic UI and which part is Capacitor.

With this in mind do you plan on offering a path for migration from existing Cordova apps?

Once all your plugins are supported in one way or another (Capacitor plugin or compat for Cordova plugin) you should just be able to install Capacitor in your project and see if it all works. Required code modifications in your app should be limited to the interaction with native.

Re: Capacitor: Universal Web Applications

#50
post #47

Earlier quoted context omitted.

Can you point me in the direction of any documentation you might have on how a project should be handled with regards to source control? Currently my team doesn't commit the generated platforms/plugins folders but it appears that with Capacitor we might need to start committing some/all of these since it isn't expect to re-generate them from a config.xml like it was with cordova.

You commit it all (except what .gitignore already ignores or your IDE adds), the native projects are are not build but source artifacts here. Benefit: Once the project is created, you can modify and adapt it in any way you want and have those changes versioned like all other code changes.

That is awesome news! Rebuilding the native projects on a CI server was always a huge PITA with gross hacks to make certain things work.
Post reply on HN