Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Embedding #9

Open
drom opened this issue Nov 3, 2018 · 9 comments
Open

Embedding #9

drom opened this issue Nov 3, 2018 · 9 comments
Milestone

Comments

@drom
Copy link
Member

drom commented Nov 3, 2018

Embeddable so it can be integrated as a component into bigger UI application

DOM Type ?

  • Direct DOM
  • Virtual DOM (React)
  • Web Components
  • Shadow DOM
  • Server side

IDE

@drom
Copy link
Member Author

drom commented Nov 3, 2018

  1. I would like to use Zoom (like WaveDrom) in Sphinx for generating documentations on ReadTheDocs or any other GitHub-Pages / GitLab-Pages HTTP(s) deploy server.

Originally posted by @Paebbels in #1 (comment)

@drom
Copy link
Member Author

drom commented Nov 3, 2018

If i can add some of my though: My user-case for using Zoom would be in a CI settings. I wold like to run unit-test on gitlab runners and if they fail, a way to show the result via web-browser.

Originally posted by @wifasoi in #1 (comment)

@DrSensor
Copy link

DrSensor commented Nov 3, 2018

I actually would like to use Zoom in:

  • Docz and Vuepress for making interactive Datasheet
  • creating a custom Jupyter Widget for exploring and simulating some hardware module
  • use it in some of my projects which is built using a specific framework (Vue/React/Ionic 2).

I don't know if this is possible but probably someone needs to render it on the server side (SSR). This may be a really difficult task but can be a good feature for performance critical app.

If I'm allowed to give some tips...make it framework agnostic and avoid using framework/lib that needs runtime libraries (e.g Vue, React, Angular, Inferno, Preact, etc).

@drom
Copy link
Member Author

drom commented Nov 3, 2018

It is easier embedding React (Virtual DOM) component into real DOM then the other way around.
If we develop a library that directly touches DOM we will have problems with any Virtual DOM libraries.
Problems similar to D3 being a great library but struggles with React.

@drom
Copy link
Member Author

drom commented Nov 3, 2018

Having Virtual DOM component simplifies SSR task. React, Preact, ... most of them have server rendering capability.

@drom
Copy link
Member Author

drom commented Nov 3, 2018

I am inclining to write React-style stateless functional components.
This style: https://github.com/drom/BG7TBL-RF-USB/blob/master/src/re-plot.js
It requires only $ = createElement function being passed from your Virtual DOM library.

I wrote mostly for React and I am new to Vue.
@DrSensor how Vue feels about React components? What is your favorite Virtual DOM lib?

@drom drom added this to the mvp milestone Nov 3, 2018
@DrSensor
Copy link

DrSensor commented Nov 6, 2018

Hi @drom, as for me, I have 3 favorites:

  • Vue for creating a webapp/PWA/website. I feel in love with the tooling, the ecosystem, and how to compose the component with it's scoped style in 1 file.
  • Svelte for creating a library. This is related to my plan for creating a custom Jupyter Widget
  • Stencil for creating web components.

Ah yes, all of them have SSR capabilities 😉

About React component in Vue. Actually, it's always a bad idea for integrating component specific framework into another framework. Most people don't want to have to install another framework just to use it. It's a waste of resource.

In majority, no one want to do this in their Vue/Angular project 🙂
npm install react

or their public/index.html become like this

<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js" />
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js" />
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js" />

Another thing that I need to mention (it's specials case) is when used in a system that uses <iframe> (e.g VSCode extensions). For example, if someone wants to build VSCode extension for zoom but this library needs React (or other frameworks), then there will be lagging issues because there are multiple React/Vue/Angular instance running on many different <iframe>.

@DrSensor
Copy link

DrSensor commented Nov 7, 2018

Btw, I found something interesting 😉
https://github.com/UpperCod/Atomico

@drom
Copy link
Member Author

drom commented Nov 7, 2018

@DrSensor I am not a big fan of JSX nor Web Components. I would stick with plain vanilla ES2015 for this project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants