Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-15457

CordovaSim and Hybrid tools interaction/source code sharing

    XMLWordPrintable

Details

    Description

      Currently CordovaSim application consists of two parts: a Jetty-based server, and a BrowserSim-based client. The server part generates some content on the fly. For instance, the server may response with generated cordova_plugins.js content when it is requested by the client. Both parts of CordovaSim are executed in their own JVM, which means they do not have access to the Eclipse API.

      Hybrid tools do very similar things, but in static way. For instance, while creating Android executables, they create cordova_plugins.js file on disk. Hybrid tools is a set of Eclipse plugins, so they have access to the Eclipse API.

      Obviously CordovaSim and Hybrid tools have some code in their sources that could be shared. For the example above, both of them need a method to generate content of cordova_plugins.js. There are several approaches to implement it:
      1. Create two different implementations for CordovaSim and Hybrid tools and synchronize them when needed (currently we do this). This approach creates code duplication problems.
      2. Create an Eclipse API-independent plugin, so both CordovaSim and Hybrid tools could set it as a dependency. This approach imposes some restriction on the independent plugin (useful Eclipse API and libs cannot be used).
      3. Move the server part of CordovaSim to the Eclipse JVM, so it could use Eclipse API and any Hybrid tools API. With this approach we loose the ability to create standalone CordovaSim in the future.

      Attachments

        Issue Links

          Activity

            People

              kmarmaliykov Konstantin Marmalyukov (Inactive)
              yradtsevich Yahor Radtsevich (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: