Leveraging Ecto for Dynamic Data Handling in Elixir

200
clicks
Leveraging Ecto for Dynamic Data Handling in Elixir

Source: youtube.com

Type: Video

Benjamin Milde explores the use of Ecto without predefined schemas, which is pertinent when content structures are not known until runtime. Milde's presentation emphasizes the adaptability of Ecto as a toolkit for various dynamic situations. Focusing on the CMS called ProcessWire and its approach to content management, Milde sheds light on implementing ProcessWire’s data querying and storage patterns using Ecto. He emphasizes the need for composition, the avoidance of creating additional atoms dynamically, and going beyond conventional use cases documented for Ecto. Milde introduces the concept of 'selectors', a text-based DSL from ProcessWire, and explains how to replicate its functionality with Ecto by implementing a custom querying language. He breaks down the process into parsing the selector strings, defining a struct for the protocol, and transforming the parsed data into an Ecto query. The talk also covers how to tackle the creation and manipulation of unknown tables at runtime, demonstrating the capabilities of Ecto's queryable protocol and dynamic queries for building advanced query builders.

© HashMerge 2024