4 ms·
First time hearing about Capacitor. Curious if anyone could share some more concrete differences between Capacitor and Cordova?
by ss3000 7y ago
First time hearing about Capacitor. Curious if anyone could share some more concrete differences between Capacitor and Cordova?
- stockkid 7y agoOne of the main differences is that Capacitor projects treat build artifacts as source code, and hence the artifacts are to be version controlled. I thought such aspect was kind of nice for cases in which you need some customization. Here is an example. In Cordova, when using plugins, a developer would have to use various hooks to produce an artifact with a specific customization. But in Capacitor, they can just make changes in the source code itself. As a result, the build is more predictable. On the other hand, such feature might make it more painful to upgrade stuff if the artifact gets littered with tons of customization. While such problem might be rare due to the infancy of Capacitor, maybe in the future it might come back to bite many projects.
- yesimahuman 7y agoThat's a good assessment and we're keeping an eye on that future issue. However, we also see the native project and API structure of Capacitor to be very stable and don't anticipate significant changes that will require native project tweaks.
- brylie 7y agoI might be misunderstanding how Capacitor code generation works, but would re-running the build process overwrite code customizations on the previous build? If so, how would this be avoided?
- stockkid 7y agoI see how my comment was confusing. In capacitor, when you initialize a project for a platform (IOS, Android, etc), a bunch of native source code is generated and they are not overwritten.