Skip to main content
added 235 characters in body
Source Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

There is nothing inherently wrong in having an orchestator doing these steps one after another. When all you need is this fixed step of sequences, don't start to throw some fancy patterns at the code base, this will only overcomplicate things for no benefit.

The key point, however, is, to make the input and output of each of the steps explicit instead of using "global state" for passing the data around.

For example:

conn=generate_connection()
my_code = generate_db_create_code(conn,resources)
generate_docker_compose(my_code)

(The above input/output might not be correct, but I guess you get the idea).

The goals behind this are the following:

  • it should become more self explanatory what each step does, and

  • each step should be unit testable isolation, and

  • it becomes less error prone when you have to add or reorder some steps.

Those are typical goals you should have in mind for this design, not some patterns you have heard from.

There is nothing inherently wrong in having an orchestator doing these steps one after another. When all you need is this fixed step of sequences, don't start to throw some fancy patterns at the code base, this will only overcomplicate things for no benefit.

The key point, however, is, to make the input and output of each of the steps explicit instead of using "global state" for passing the data around. The goals behind this are the following:

  • it should become more self explanatory what each step does

  • each step should be unit testable isolation, and

  • it becomes less error prone when you have to add or reorder some steps.

Those are typical goals you should have in mind for this design, not some patterns you have heard from.

There is nothing inherently wrong in having an orchestator doing these steps one after another. When all you need is this fixed step of sequences, don't start to throw some fancy patterns at the code base, this will only overcomplicate things for no benefit.

The key point, however, is, to make the input and output of each of the steps explicit instead of using "global state" for passing the data around.

For example:

conn=generate_connection()
my_code = generate_db_create_code(conn,resources)
generate_docker_compose(my_code)

(The above input/output might not be correct, but I guess you get the idea).

The goals behind this are the following:

  • it should become more self explanatory what each step does, and

  • each step should be unit testable isolation, and

  • it becomes less error prone when you have to add or reorder some steps.

Those are typical goals you should have in mind for this design, not some patterns you have heard from.

Source Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

There is nothing inherently wrong in having an orchestator doing these steps one after another. When all you need is this fixed step of sequences, don't start to throw some fancy patterns at the code base, this will only overcomplicate things for no benefit.

The key point, however, is, to make the input and output of each of the steps explicit instead of using "global state" for passing the data around. The goals behind this are the following:

  • it should become more self explanatory what each step does

  • each step should be unit testable isolation, and

  • it becomes less error prone when you have to add or reorder some steps.

Those are typical goals you should have in mind for this design, not some patterns you have heard from.