[jbosstools-issues] [JBoss JIRA] (JBIDE-15457) CordovaSim and Hybrid tools interaction/source code sharing

Yahor Radtsevich (JIRA) jira-events at lists.jboss.org
Fri Sep 6 09:41:03 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-15457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802259#comment-12802259 ] 

Yahor Radtsevich edited comment on JBIDE-15457 at 9/6/13 9:39 AM:
------------------------------------------------------------------

??How about the option of cordovasim uses the statically generated content done by cordova tools and serve that instead???
Only if this content will be generated continuously, otherwise the refresh action in CordovaSim will not load changes. Also the LiveReload server should be connected to this process to know when this content is updated. It seems too complex for me.

Moreover, if CordovaSim will not be able to generate this content by itself, then it cannot run Cordova projects as a standalone tool (before they are compiled for a mobile platform by Cordova CLI).
                
      was (Author: yradtsevich):
    ??How about the option of cordovasim uses the statically generated content done by cordova tools and serve that instead???
Only if this content will be generated continuously, otherwise the refresh action in CordovaSim will not load changes. Also the LiveReload server should be connected to this process to know when this content is updated. It seems too complex for me.
                  
> CordovaSim and Hybrid tools interaction/source code sharing
> -----------------------------------------------------------
>
>                 Key: JBIDE-15457
>                 URL: https://issues.jboss.org/browse/JBIDE-15457
>             Project: Tools (JBoss Tools)
>          Issue Type: Task
>          Components: aerogear-hybrid, browsersim
>            Reporter: Yahor Radtsevich
>            Assignee: Yahor Radtsevich
>             Fix For: 4.2.x
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list