Bidirectional Data Transformations
summary
Claim: using lenses as bidirectional transformations eliminates paired DTO functions and yields inverses automatically. Implementation: an industrial Clojure codebase (Active Group) uses the active-closure lens library, record projections like make-url-lens, and combinators (map-lens, focus) to convert URL/link/folder trees, vectors↔maps, and recursive mixed data. Built outcomes: serializers/deserializers become lenses, UI component state sync is lens-based, and the approach reduces repetitive code but requires care when request and event shapes diverge. DOI: 10.1145/3677998.
AI-written summary · about
chapters (5)
- 0:00Bidirectional data transformations
- 2:32Motivation and industry context
- 10:35Lenses in Clojure
- 25:21Applying the pattern
- 34:47Q&A
related talks
39mSharing Data, hiding Complexity (with Clojure and RDF)
34mTaking the blame out of our data transformation
28mCharacterizations of Partial Well-Behaved Lenses
50mThe Babel Fish Data: A Case Study
52mApache Lens: Cut Data Analytics Silos In Your Enterprise
27mThe Essence of Online Data Processing
26mMigrating Queries From Lens and Saved Objects -- Data Tangles To Data...
31mTransforming Multimodal Data Management with LanceDB-Ray
