# Make a webapp framework/ecosystem as awesome as R's Shiny: a challenge to Julia's community

**URL:** https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533
**Category:** Web Stack
**Tags:** visualization, webapps
**Created:** [March 6, 2018, 11:45am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533 "2018-03-06T11:45:07Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![shashi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shashi/32/1824_2.png) [@shashi](https://discourse.julialang.org/u/shashi)
#### Post date: [March 10, 2018, 4:24pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/21 "2018-03-10T16:24:36Z")

</div>

> Nice. Is there a way to publish it as well?

if instead of `using Interact` you did `using InteractNext, Mux` [1]

You can serve it as a web server:

```julia
ui = @manipulate for language in ["Julia", "R", ...]
    plot(...)
end
webio_serve(page("/", req -> ui))

```

[1] `Pkg.clone("https://github.com/JuliaGizmos/InteractNext.jl.git"); Pkg.checkout("WebIO")` – I’ve just tagged the WebIO fix needed for this.

---

<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: [March 28, 2018, 4:30am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/22 "2018-03-28T04:30:36Z")

</div>

Has anyone tried getting appmode in Jupyter working with Julia?

[https://github.com/oschuett/appmode](https://github.com/oschuett/appmode)

This would be a nice step towards building shiny apps.

* * *

An example binder is below:

[https://github.com/binder-examples/appmode](https://github.com/binder-examples/appmode)

---

<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: [April 1, 2018, 9:30pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/23 "2018-04-01T21:30:44Z")

</div>

Just following up. A precursor to a dashboard app can be seen at:

> [juliatetris.com](http://juliatetris.com)

This combines WebIO and Binder (using the `appmode` described above). The binder repo is available at:

> **[GitHub - djsegal/tetris-binder: a tetris binder using webio package 📒](https://github.com/djsegal/tetris-binder)**
>
> a tetris binder using webio package 📒. Contribute to djsegal/tetris-binder development by creating an account on GitHub.

* * *

Putting it together,

> [@xiaodai](#):
>
> I think it will be awesome for Julia to have such a framework and an ecosystem where at the click of a button one can publish a Julia app.

@xiaodai, what do you think is still needed to get you there?

---

<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: [April 3, 2018, 6:42am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/24 "2018-04-03T06:42:00Z")

</div>

Ok, so no more bullshit! I actually made a Julia dash app relatively quickly. See:

> [Julia Dash Binder – Tetris Challenge](https://mybinder.org/v2/gh/djsegal/julia-dash/master?urlpath=apps%2FJulia%20Dash%20Binder.ipynb)

You should now truly be in a good spot for forking this [project](https://github.com/djsegal/julia-dash) and making your own.

* * *

As an aside, I think Julia would greatly benefit from package developers adopting a binder standard.

Exploring a package’s functionality without downloading it is usually one of the few perks reserved for javascript.

---

<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: [April 3, 2018, 8:16am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/25 "2018-04-03T08:16:07Z")

</div>

That’s very interesting! Did you also try something like Mux or HTTP.jl to serve a WebIO app?

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [April 3, 2018, 10:25am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/26 "2018-04-03T10:25:03Z")

</div>

See some examples of that here  
[https://github.com/lancebeet/julia-scripts](https://github.com/lancebeet/julia-scripts)

---

<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: [April 3, 2018, 6:39pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/27 "2018-04-03T18:39:42Z")

</div>

My main argument against a Mux setup is it takes time (to code).

This [binder](https://mybinder.org/v2/gh/djsegal/julia-dash/master?urlpath=apps%2FJulia%20Dash%20Binder.ipynb) took up very little time past setting up the Jupyter notebook. // i.e. the devops

* * *

Also, the idea was never could “I” build a WebIO app using Mux or HTTP.jl.

It’s can I build a dash app in a way accessible to Julia users without 5 years of web development experience.

See:

> [@xiaodai](#):
>
> There is no easy way to make a webapp.

* * *

**edit:** One final remark is that I don’t think Julia is anywhere near close to being suitable for a backend server.

Although Genie.jl exists, there is just not the ecosystem in place to make an API that measures up to one from Rails or Django.

This is why all the links in this thread are for Dash apps. As proof, the [API](http://api.juliatetris.com/) the Tetris Challenge uses for keeping scores is actually a Rails server I built in a day.

---

<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: [April 3, 2018, 7:03pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/28 "2018-04-03T19:03:42Z")

</div>

We’ll get there.

---

<div class="post-metadata">

### Author: ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)
#### Post date: [April 3, 2018, 7:09pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/29 "2018-04-03T19:09:55Z")

</div>

> [@ScottPJones](#):
>
> Well, maybe at the moment, but I think that may be mostly because it’s the only game in town currently (nothing else just runs on any browser), but from what I understand, WebAssembly support will be in all of the major browsers, so if Julia can be made to run well in that environment, it could really open a lot of doors for Julia on the web.

My understanding is that once people start re-jiggering LLVM, JVM etc to output to WebAssembly and it is universally supported in browsers, the JavaScript domination might come to an end shockingly quickly, no? (This is a question not an assertion, I have no idea what I’m talking about.)

---

<div class="post-metadata">

### Author: ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)
#### Post date: [April 3, 2018, 7:16pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/31 "2018-04-03T19:16:11Z")

</div>

Well, I guess that was my question though, will it really take that long? I don’t see why it would take that long, all you need is to write the code that does LLVM IR to WebAssembly and things start changing really, really fast right? I suppose there is the barrier of all the front end developers not necessarily wanting to jump up and change to a different language, but the front-end developers I know don’t particularly like JavaScript.

---

<div class="post-metadata">

### Author: ![josefsachs](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@josefsachs](https://discourse.julialang.org/u/josefsachs)
#### Post date: [April 3, 2018, 7:46pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/32 "2018-04-03T19:46:42Z")

</div>

[The Birth & Death of JavaScript](https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript)

---

<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: [April 4, 2018, 12:04pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/33 "2018-04-04T12:04:01Z")

</div>

> [@djsegal](#):
>
> My main argument against a Mux setup is it takes time (to code).

I see. I don’t have a lot of experience on this, but I’d love to hear specifically what are the extra steps that are required (after the application is already done with WebIO) to set it up with Mux, how the Binder approach solves them and whether there is some tradeoff or the binder approach is just fine.

---

<div class="post-metadata">

### Author: ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)
#### Post date: [April 4, 2018, 1:26pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/34 "2018-04-04T13:26:13Z")

</div>

Although I personally would love to see the death of JavaScript 🤓, and have Julia → WebAssembly take over as the preeminent language of the web, unfortunately, no matter what much better options are available, I don’t see JS going away anytime soon - just because of the shear momentum, all the resources available (books, on-line courses, tools, coding camps, money spent to make JS run fast), and all the programmers already skilled in getting JS to do what they want, no matter whether or not they are truly happy with it.

After all (as I commented on [here](https://discourse.julialang.org/t/rhetorical-technique-side-discussion/9299/10)), COBOL and FORTRAN are still around and in heavy use 😱😂 after nearly 60 years!

I am cautiously optimistic that WA will help level the playing field, and in addition, just as LLVM has helped spark a lot of creativity in new programming languages (such as Julia itself), WA will spark just as much creativity in new languages designed for client side web programming.

---

<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: [April 5, 2018, 8:30am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/35 "2018-04-05T08:30:54Z")

</div>

I want to report back with some great news.

I’ve been eying Predix UI for quite some time, wanting to use their components on top of Genie. If you’re not familiar with Predix UI, it’s developed by GE and they have a huge amount of high-quality UI elements implemented as Polymer components. Lots of them are focused on data science and data visualization as they’re used by GE to build software for monitoring their industrial equipment. They fit perfectly into Genie’s view architecture as they can be represented purely as a combination of HTML elements and data - so no ugly generation of JS from Julia! 🤢 Ex: [Predix UI – Learn From Scratch](https://www.predix-ui.com/#/elements/vis/px-vis-radar)

What’s been holding me back from pursuing this was the weird GE licensing of the code. The awesome part is that a couple of weeks ago GE started to migrate the Predix UI components over to BSD-3 and Apache licenses. (Amazing luck or maybe my constant nagging on all available channels, from Quora to Github, got them to review their licensing 😊)

I’ve now begun experimenting with building Genie + Predix UI apps. There are some hurdles, mostly related to assets management: Polymer and Predix use Bower, which is deprecated, while Genie uses the modern Webpack + Yarn combo. Plus there’s gonna be some work to setup reactivity. But most of it Just Works by default and if I’ll have enough time I might have a demo in a couple of months. Fingers crossed!

---

<div class="post-metadata">

### Author: ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)
#### Post date: [April 5, 2018, 9:23am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/36 "2018-04-05T09:23:31Z")

</div>

Way to go @essenciary, exciting!

---

<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: [April 6, 2018, 11:21am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/37 "2018-04-06T11:21:20Z")

</div>

> [@piever](#):
>
> how the Binder approach solves them and whether there is some tradeoff or the binder approach is just fine.

I think it basically boils down to:

- do you want a notebook?
- or do you want a website?

* * *

As a dashboard app is a single page thing, I’m guessing the easiest way to do this is through a jupyter notebook.

Binder solves the threading issue this causes by using docker boxes to house your jupyter notebooks.

Once [InteractNext](https://github.com/JuliaGizmos/InteractNext.jl) upgrades to the new version of WebIO that’s compatible with Binder, it should remove the javascript issues (for simple stuff like sliders)

// also, I think a Jupyter app looks a lot more iconic (at this point in time) than a home-rolled bootstrap app

---

<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: [April 6, 2018, 11:28am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/38 "2018-04-06T11:28:51Z")

</div>

> [@djsegal](#):
>
> Once InteractNext upgrades to the new version of WebIO that’s compatible with Binder, it should remove the javascript issues (for simple stuff like sliders)

I’m picturing something very simple: a plot, a few sliders, some check boxes, some dropdown menus and I wanted to understand how much extra effort it takes from: “it works locally on WebIO” to “it is a web app everybody can use online”. Your approach seems to simplify this step drastically.

What were the drawbacks of the binder approach? For example, is the slowish page loading time due to using Binder or is it inevitable with Julia based web apps?

---

<div class="post-metadata">

### Author: ![Steven\_Sagaert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_sagaert/32/29578_2.png) [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)
#### Post date: [April 6, 2018, 1:01pm UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/39 "2018-04-06T13:01:45Z")

</div>

Slow page loading isn’t a julia thing in general. I’ve written a recommendation system on top of HttpServer.jl and a small embedded webdemo application to explore the results in a web gui (the recommendation itself is meant to be used via a simple REST interface) and it’s lightning fast. But I just used HttpServer to process get requests and all the webpages are handwritten html (and a little javascript) directly on top of that.  
Also I did load testing on the rest interface (again directly on top of HttpServer.jl) and I was pleasantly surprised how well it scaled on a simple PC with 4 cores it could easily handle hundreds of requests per second.

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [August 20, 2019, 8:21am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/40 "2019-08-20T08:21:54Z")

</div>

In 2019, Julia 1.x world, I found the combination of [Intract](https://github.com/JuliaGizmos/Interact.jl)+[Mux](https://github.com/JuliaWeb/Mux.jl) relatively simply for deploying an interacting model to the web _à-la_ Shiny, although the documentation of the two cited packages could still be improved…

```julia
using Interact,Plots,Mux

function myModel(p1,p2)
    xrange = collect(-50:+50)
    model = p1.*xrange .+ p2.* (xrange) .^2
    return model
end

function createLayout()
  p1s = slider(-50:50, label = "Par#1 (linear term):", value = 1)
  p2s = slider(-5:0.1:5, label = "Par#2 (quad term):", value = 1)

  mOutput = Interact.@map myModel(&p1s,&p2s)
  plt = Interact.@map plot(collect(-50:50),&mOutput, label="Model output")
  wdg = Widget(["p1" => p1s, "p2" => p2s], output = mOutput)
  @layout! wdg hbox(plt, vbox(:p1, :p2))
end

function serveLayout(port)
    try
      WebIO.webio_serve(page("/", req -> createLayout()), port)
    catch e
      if isa(e, IOError)
        # sleep and then try again
        sleep(0.1)
        serveLayout(port)
      else
        throw(e)
      end
    end
end

serveLayout(8001)

```

Resulting in:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/a/8a93115462aad26d9b8c9e9b0ecdb7edfe08c215.png)

_Disclaimer: the code in this example is from an upcoming Apress book on Julia I am finalising… I am a bit confusing on copyrights, but I think I can still post it…_

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [August 20, 2019, 8:52am UTC](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533/41 "2019-08-20T08:52:21Z")

</div>

This is really lovely! We can definitely make something here!

[Previous page](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533.md?page=1)

[Next page](https://discourse.julialang.org/t/make-a-webapp-framework-ecosystem-as-awesome-as-rs-shiny-a-challenge-to-julias-community/9533.md?page=3)
