dgmcguire / texas Goto Github PK
View Code? Open in Web Editor NEWYou don't really need all that javascript to make dynamic web apps. Keep your code in elixir and on the backend where it belongs!
You don't really need all that javascript to make dynamic web apps. Keep your code in elixir and on the backend where it belongs!
test
Currently a new view that is broadcasted out to other clients may unintentionally remove some client side state that we didn't intend. In the case of a chatroom, for example, a different user may be typing and have a view broadcasted out to them, which would overwrite their chat input.
I think this could be best handled with either better understanding and using virtual-doms api or by looking to contribute to virtual-dom as ultimately we would want to pass some sort of options to creating a changeset such that we could tell the changeset to not create any patches that would target "dirty" elements.
So I've been speaking with @zharinov on slack and he suggested that [react-lite] might be a suitable replacement for what texas currently uses which is [virtual-dom].
He also brought up the fact that we don't even necessarily need vDom to make this work and I agree so I thought I'd start a discussion here and see if anyone wanted to contribute.
thoughts? comments? concerns?
Dan, I'm digging the idea here, it reminds me of action cable, but the use of Virual Dom is pretty clever.
I'm wondering though, why generate so much javascript. It seems like the majority of the generated JS is just the same thing with some variables dropped in. It seems like it could easily be a one set of javascript that is included everywhere, which takes the same things that are being generated now as variables. In which case the JS that is generated for each 'form' would be minimal, perhaps it could even be just a list of forms/sockets dropped in the header as some JSON?
I'm probably way under-thinking this.
Thoughts?
So right now a Texas.BoilerplateWriter.meta/2
needs the "scope" which is the root element that will be targeted for updates and a list of targets that are forms. We shouldn't need to specify a form for texas to write some websocket bindings for us to push updates to the "scope"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.