Morphling - Server driven DOM morphing library (like Drab/LiveView!)

Hello today I whipped up the first revision of Morphling, the ideas behind Drab and LiveVIew are simply too good and made me very excited. Basically Morphling aims to be a pluggable version of LiveView, this means it is not tied to Pheonix, so you are responsible to setup the channel yourself as well as persistence of serverside state.

What morphling provides is the frontend JS and DOM diffing/morphing tools in a single library.

Some things I am having trouble with ATM and looking for community help is with diffing the DOMs on the server to send a partial piece. For example if a value in a field changed from a 0 to 1, we should only send a diff that 1 byte changed at position.

Also if your interested in making things better feel free to submit some pull requests.

7 Likes

Just pushed server->client dom differentials and so far so good. Using a custom algo I wrote as myers_difference is way too expensive and slow. 4140ms to diff 2 20kb html files, vs the one I wrote takes 0-1ms for the same file.

5 Likes