5 ms·
I started my application before the embedded_schema API was available and the Assumption that a RDBMS was backing everything was a major pain-point for me at th
by sjtgraham 10y ago
I started my application before the embedded_schema API was available and the Assumption that a RDBMS was backing everything was a major pain-point for me at the time leading me to create a custom form abstraction using Vex (https://github.com/CargoSense/vex https://github.com/CargoSense/vex). Now with embedded_schema the pain went away and I ended up refactoring my form modules away completely in favour of the new API.
I was using Ruby myself for 10 years before using Elixir and the Form object pattern was one I used very often myself. A general principle of Elixir I have often seen that if you think something doesn't work, or is the wrong way you in fact need to unlearn some of the brain damage acquired from Ruby.
A great example of this is Wojtek Mach's github_ecto project (https://github.com/wojtekmach/github_ecto https://github.com/wojtekmach/github_ecto). His abstracting of the Github API behind a Ecto.Repo was mindblowing to me. Your app communicates with a HTTP API without knowing it's any different than your DB.
Elixir is very much a different way of thinking about problems than Ruby.
- bobwaycott 10y agoHoly crap. That's amazing. Thanks for sharing. Been digging into Elixir off and on for months, and hadn't come across this. Mind-blowing, indeed.