morphdom VS diffhtml

Compare morphdom vs diffhtml and see what are their differences.

morphdom

Fast and lightweight DOM diffing/patching (no virtual DOM needed) (by patrick-steele-idem)

diffhtml

diffHTML is a web framework that helps you build applications and other interactive content (by tbranyen)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
morphdom diffhtml
13 4
3,091 864
- -
4.2 6.4
11 days ago about 1 month ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

morphdom

Posts with mentions or reviews of morphdom. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-21.
  • HTML Streaming and DOM Diffing Algorithm
    8 projects | dev.to | 21 Feb 2024
    morphdom
  • The Ultimate Search for Rails - Episode 1
    8 projects | dev.to | 16 Jan 2023
    And sure enough, it works! So what's going on here? Well, clicking the link invokes our reflex, which gets executed right before our current controller action runs again. It allows us to execute any kind of server-side logic, as well as play with the DOM in various ways, but with ruby code. Then, the DOM gets morphed over the wire.
  • Build a JS Framework with 80 lines of Javascript
    2 projects | dev.to | 21 Dec 2022
    It's super simple actually. And that is in large part to (Morphdom)[https://github.com/patrick-steele-idem/morphdom] which I'm using to compare the output of render() to what is already on the DOM. Morphdom will patch the differences.
  • Using hotwired/turbo but patch the DOM vs Replacing
    3 projects | dev.to | 23 Nov 2022
    I'm using morphdom to patch our DOM. Its a very simple library that compares two DOM elements and updates only the differences. It is extremely performant and does not even use a Virtual DOM, just the DOM you already have!
  • Turbo 7.2: A guide to Custom Turbo Stream Actions
    4 projects | dev.to | 9 Oct 2022
    using HTML-diffing libraries like morphdom to efficiently update elements on the page
  • how do i morph an entire html document dom?
    1 project | /r/learnjavascript | 15 Feb 2022
    no it actually looks like morphdom is what i'm looking for.
  • ssceng demo: Hacker News Client
    2 projects | /r/golang | 6 Oct 2021
    It tries to morph into existing DOM (with https://github.com/patrick-steele-idem/morphdom). In case of fail, there is fallback to HTML replacement with outerHTML. All DOM operations after action occurs on component level, not the whole page.
  • Building a Live Search Experience with StimulusReflex and Ruby on Rails
    3 projects | dev.to | 28 Aug 2021
    Today, we’re going to build a live search experience once more. This time with StimulusReflex, a “new way to craft modern, reactive web interface with Ruby on Rails”. StimulusReflex relies on WebSockets to pass events from the browser to Rails, and back again, and uses morphdom to make efficient updates on the client-side.
  • Displaying Real-Time Data in Your Web Application Without Hassle: IHP Auto Refresh ✨
    1 project | dev.to | 14 Jul 2021
    Whenever the JavaScript on the browser-side receives new HTML, it will update the current page using a DOM-diff approach (using morphdom). So only DOM nodes that have actually changed between the initial page load and the updated HTML will be updated.
  • Why Virtual DOM is considered faster that directly updating the real DOM.
    3 projects | /r/reactjs | 10 Apr 2021
    Updating the DOM is not slow. In fact, there are libraries and frameworks that emphatically reject the virtual dom approach. morphdom is one such example of a DOM modification library. Svelte's author Rich Harris has been proclaiming for a while that virtual dom is an overhead (see e.g. this article). Google's lit-html and lit-element do much of what react does without the virtual dom.

diffhtml

Posts with mentions or reviews of diffhtml. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-21.
  • HTML Streaming and DOM Diffing Algorithm
    8 projects | dev.to | 21 Feb 2024
    diffhtml
  • Show HN: LiveViewJS – TypeScript back end for LiveView Apps
    9 projects | news.ycombinator.com | 11 Feb 2022
    Hi floodfx, we should chat at some point if you're on slack/discord/etc. I'm building something extremely similar and there's potential opportunity to share some code/learnings. Personally I feel this design paradigm is the real web 3.0.

    My project is https://diffhtml.org/ and I have started experimenting with middleware to bridge to server and client workers: https://github.com/tbranyen/diffhtml/pull/251. For the server worker, it uses a WebSocket to ferry the VDOM diff patches, custom events, and property access/function calls. A big goal is to allow synchronous "main thread" access from workers, including on the server-side. This would allow you to write your UI code as if you were a client side app. It does this the same way as partytown using a SharedArrayBuffer and Atomics. You can see demo source code here: https://gist.github.com/tbranyen/2f5be81cfb7b3aa1bb443c8ef13....

    I've also toyed around with hot reloading components without the need for a pre-processor like Babel, and the results are hugely promising. Stateful live UI updates from saving a component file to seeing in the browser without all the fuss with complex build steps is liberating.

    I'm probably a few months out from having a usable beta, but I'm going to follow your project closely. Thanks for sharing!

  • Solidjs – JavaScript UI Library
    9 projects | news.ycombinator.com | 29 Nov 2021
    I suggested one such idea (a diffing version of innerHTML) years ago to Mozilla. Ironically, the React team was against it and it fizzled out. In more ironic twists of events, someone eventually wrote a JS implementation of it: https://github.com/tbranyen/diffhtml/tree/master/packages/di... and nowadays people are talking about HTML-based rendering engines again, making this idea somewhat relevant once more.

    To be fair to standards bodies, they have done some work. Element.append now exists to make hyperscripts a bit more straightforward, and a lot of reactivity semantics can be implemented on top of Proxy.

What are some alternatives?

When comparing morphdom and diffhtml you can also consider the following projects:

turbo - The speed of a single-page web application without having to write any JavaScript

solid-ui-react - React SDK using @inrupt/solid-client

Phoenix - Peace of mind from prototype to production

rsp - A simple Java web framework for building real-time user interfaces and UI components.

hotwire-rails - Use Hotwire in your Ruby on Rails app

solid-ui - User Interface widgets and utilities for Solid

solid - A declarative, efficient, and flexible JavaScript library for building user interfaces. [Moved to: https://github.com/solidui/solid]

solid-router - A universal router for Solid inspired by Ember and React Router

intercooler-js - Making AJAX as easy as anchor tags

caldera-react - Server-side execution for React 🌋

turbo - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turbopack and Turborepo.

liveviewjs - LiveView-based library for reactive app development in NodeJS and Deno