How is a logic model used to program design?


My thoughts.

Conceptually: A logic model is simply a strategic view of what you want the program to do. Step by step.

Googling "logic model" results in many, many links being found.

What should happen IF "X" occurs. THEN do "Y" or perhaps ELSE do "Z". X, Y, and Z being any sequence of actions that could occur based on user actions, data comparisons, errors, system information.

(Sidebar: And what the program does is normally proceeded by some requirements document. See software life cycle.)

There are been a variety of tools used to layout the strategic flow of a program. Flowcharts being one of the oldest and most common.

Once you have the "what" defined then you start on the tactical part. That being the how you make the program do what you want. The code.

What makes it all so interesting now is that you can "draw out" defined steps via some tool and the tool then writes the code accordingly.

Gets blurry between strategy and tactics but the overall purpose is to make coding faster, easier, and less costly.

Developers are freed (to some extent) to focus on the what and the tools deal with the rest of it all.

However, as the requirements get more and more involved, then there are more things that can happen and more decisions (IF,THEN, ELSE) to be made.

Anything that happens that is not addressable by some logic may cause the program to fail. I.e., crash, loop, return incorrect results, or do something not expected or anticipated.

A logic model simply tries to ensure that no matter what happens, the underlying code can gracefully address the problem in some manner. Hopefully as simply and as elegantly as possible.

And that is how logic models can help program design.

Just another tool but like any other tool, it must be properly applied in a formal and disciplined manner.