Progress and Challenges in Developing LiveView Native v0.2

177
clicks
Progress and Challenges in Developing LiveView Native v0.2

Source: dockyard.com

Type: Post

Brian Cardarella narrates the journey towards preparing LiveView Native v0.2.0 for release, emphasizing that the upcoming version is intended to be more user-ready. During his keynote at ElixirConf, instead of a launch, he opted for providing a status update. The initial assumption was to map SwiftUI views to markup elements and style them with attributes; however, only the former proved feasible. The nested nature of SwiftUI's modifiers challenged the one-dimensional attribute representation. They initially tried to serialise modifiers, but this created performance issues. José Valim and Chris McCord offered insights, leading the team to brainstorm a new 'stylesheet' approach, which involved using an Abstract Syntax Tree (AST) and offloading deserialization to the client at boot-time rather than run-time. They also addressed server-side performance by planning to adhere to LiveView’s diffing protocol. This new approach aligns modifiers with classes in a stylesheet, which would be more performant and friendly to the diffing engine. Although some technical aspects are still being validated, this new method allows modifier functions of any type and ignores incorrect or malformed modifiers, similar to HTML/CSS, rather than causing crashes. The article serves as a technical deep-dive into the issues and potential solutions for LiveView Native's development, with promise to cover further details in a subsequent post.

© HashMerge 2024