Fl4m3Ph03n1x

Fl4m3Ph03n1x

Feedback for "DDD Chapter 5: Implementing Simple Business Logic - Part 1"

Background

I have recently released a video about the Transaction Script, and I use Elixir for the code samples and to get the point across:

I would like to get some feedback and opinions on how to improve it and if there was anything extra you think I could add in order to make it more appealing to both the Elixir community and general public.

Next chapter will be about Active Record, so if you also have something you think is relevant to it, I would be happy yo give it a read and see if/how it fits with the general concept.

First Post!

katafrakt

katafrakt

I only skimmed over it, because TBH 20+ minutes on transaction script is a lot to ask - but also I’m probably not a target audience. Here are my comments:

  • The usage of Elixir seems largely irrelevant. You just use Ecto as a database connection proxy, but actually you run SQL statements as strings.
    • But kudos for using Repo.transact over Repo.transaction
  • The central section on how database transactions work IMO blur the message about the design pattern and where to use it
  • The final section with the paper and metrics… I did not catch what the message is. There are some numbers, some “system before adapting transaction script” (but what was the system using before?). The conclusion seems to be that transaction script is bad (?; but then again - compared to what?).
  • Transaction script as anti-corruption layer? This got me intrigued. But it was just mentioned.
  • Overall this feels AI-generated

Most Liked

Fl4m3Ph03n1x

Fl4m3Ph03n1x

TBH 20+ minutes on transaction script is a lot to ask - but also I’m probably not a target audience

The target audience is:

  • anyone who wants to learn about DDD
  • anyone who is actively reading the book
  • anyone who may be interested in reading the book but is unsure if the topics covered are relevant
  • anyone how has already read the book, and is now distilling what they learn into “short summaries” because they are getting old and they know that one day they will forget everything, so they pour hours of their lives trying to summarize everything they learned so one day they have an easier way of “remembering”, while still holding hope that someone else in the outer space will find this useful and learn a thing or two.

As you can probably guess, I fit in the last group :stuck_out_tongue:

This is the core of transaction script. It is not Elixir specific. If you were to apply it, this is how you would do it. The book itself uses another language, but the approach is similar. It is true I could have used C# or Java or JavaScript for this, the code would be similar, because the focus is the pattern, not the tool used. This said, I still find value in exposing others to Elixir, and I do think Elixir with its ecosystem can be a good tool to explain such concepts.

I focused on explaining what a transaction is because unless you completely understand it, you wont get the examples. In the video I mention you can use Transaction Script in ECL applications, but I take it from your feedback that perhaps some code would help?
I understand the feedback is that even though I “told you where to use it” I did not “show you”. Right?

In the final section I mention a complex application that is then refactored using 4 different patterns (Transaction Script being one of them). On the top of my head I cant remember what the original structure of the application from the University was, but the message I try to convey is: “If you use this on systems with complex logic, you will make it worst!

I use the K&C metrics to make this point clear, and I double down on the conclusion, where I re-iterate where to use the pattern and where not to use it.

Transaction Script is good in some cases, not all cases !

I am not sure how I could have made the points clearer.

Correct. In the section where to use it, I even mention that you can use it as an ECL. Transaction Script is mainly for system with little to no business logic. What would you like to see in this case?

There is no way to say this nicely, my human voice is bad. As in, most people I have ever talked to genuinely dislike my voice, and it is usually an uphill battle. Not only that, using my human voice would make it easy to identify who I really am, and where I live this brings a host of other issues.

I use AI to generate the voice. I tried looking for voice-actors, but I cannot pay them enough to read my long scripts.

Overall, the process I follow is simple:

  1. I study the book
  2. I complement said study with papers and blogs
  3. I write a script, usually 10k-15k words long
  4. I create a presentation using slides as an “idea” of that the video and the flow will look like (lecture style)
  5. I use and AI to read the script, line by line
  6. I spend countless hours editing the whole thing in a video editor

I honestly also fear that the “ai genreated” feeling pushes people away. I do not know how to fight it, since I see no other option than to use an AI voice.

Thank you for the feedback. I really appreciate it. I don’t have it clear on what actions I can take to improve the quality though. If I could do 1 thing differently, what would you suggest I do?

Fl4m3Ph03n1x

Fl4m3Ph03n1x

I took to heart the advice I got from the community, and uploaded a new version of the video. Sorry for the delay!
Now I can finally start working on part 2, active record !

Where Next?

Popular in Discussions Top

CharlesO
Erlang :list.nth simple, but 1 - based nth(1, [H|_]) -> H; nth(N, [_|T]) when N > 1 -> nth(N - 1, T). Elixir Enum.at … coo...
New
ricklove
I was just introduced to Elixir and Phoenix. I was told about the 2 million websocket test that was done 2 years ago. From my research, t...
New
mbenatti
Following https://github.com/tbrand/which_is_the_fastest |> https://raw.githubusercontent.com/tbrand/which_is_the_fastest/master/imgs...
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
tomekowal
Hey guys! I want to create a toy project that shows a chart of temperature over time and updates every 5 seconds. I feel LiveView is per...
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

We're in Beta

About us Mission Statement