venomnert
Architecting an ecommerce application following Designing Elixir System with OTP
Context:
I have completed chapter 3 (data), chapter 4 (functions) and chapter 5 (testing) of Designing Elixir Systems with OTP. And i’m currently building an e-commerce platform with the following functionalities:
Usercan create an account- The authenticated
usercan addproductsto theircart - The
usercan checkout theirproductsfrom thecart - The
userreceives anorderconfirmation
Questions:
Here is a quote from the book explaining a bank as a data
It’s an initial balance plus a set of transactions at a point in time. These transactions are functions.
-
In the context of an ecommerce application what are the initial “balance” and “set of transactions at a point in time” do I need to keep a track off for:
users,productsandorders? -
In the context of an ecommerce CMS application what are the initial “balance” and “set of transactions at a point in time” do I need to keep a track off for:
users,productsandorders?
Most Liked
JEG2
For me, it often helps to put the database aside for a moment and figure out what data structures I really need. Once I have that, then I can ask myself how I would save it to a database.
Does that help get the ideas flowing?
redrapids
This is the place that James and I always came back to throughout this book. “Let’s see how far we can get without persistence.”
We found that thinking about the solution in these terms shaped the way we thought about the problem.
JEG2
We didn’t include users because the example is already complex enough and everyone shows users. We figured readers could tie that into their own designs.
I agree that simple CRUD is probably fine for your user models. I think the real trick is in getting products right.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









