Overall Architecture
I have already presented PhoneGap, my goal here is to present its plugin system. Indeed, to enlarge web application possibilities, it may be useful to use native calls through Javascript. For example, to use a piece of complex Android code (Java code) easily in Javascript. This is possible using the PhoneGap plugin system.
The overall architecture of these plugins is the following:
- a native component making the job, for example a Java Android file
- a HTML / CSS / Javascript GUI using this native component through Javascript calls
- a bridge between Javascript and the native code to create the link.
This bridge is composed of:
- one native file (i.e. one Java file),
- one Javascript file exposing this native component,
- and generally one quick configuration file specific to the platform.