Skip to content
0:00 / 0:00

#elixir#phoenixliveview#ecto

Transactions and Protocols: Phoenix App from Scratch, Episode 3

Code and Stuff

6.6K subscribers • 19 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

3.2K views1 year ago1 recommendation

Web developmentDatabases and dataElixir and ErlangSQLFull-stack frameworks

How to model financial transactions, use Ecto decimals, and build reusable currency formatting components in Phoenix LiveView.

[series] Build a complete budget tracking app in Phoenix LiveView! In this episode, we'll: - Decide how to model transactions - Compare decimal and float data types - Create and list transactions - Walk through some Phoenix forms magic - Create Phoenix components for currency display - Calculate balances from transactions Learn how to: - Use Ecto enums and decimals for financial data - Build reusable currency formatting components - Implement financial calculations correctly - Build stateless Phoenix components from scratch Links Screen recording software I use (affiliate): screen.studio/@Yy75o Project repo: github.com/ChristianAlexander/tutorial-budget-app Changes from this video: github.com/ChristianAlexander/tutorial-budget-app/pull/7 phx.gen.schema: hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Schema.html Ecto.Query: hexdocs.pm/ecto/Ecto.Query.html Timestamps Choosing a data model - Create the schema - Why decimal matters - Context module functions - Create transaction form - Where did that name come from? - Protocols! - Add a table - Build stateless components - Sum up the transactions - End result - What's next? - Music from #Uppbeat (free for Creators!): uppbeat.io/t/dan-barton/the-executive-lounge License code: KO1KHN4PJPHPU0G0

Why it's here

1 person recommends this

u/GiraffeFireAlchemistin r/elixir • Recommends

Transactions and Protocols: Phoenix App from Scratch, Episode 3