Many bioinformatics applications involving biological networks are only made available as a web service. How can Cytoscape be integrated into such a web application for custom visualization and analysis? == Java Webstart == Java webstart allows Java applications to be launched by clicking on a hyperlink on a web page. An example is [[http://cytoscape.org/tutorial.php]]. More information about creating a web start for Cytoscape is on [[Cytoscape_via_Java_Web_Start]] Webstart requires that users have installed Java and Java Webstart from Sun. As of late 2005, Java webstart v1.4 is standard on most client machines. The developer must create a JNLP file (.jnlp) and make it the target of the hyperlink. When the user clicks on the link, the Java application will download and launch. Downloading only occurs on the first click and if the application is changed on the server. Pros: * Easy to package Cytoscape up as a web start * Cytoscape package can be separated from the data to be shown, thus making sure that Cytoscape is only downloaded once by each user, not on every hyperlink click. Cons: * Current standard version of webstart (1.4) opens new instance of application at each hyperlink click, which is not user friendly. === Suggested implementation === 1. Package the core of Cytoscape as a webstart package and post it on a web site 1. Dynamically generate a jnlp file in response to a user request containing parameters that instruct Cytoscape where to find data to display 1. User clicks on the jnlp file, Cytoscape application is launched (quickly if they have clicked on the link before), Cytoscape loads, then loads external data e.g. from a jar:// described in an associated jnlp file (note: jnlp files can include other jnlp files, allowing you to be modular) or http:// URI. Cytoscape supports loading data from many URI types, though some bugs exist (reported in the [[http://cbio.mskcc.org/cytoscape/bugs/main_page.php|bug tracker]]) === Webstart Version Note === In Java 1.4, each click on a jnlp hyperlink launches a new application instance. In Java 1.5, only the first click on a jnlp file for a particular application launches a new application instance. Subsequent clicks on the same jnlp file pass the parameters to the running application (if it still exists) and the application is allowed to implement an event that catches the parameters and reacts accordingly. This seems to be the best option for integrating Cytoscape into a website, however, Java 1.5 is not yet widely used (as of 2005). == Java Applet == It may be possible to rewrite Cytoscape as a Java Applet, but this would likely be a large and complex project, since Applets function in a restrictive security sandbox that is difficult to get out of and also tend to run slower than a full application. Thus, this does not seem to be a viable option for Cytoscape. == Dynamically Drawn Network Images == It is possible to use the Cytoscape library to draw network images (e.g. GIFs) given data from a database and output the image to a website dynamically as the user requests this. Pros: * Tight website integration - image is part of the web page Cons: * Slow. Image must be drawn and layed out, which can take a long time for large networks. * No support in Cytoscape library for image maps, which means user can't click on the nodes or edges to get more information * Misses most of the functionality of Cytoscape, though this extra functionality might not actually be necessary. == Static Network Images == As an extension of the dynamic network image option, it is possible to precompute all possible images a user may request, thus making the image display fast. Same pros and cons for the dynamic case.