The engine pattern is a design pattern formalized at Configura. As it is applied in the abstract, the pattern revolves around the composition of execution. When carrying out large or complex operations, the engine pattern requires breaking the task into atomic steps and composing them together.
Within the abstract, the engine pattern is followed by having an engine object (MhEngine
) and a number of engine function objects (MhSystemEngineFunction
). The engine acts as a controller that executes the code and the engine functions contain portions of code to execute. Having the code in these objects makes it easy to insert, remove, or exchange portions of existing solutions, without significant rewrites.
As an example, the default code for inserting a selective racking system will execute five functions in sequence:
- An import function to take in values that will be needed to carry out the operation
- A populate function to fill an area with placeholder frames, bays, etc.
- A function to detect collisions between the placeholders and existing objects in the drawing
- A function to resolve those conflicts
- An export function to convert the placeholders into either graphics or
Snapper
s
Comments
0 comments
Please sign in to leave a comment.