Cytoscapejs and Polymer

18 views
Skip to first unread message

Mark Fortner

unread,
Aug 23, 2016, 12:23:03 PM8/23/16
to cytoscape-helpdesk

I'm curious if there are any plans to provide Polymer web component elements for Cytoscapejs?  There seems to be some consensus from other projects towards moving in this direction (at least for visual web components). This would make it easier to integrate Cytoscapejs with other web components.  Ideally, I'd like to be able to do something like this:

 

...

<template>

  <iron-ajax auto url="/mynetwork.js" last-response="{{model}}"></iron-ajax>

  <cytoscape-canvas model="[[model]]" on-load="_highlightNodes"></cytoscape>

 

</template>

<script>

...

 

 

  _highlightNodes: function(){

     var canvas = Polymer.dom(this.root).querySelector("cytoscape-canvas");

     var symbols = ["KRAS", "CDKN2A", "TP53"...]

     canvas.highlight(symbols);

  }

 


</script>

Keiichiro Ono

unread,
Aug 23, 2016, 1:28:47 PM8/23/16
to cytoscape...@googlegroups.com
Hi Mark.

We evaluated some recent web technologies and we (UCSD) decided to use
React.js to build reusable visualization component like you mentioned.
It is still in development, but the goal is allowing people to develop
web apps like this with minimum effort:

http://ci-dev-serv.ucsd.edu:8080/?url=https://dl.dropboxusercontent.com/u/161833/human-cancer.cyjs&style=KEGG
Style&bgcolor=white&stylesource=https://dl.dropboxusercontent.com/u/161833/kegg-style.json

Please read this thread for more information:

https://github.com/cytoscape/cytoscape.js/issues/1468

Thanks,
Kei
> --
> You received this message because you are subscribed to the Google Groups
> "cytoscape-helpdesk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cytoscape-helpd...@googlegroups.com.
> To post to this group, send email to cytoscape...@googlegroups.com.
> Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
> For more options, visit https://groups.google.com/d/optout.



--
===================================

Keiichiro Ono
http://keiono.github.io/

===================================

Mark Fortner

unread,
Aug 23, 2016, 4:28:00 PM8/23/16
to cytoscape-helpdesk
Hi Kei,
Unfortunately, React doesn't give me the same kind of ease-of-integration that I'm looking for, and won't help me with the rest of my Polymer app.

Mark

Eric Sage

unread,
Aug 24, 2016, 6:12:03 PM8/24/16
to cytoscape...@googlegroups.com
Hi Mark,

I work with Kei on the Components, so I'll chime in on the subject as well.

I'm curious about your statement "There seems to be some consensus from other projects towards moving in this direction" From what we gathered during our discovery phase, while Web Components do seem like an attractive native solution, React and Angular hold the majority of the market share while W3C continues to iterate on their component spec.We tried to prioritized community support and ease of integration into other platforms when we choose React. If there's some strong evidence contrary to our theory, we'd love to hear more. 

We've had a lot of success coexisting with Angular, which we already knew would be a target for our components. We have yet to experiment with Polymer, but React actually has an official stance on Web Component and React coexistence:


We've also worked hard to build a small layer of indirection in the form of a framework we call the CyFramework. It allows you to use our components without the need to load or know how to operate React, it has a very simple interface. We would love to send you some instructions on how to use it and see how it interacts with Polymer, and what type of pain points you encounter.


Your feedback is extremely valuable. The client side ecosystem is very fractured, and we're eager to navigate it in such a way as to remain open to as many users as possible.

Thanks!

Eric Sage


Mark
> To post to this group, send email to cytoscape...@googlegroups.com.
> Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
> For more options, visit https://groups.google.com/d/optout.



--
===================================

Keiichiro Ono
http://keiono.github.io/

===================================

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.
To post to this group, send email to cytoscape-helpdesk@googlegroups.com.

Keiichiro Ono

unread,
Aug 24, 2016, 7:35:25 PM8/24/16
to cytoscape...@googlegroups.com
Hi Mark, Eric.

I think what Mark means (by the word "consensus") is this statement:

https://github.com/biojs/biojs3

BioJS people are planning to move towards the WebComponent world, but
it's still a plan. Also, as Eric mentioned in his reply, a React
component is still a javascript code segment, and is usable in
WebComponents. I know it requires some overhead for component
DEVELOPERS, but from component USER point of view, it's not visible.


Kei
>>> > email to cytoscape-helpd...@googlegroups.com.
>>> > To post to this group, send email to cytoscape...@googlegroups.com.
>>> > Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> --
>>> ===================================
>>>
>>> Keiichiro Ono
>>> http://keiono.github.io/
>>>
>>> ===================================
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "cytoscape-helpdesk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cytoscape-helpd...@googlegroups.com.
>> To post to this group, send email to cytoscape...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "cytoscape-helpdesk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cytoscape-helpd...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages