Comments (8)
Built-time or runtime, I'd like to avoid both. This package has generally been quite small, simple, and pure Julia (as far as I can tell anyway), and it would be nice to keep it that way.
Of course, I'll defer to Shashi on the final decision, but I wanted to make my preferences known.
from mux.jl.
Whoops I didn't quite finish my comment.
It wouldn't be a runtime dependency but rather a build-time one. You'd probably need Webpack unless you want to use modules: https://caniuse.com/#search=modules.
So I think using the generic http provider would be good™ because it should be able to avoid all of that and leave the messy JS management to the WebIO repo.
I don't really want to make the PR but I might get to it eventually (I'd be very happy to consult/answer questions though!). It's fairly low-priority for me right now because it works, but when we go to release WebIO 1.0 we'll want to do this because it'll allow us to clean up a lot of API concerning registering things as renderable in Mux.
from mux.jl.
Yeah we definitely shouldn't install NodeJS or typescript compiler to allow people to install Mux. :-)
from mux.jl.
Can you give a brief overview of what functionality needs adding to Mux? Will we need to add new dependencies to make this work? And will it be generic enough that other packages can make use of the new functionality?
from mux.jl.
This is currently what we do to make it work: https://github.com/JuliaGizmos/WebIO.jl/blob/master/src/providers/mux.jl
Here's a PR where I moved the integration into Blink: https://github.com/JuliaGizmos/Blink.jl/pull/201/files
So, roughly,
- Define a connection type that extends
WebIO.AbstractConnection
- Make sure
Mux.Response
works for WebIO nodes.
The last point is kind of tricky because ideally you'd want arbitrary things that are WebIO-renderable to just work without defining additional methods.
Line 47 in 7156067
The issue is that we don't want HTML strings to be processed via WebIO, so maybe that would become something like...
Response(s::AbstractString) = HTTP.Response(s)
Response(x) = HTTP.Response("""
<html>
<head>
<script src=...>
</head>
<body>
$(stringmime(MIME("text/html"), WebIO.render(x)))
</body>
</html>
""")
Ping @shashi
from mux.jl.
We'd also have to move the JS stuff into Mux. Or just make it work via the existing generic-http-provider which will stay in WebIO (this means you won't have to deal with managing JS bundles in this repo which is a pain).
from mux.jl.
I would personally prefer if this package doesn't accrue external dependencies like node.js, but if it's just a small bit of plain JS and glue code to make interop less cumbersome, then I won't object.
Would you be willing to make the PR?
from mux.jl.
It wouldn't be a runtime dependency but rather a build-time one. You'd probably need Webpack unless you want to use modules: https://caniuse.com/#search=modules.
from mux.jl.
Related Issues (20)
- TagBot trigger issue HOT 6
- Add me as a collaborator? HOT 3
- Road to v1 HOT 1
- Error on first request from Firefox HOT 9
- installing Mux v0.7.4 downgrades HTTP v0.9.2 HOT 2
- is Mux.jl an appropriate home for HTTP/Revise glue? HOT 7
- public interface for regression tests? HOT 4
- No :socket key in websocket server object HOT 3
- How to combine method & route ? HOT 1
- `serve` method to integrate websockets broken
- Rest api? HOT 1
- Is there WSS option in Mux v1.0.1? HOT 1
- Precompiling hangs on latest Julia nightly HOT 1
- Feature Request: let splitpath also handle the query intelligently
- Let `response` return a `HTTP.Response` object HOT 6
- Make `http_handler` part of `defaults` and `ws_handler` part of `wdefaults` HOT 1
- WebSockets example in README is slightly broken HOT 2
- Tests broken due to HTTP.jl
- Disable AppVeyor builds
- Tag a version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mux.jl.