# Is anyone developing a SPA package like R/Shiny or Python/Dash?

**URL:** https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733
**Category:** Web Stack
**Created:** [September 5, 2017, 5:49pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733 "2017-09-05T17:49:58Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![NickNack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicknack/32/1792_2.png) [@NickNack](https://discourse.julialang.org/u/NickNack)
#### Post date: [September 5, 2017, 5:49pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/1 "2017-09-05T17:49:58Z")

</div>

I’m working on a simple climate model that I would like to put online with some nice and friendly widgets. It would be a perfect fit for a Single Page Application, especially if Julia had a package that made this as simple as [Shiny](https://shiny.rstudio.com/) for R or [Dash](https://plot.ly/products/dash/) for Python. I’m a complete webapp newbie, so doing it [manually](http://www.stochasticlifestyle.com/building-web-app-julia-differentialequations-jl-online/) like @ChrisRackauckas isn’t on the table, at least not yet.

Is anyone already working on something similar for Julia? (Shoutout to @essenciary, developer of Genie.jl: you mentioned on Gitter last month that you might have a look at Shiny. Is this still on the map? Have you considered Dash as well?)

I think a simple webapp package like this would do wonders for evangelizing Julia. Oh incidentally, Shiny is GPL-3 and Dash is MIT licensed, so there are valuables lying around there just waiting to be stolen, hint hint … 🙂

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [September 6, 2017, 4:24am UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/2 "2017-09-06T04:24:56Z")

</div>

There is/was Escher.jl but I’m not sure what the current status is.

---

<div class="post-metadata">

### Author: ![datnamer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datnamer/32/3471_2.png) [@datnamer](https://discourse.julialang.org/u/datnamer)
#### Post date: [September 6, 2017, 9:09pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/3 "2017-09-06T21:09:24Z")

</div>

@shashi would know more.

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [September 9, 2017, 9:42am UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/4 "2017-09-09T09:42:20Z")

</div>

Yes, that’s definitely on the roadmap but I can’t report any significant progress yet. I know Shiny, but Dash looks great and I’ll check it out too, thanks for the tip!

My plan is to use an existing UI toolkit and after some research, I identified 3 main options:  
Syncfusion [Modern HTML5 and JavaScript UI Controls Library | Syncfusion](https://www.syncfusion.com/products/javascript)  
OpenUi5 [http://openui5.org/](http://openui5.org/)  
PredixUI [Predix UI – Learn From Scratch](https://www.predix-ui.com/#/home)

If anybody can recommend other ones, please share.

The first 2 require generating an ungodly amount of JavaScript in order to setup and configure the UI elements - and generating JS from Julia sounds like a bad idea (if you know of any good way to do it, please comment, that would open interesting possibilities).

PredixUI looks like the best choice as the UI elements can be configured with JSON alone, providing a nice way of exchanging information between the Julia and the JS layers.

But all is not well with Predix either:  
a. it uses Polymer 1 which is old and has performance problems. I followed up with the developers and they do plan to migrate it to Polymer 2 but there’s no time frame.  
b. in terms of JS tooling, it uses Bower to manage dependencies, which is deprecated in favor of Yarn plus Webpack. Genie already uses Yarn and Webpack so I’m very reluctant to add Bower into the mix just to support PredixUI until it gets upgraded.  
c. licensing and distribution - I don’t fully understand the PredixUI license (which is a General Electric license). But I expect this can be circumvented by simply not distributing the UI library files with Genie and providing a script to automatically download it and configure it on the dev machine. But still, I need to know for sure before committing to this approach (if anybody has a US legal background, I’d appreciate help in this regard).

So, for now, I’m playing the waiting game and hoping PredixUI will get upgraded - while focusing on the Genie core (full support for Julia v0.6 and v0.7 plus proper documentation and guides). Hopefully, by the time I’m ready with the Genie parts, PredixUI will be in a better state (it is actively developed by GE and that’s a good start).

Feedback appreciated.

---

<div class="post-metadata">

### Author: ![NickNack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicknack/32/1792_2.png) [@NickNack](https://discourse.julialang.org/u/NickNack)
#### Post date: [September 9, 2017, 11:44am UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/5 "2017-09-09T11:44:15Z")

</div>

I’m very glad that this is on the radar for Genie!!

I know very little about web development, but since I want to dip my toes a bit I’ve been reading up lately on UI frameworks, and I haven’t seen any mention at all of any of those three toolkits you are considering. I find that slightly concerning (but again, I’m no expert). It seems that all the buzz these days is about React and its main competitors Angular, Vue.js, Riot and many others. Have you eliminated these from consideration for some reason? If so, why?

Out of these, React seems to be the heavyweight, and this is the UI framework that Dash is built on. But I would probably be tempted to use the up-and-coming Vue.js. It supposedly has an amazing API and documentation, and it requires [less boilerplate](http://www.dotnetcurry.com/vuejs/1372/vuejs-vs-angular-reactjs-compare) and [is faster](http://www.stefankrause.net/wp/?p=431) than the main competitors. Also, while there’s been a [brouhaha](https://wptavern.com/react-users-petition-facebook-to-re-license-react-js-after-apache-software-foundation-bans-bsdpatents-license-in-dependencies) over React’s BSD+Patents license, Vue.js has the Julia-preferred MIT license.

For technical details, the Vue.js team provide a [detailed comparison with other frameworks](https://vuejs.org/v2/guide/comparison.html).

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [September 9, 2017, 2:12pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/6 "2017-09-09T14:12:00Z")

</div>

I’m very familiar with Vue, Angular, React, etc. But they’re not the same thing. The ones I mentioned are UI components libraries - they are one level of abstraction higher up the web stack (above web frameworks).

Like you say, Dash is _built on React_ - Predix and the others are _like Dash_ (built on top of other libraries or frameworks), and _not like React_ (not frameworks). Predix builds on Polymer (which is Google’s) and the others use jQuery (if I remember correctly).

I considered using Vue but my research showed that there is no mature set of UI components based on Vue. There are some early attempts, but none of them have powerful or diverse enough UI elements, especially not for data vis. One option would’ve been to mash up multiple Vue components from various developers - but that would lead to different coding styles and integration strategies. So poor quality.

PredixUI is very polished and is actively developed by a billion $ company (it’s a GE product used by them for their dashboards). And it’s running on Polymer, another actively developed project backed by a billion $ company (Google). It has a huge library of elements with everything that’s needed, from buttons to powerful data visualization (check out the time series UI component for a quick example, using D3: [Predix UI – Learn From Scratch](https://www.predix-ui.com/#/elements/vis/px-vis-timeseries)).

---

<div class="post-metadata">

### Author: ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)
#### Post date: [September 9, 2017, 5:04pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/7 "2017-09-09T17:04:47Z")

</div>

Could all the web devs that use Julia get in a room somehow and hash through this?

This seems like an extremely opinionated project that might otherwise spawn as many packages as there are javascript frameworks

I’m not saying @essenciary, @shashi, @jobjob, and @dfdx actually get a room, but maybe a google-hangout/gitter/slack would suffice?

* * *

> **[Standards](https://xkcd.com/927/)**
>
> Fortunately, the charging one has been solved now that we've all standardized on mini-USB. Or is it micro-USB? Shit.

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [September 9, 2017, 6:43pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/8 "2017-09-09T18:43:04Z")

</div>

> [@essenciary](#):
>
> generating JS from Julia sounds like a bad idea (if you know of any good way to do it, please comment, that would open interesting possibilities).

I can’t say I do (there was a small demo, in some Github issue…); I see WebAssembly generation, rather than JS or asm.js, as the future (likely possible already), for Julia code, but interacting with JS seems still needed? asm.js interacts perfectly as just a JS subset, but I believe WebAssemly ↔ is more complicated. Just look it up (and then GC missing, Julia would probably prefer that - to provide its own).

> [@NickNack](#):
>
> there’s been a brouhaha over React’s BSD+Patents license, Vue.js has the Julia-preferred MIT license.

BSD works well with MIT?! “BSD+Patents license” + MIT also I believe, while yes some disagree (Apache foundation). That stance may be overblown and not affect Julia even with:

This issue was closed (and the situation unchanged; unlike for e.g. Facebook’s Zstandard that just took out the PATENTS file - they actually had no patent on the compression standard it seems):

> <https://github.com/facebook/react/issues/10191#issuecomment-315973479>
>
> Hi there,
> 
> The Apache Software Foundation Legal Affairs Committee \[has announc…ed\]\[1\] that the so-called 'Facebook BSD+Patents License' is no longer allowed to be used as a direct dependency in Apache projects.
> 
> This has lead to a lot of upset and frustration in the Apache community, especially from projects requiring similarly-licensed code as direct dependencies - the chief of these being RocksDB.
> 
> However, we (the Apache Software Foundation) have just received word that \[RocksDB will be re-licensing their code under the dual Apache License v2.0 and GPL 2 licenses\]\[2\]. 
> 
> As a user of React.JS in an ASF top-level project (Apache CouchDB), please consider re-licensing React.JS under similar terms. Otherwise, many ASF projects such as our own will have to stop relying on and building with React.
> 
> A previous bug (#9760) suggested I mention @lacker in this issue when asking licensing questions, so I'm doing so.
> 
> Thank you kindly for your consideration.
> 
> \[1\]: https://issues.apache.org/jira/browse/LEGAL-303?focusedCommentId=16088663&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16088663
> \[2\]: https://issues.apache.org/jira/browse/LEGAL-303?focusedCommentId=16088730&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16088730

---

<div class="post-metadata">

### Author: ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)
#### Post date: [September 9, 2017, 7:58pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/9 "2017-09-09T19:58:55Z")

</div>

I’m quite suspicious of generating front-end components at the back-end. I’ve seen several frameworks for it throughout the years, but every time it projects ended up rewriting everything into something less coupled. Also, snippets like this from Dash:

```python
app.layout = html.Div([
    html.H1('Stock Tickers'),
    dcc.Dropdown(
        id='my-dropdown',
        options=[
            {'label': 'Coke', 'value': 'COKE'},
            {'label': 'Tesla', 'value': 'TSLA'},
            {'label': 'Apple', 'value': 'AAPL'}
        ],
        value='COKE'
    ),
    dcc.Graph(id='my-graph')
])

```

makes me think that I still will have to learn front-end (or at least HTML) **and** also learn how to generate it from back-end.

Maybe a better way would be to create a good tutorial / example of such a dashboard built on top of existing components. A little Genie server exposing data via HTTP and an example page with a few Vue.js components should be an easy to grasp even for a complete newbie in web programming, still not locking a user to a specific framework.

> Could all the web devs that use Julia get in a room somehow and hash through this?

Not sure I will be very helpful, but feel free to create a Gitter/Slack channel and ping me to join.

---

<div class="post-metadata">

### Author: ![NickNack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicknack/32/1792_2.png) [@NickNack](https://discourse.julialang.org/u/NickNack)
#### Post date: [September 9, 2017, 8:38pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/10 "2017-09-09T20:38:44Z")

</div>

> [@dfdx](#):
>
> I’m quite suspicious of generating front-end components at the back-end.

I doubt Dash has the best solution for specifying layout, but I’m quite attracted to the idea of being able to make simple web apps directly from Julia without writing any HTML or CSS (or at least without most of the boilerplate).

> [@](#):
>
> … makes me think that I still will have to learn front-end (or at least HTML) **and** also learn how to generate it from back-end.

I’m sure there were skeptics who said something similar when the first compilers were introduced, but it is sometimes useful to be able to abstract away the underlying technology.

---

<div class="post-metadata">

### Author: ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)
#### Post date: [September 9, 2017, 9:25pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/11 "2017-09-09T21:25:29Z")

</div>

Does all the code have to be in Julia?

Maybe you could have handlebars-like files that get compiled through Julia somehow, i.e.

- `*.html.jle`
- `*.css.jle`
- `*.js.jle`

* * *

Another idea would be to use [glimmer](https://glimmerjs.com/) and rely on the [ecosystem](https://emberobserver.com/categories/component-suites) for the level of abstraction you want?

Then you could somehow allow people to edit components/webpages/html+js+css on either the WebApp side or the Julia side?

**edit:** then you could load in different component styles (bootstrap, material design, etc) like how Plots.jl loads in different plotting libraries

---

<div class="post-metadata">

### Author: ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)
#### Post date: [September 9, 2017, 9:47pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/12 "2017-09-09T21:47:14Z")

</div>

> [@NickNack](#):
>
> I’m sure there were skeptics who said something similar when the first compilers were introduced, but it is sometimes useful to be able to abstract away the underlying technology.

I gave this example specifically to show that you don’t really get an abstraction layer. The `html.Div` is translated into HTMLs `<div>` tag, the `H1` is a `<h1>` tag and `Dropdown` most likely translates to `<select>`, maybe with some styles. So I simply don’t see what you get - it is still the same HTML, just with additional layer of translation and fewer capabilities.

---

<div class="post-metadata">

### Author: ![NickNack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicknack/32/1792_2.png) [@NickNack](https://discourse.julialang.org/u/NickNack)
#### Post date: [September 9, 2017, 10:19pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/13 "2017-09-09T22:19:39Z")

</div>

> [@dfdx](#):
>
> I gave this example specifically to show that you don’t really get an abstraction layer. […]

I understood that and I agree. That’s what I meant when I said Dash might not have the best layout syntax. But even if Dash is using the same HTML structure there’s still less boilerplate.

---

<div class="post-metadata">

### Author: ![jobjob](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jobjob/32/160_2.png) [@jobjob](https://discourse.julialang.org/u/jobjob)
#### Post date: [September 11, 2017, 3:35pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/14 "2017-09-11T15:35:47Z")

</div>

Thanks @djsegal for tagging me, I wouldn’t have seen this otherwise.

Ok here’s a bit of info about the current state of web related packages in [JuliaGizmos](https://github.com/JuliaGizmos/).

### [WebIO](https://github.com/JuliaGizmos/WebIO.jl)

Tools to allow you to build things with html/js/css, with two-way js\<–\>julia communication.

Currently runs in Mux, Blink, IJulia, Atom/Juno, (probably just about anywhere that displays/outputs html/js/css from julia in future), with very minimal changes for each backend (1-2 lines of boilerplate).

It includes a DSL (adapted from [Hiccup.jl](https://github.com/JunoLab/Hiccup.jl)) to write html:

```julia
dom"div.top-level"(
    dom"span#text1"("epic text")
)

```

becomes

```html
<div class="top-level">
    <span id="text1">epic text</span>
</div>

```

and one for javascript (which originated in @mikeinnes’ [Blink.jl](https://github.com/JunoLab/Blink.jl/)). It enables this:

```julia
words1 = "I did it"
@js function doit(taskname)
    @var result = Math.random() > 0.5 ? "ok" : "bad"
    console.log($words1+": "+taskname+", which was "+result)
end

```

becomes

```javascript
function doit(taskname){
    var result=(Math.random()>0.5) ? "ok" : "bad";
    return console.log(("I did it"+": "+taskname+", which was "+result))
}

```

Julia and JS syntax are not that dissimilar, and because the transpilation is built on Mike’s amazing MacroTools.jl, it’s fairly easy to add more features.

WebIO supports two-way communication between julia and js using [Observables.jl](https://github.com/JuliaGizmos/Observables.jl/). See the [WebIO README](https://github.com/JuliaGizmos/WebIO.jl) for more details.

It’s not yet registered, though it probably will be within the next month, Shashi and I are just a little busy atm. Also, and requires nodejs to be installed to get started until then. Nonetheless it should be working pretty well.

Built on top of WebIO is…

### [Vue.jl](https://github.com/JuliaGizmos/Vue.jl)

Basically allows you to do stuff with Vue.js - simple and cool.

Built on top of Vue.jl is the super new…

### [InteractNext](https://github.com/JuliaGizmos/InteractNext.jl)

Which cobbles together some Vue component libraries, and gives you high-level widgets like sliders, toggle buttons, and dropdowns.

```julia
using InteractNext, Mux

power_slider = slider(0:1:9001; label="power level")

julia_updater = on(obs(power_slider)) do power
    pwrstr = power > 9000 ? "it's over 9000!!!!" : "power level is $power"
    println(pwrstr)
end

webio_serve(page("/", req -> power_slider))

```

That will spin up a webserver, show the slider (if you’re patient) and print stuff in the julia REPL.

If you check out the examples in the README, you can see plots (using PlotlyJS) and svgs, using the `@manipulate` shorthand. Some also use [CSSUtil](https://github.com/JuliaGizmos/CSSUtil) - which exports the `vbox` and `hbox` functions which allow you to tile WebIO html nodes vertically and horizontally, for simple layouts.

[![](https://global.discourse-cdn.com/julialang/original/3X/6/7/67aad4bf33b56eed6738bc7d105fe3ba326f33a4.png) ](https://raw.githubusercontent.com/JuliaGizmos/InteractNext.jl/master/docs/pics/svg_ijulia.png)

Everything @essenciary says here is essentially right:

> there is no mature set of UI components based on Vue. There are some early attempts, but none of them have powerful or diverse enough UI elements, especially not for data vis. One option would’ve been to mash up multiple Vue components from various developers - but that would lead to different coding styles and integration strategies.

It’s not perfect but it’s a start towards enabling you to use high-level code to make web UIs in Julia.

Dash like polish/features is definitely a goal. I’m very interested in chatting to people.

Also, the package is very new, but I believe it works in at least the examples in the README and many more so please try it out and file issues furiously!

And naturally, contributions of docs and automated tests would be so very welcome! They are sorely lacking atm (though some of the Interact.jl docs are relevant), which is sad 😢 and I’m sorry.

#### Other thoughts

I think that a lot of what Escher enabled is now available with a combination of WebIO, Vue.jl, InteractNext and CSSUtil. @shashi has said [citation needed] that this is now the direction of focus, since Escher can only be run standalone (not in IJulia, Atom), is tied to Polymer, and is a bit large, which translates to unreliable and hard to maintain. Hopefully the combination of smaller packages should be better.

I’ve only just briefly looked at it, but Genie looks pretty sweet! @essenciary do you have thoughts about whether/where the WebIO/Vue/InteractNext stuff could fit in there?

Finally, has anyone tried out [Puppeteer](https://github.com/GoogleChrome/puppeteer)? I would really love to have some tests for WebIO, Vue, and InteractNext using it, or some alternative. Help! : )

---

<div class="post-metadata">

### Author: ![NickNack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicknack/32/1792_2.png) [@NickNack](https://discourse.julialang.org/u/NickNack)
#### Post date: [September 11, 2017, 4:35pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/15 "2017-09-11T16:35:49Z")

</div>

> [@jobjob](#):
>
> Ok here’s a bit of info about the current state of web related packages in JuliaGizmos. [… snip snip]

All that sounds and looks absolutely amazing! I’m learning the basics as fast as I can, so I hope I can start making small contributions soon.

I don’t want to derail the nice discussion you devs are having here, but I have a quick question to @jobjob. The last example of the [InteractNext.jl README](https://github.com/JuliaGizmos/InteractNext.jl) says this:

> [@](#):
>
> PlotlyJS doesn’t support Julia-\>JavaScript communication in Mux as yet. Once PlotlyJS.jl is better integrated with WebIO.jl, the following should work: [snip]

I tried it and it was indeed broken. But there was a slightly simpler example of a sine curve updating based on the value of a slider on that page yesterday that seemed to work perfectly fine (I tried that one too). Why does one work and not the other?

---

<div class="post-metadata">

### Author: ![randyzwitch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/randyzwitch/32/15955_2.png) [@randyzwitch](https://discourse.julialang.org/u/randyzwitch)
#### Post date: [September 11, 2017, 8:44pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/16 "2017-09-11T20:44:40Z")

</div>

I’ve been thinking about building something like shinydashboard, as I’ve needed some basically functionality and ECharts.jl and Vega.jl are already JS/HTML rendering only. I’ve just been using Flask instead while I figure out how much time to invest in a Julia prototype.

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [September 11, 2017, 9:11pm UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/17 "2017-09-11T21:11:18Z")

</div>

Thanks for the feedback and the great ideas!

1/ I agree with what was said about writing pseudo HTML in Julia - I strongly dislike it (re @dfdx). It’s a nightmare in terms of editor support and it forces expensive back-end developers to write trivial view code that should be the job of junior web devs. It’s also not nice when what should be HTML and generate at most a warning in the browser, can generate fatal Julia errors crashing the whole app.

2/ Exactly, the code does not have to be all in Julia. On the contrary, talking about Genie at least, it is a MVC framework and I’d like the view code to stay in the view (@djsegal)

3/ Despite all the hype surrounding WebAssembly, my research made me believe it’s not ready for general production use yet. Every few months I check developments and there was not a single professional/expensive/high profile product built with it yet. (@Palli)

These reasons and a few more make me believe Predix is the best choice so far (at least as a UI toolkit for Genie). Take for example the code for rendering a Data Table component with Predix.

```nohighlight
<px-data-table
table-data='[{"first":"Valentine","last":"Meyer","email":"valentinemeyer@scentric.com"},{"first":"Silva","last":"Alexander","email":"silvaalexander@gmail.com"},{"first":"Hopkins","last":"Wong","email":"hopkinswong@hotmail.com"},{"first":"Joe","last":"Sherman","email":"joejoe@yahoo.com"},{"first":"Jane","last":"Bartlett","email":"jane@scentric.com"}]'
language="en">
<px-data-table-column
name='first'>
</px-data-table-column>
</px-data-table>

```

You can check it here, it’s pretty: [Predix UI – Learn From Scratch](https://www.predix-ui.com/#/elements/data-table/px-data-table)

It is “plain” HTML. Which means it fits nicely in the view layer. This in turn means proper editing tools (for HTML plus Polymer), separation of concerns, an efficient workflow for larger teams (designers edit the views, developers the models and the controllers). And it also means no parsing and evaling Julia, instead being able to use Genie’s compiled views or just pure HTML. (Of course, there is the issue of client side rendering with Polymer, but no JS framework is above client side rendering).

Equally important, the only dynamic part would have to be the JSON data within `table-data` so on the Julia side of things all we’d have to do is setup the corresponding `Dict()` and have the framework take care of sending it down the pipe.

My vision is also that at some point we’ll also have a visual builder so that writing `Dict`s and view files by hand won’t be necessary for simple apps. Just drag-drop the component, use a UI to configure it, bind it to a data source and it’s done! Think Microsoft’s Visual Studio.

This architecture is probably not the right fit for all the stacks that were mentioned in this thread, but it does fit beautifully in the Genie narrative.

---

<div class="post-metadata">

### Author: ![jobjob](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jobjob/32/160_2.png) [@jobjob](https://discourse.julialang.org/u/jobjob)
#### Post date: [September 12, 2017, 5:06am UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/18 "2017-09-12T05:06:19Z")

</div>

> Why does one work and not the other?

One’s using PlotlyJS and the other one is just creating svg elements directly. Feel free to find me on the Julia slack if you want to discuss this further.

Edits (sorry was rushing):

> All that sounds and looks absolutely amazing! I’m learning the basics as fast as I can, so I hope I can start making small contributions soon.

Great! Really glad you managed to get the examples working. Please do get in touch if there are problems.

---

<div class="post-metadata">

### Author: ![jobjob](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jobjob/32/160_2.png) [@jobjob](https://discourse.julialang.org/u/jobjob)
#### Post date: [September 12, 2017, 5:31am UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/19 "2017-09-12T05:31:24Z")

</div>

Quickly:

I guess there’s a continuum between a quick UI to explore a concept or some data and a full featured web app like Facebook. InteractNext in say IJulia, Atom, or Blink, targets the former - particularly for those with limited web knowledge - it’s quick to get a something working and see some results. For a full featured web app, you probably need more.

Having said that, obviously it would be great to have something quick to prototype but can be scaled up, and it seems like Dash, for instance, is a decent effort in this direction - though I must admit I haven’t actually used it. It’s also been in development for over 2 years.

Re Predix table-data There’s probably a way to do the data transfer julia\<–\>js relatively easily with WebIO/Observables/JSON.jl

Also note in WebIO, you can use html strings as templates like so:

```julia
using WebIO
htmlstr = """<button id="btn1">clickarama</button>""" # or load from file
dom"div"(setInnerHtml=htmlstr)

```

maybe the syntax could be improved, and we could avoid the need for the wrapping div.

Also I wonder if  
a) we can just couple to the js side of Dash  
b) it might be worth seeing how easy it is to interface with Dash using PyCall.jl. Of course a pure Julia/Js solution would be nicer, but you might be able to get a bit of mileage out of that.

Anyway, lots of stuff to think about.

---

<div class="post-metadata">

### Author: ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)
#### Post date: [September 12, 2017, 10:35am UTC](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733/20 "2017-09-12T10:35:22Z")

</div>

> I think that a lot of what Escher enabled is now available with a combination of WebIO, Vue.jl, InteractNext and CSSUtil. @shashi has said [citation needed] that this is now the direction of focus, since Escher can only be run standalone (not in IJulia, Atom), is tied to Polymer, and is a bit large, which translates to unreliable and hard to maintain. Hopefully the combination of smaller packages should be better.

Interact.jl is actually very useful for quick data exploration but I always found that it was annoying not to be able to give basic layout instructions (for example, arrange checkboxes in a rectangle rather than one on top of the other, really basic things). At some point Escher.jl was a very good solution to get some layout in combination with Interact widgets. If it is again possible to do that (also supporting plots in PlotlyJS) it’s really good news (congrats on your work!) and I think it deserves a good tutorial.

[Next page](https://discourse.julialang.org/t/is-anyone-developing-a-spa-package-like-r-shiny-or-python-dash/5733.md?page=2)
