Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
The Model is the Code             Using COSA Technology                       by                 Gordon Morrison          ...
It wasn’t the “go to”• The ‘if’ has caused  more spaghetti code  than the ‘go to’ ever  could.05/08/12             www.vsm...
Simple Calculator Example• Subtract two negative  numbers resulting in a  negative result.05/08/12            www.vsmerlot...
A COSA Solution• Rules     –     Operand1     –     Operate     –     Operand2     –     Result     –     Done     –     E...
The Application• Five Functions     –     Add     –     Subtract     –     Multiply     –     Divide     –     Percent• Cl...
On Subtract Event• Handled as Negate05/08/12          www.vsmerlot.com   6
Run Engine05/08/12     www.vsmerlot.com   7
Engine On05/08/12    www.vsmerlot.com   8
Check Event State• Static State     – Compared to• Dynamic State05/08/12             www.vsmerlot.com   9
True Rule or Behavior• Dynamically bind to  True Member05/08/12            www.vsmerlot.com   10
Operand1 Rule• Step     – Negate05/08/12           www.vsmerlot.com   11
Rule’s True Behavior05/08/12          www.vsmerlot.com   12
Single Point True Trace05/08/12           www.vsmerlot.com   13
Trace what you want• Complex or• Simple05/08/12         www.vsmerlot.com   14
Next Rule• Base on True05/08/12          www.vsmerlot.com   15
Engine Off• Return to OS…05/08/12          www.vsmerlot.com   16
Exit to OS05/08/12     www.vsmerlot.com   17
Model• Model = Code• Code = Model05/08/12         www.vsmerlot.com   18
Application05/08/12     www.vsmerlot.com   19
Next On Click Event05/08/12         www.vsmerlot.com   20
Back to Engine05/08/12       www.vsmerlot.com   21
05/08/12   www.vsmerlot.com   22
05/08/12   www.vsmerlot.com   23
Same Rule Next Step• Previous Step Allows     – True Any Number     – False One Period05/08/12                  www.vsmerl...
True Behavior05/08/12      www.vsmerlot.com   25
Turn Engine Off05/08/12       www.vsmerlot.com   26
Trace05/08/12   www.vsmerlot.com   27
Next True Step05/08/12       www.vsmerlot.com   28
Engine Off05/08/12     www.vsmerlot.com   29
Return to OS05/08/12      www.vsmerlot.com   30
Rule Operand1 Step Any Number• Model = Code• Code = Model05/08/12         www.vsmerlot.com   31
05/08/12   www.vsmerlot.com   32
05/08/12   www.vsmerlot.com   33
05/08/12   www.vsmerlot.com   34
05/08/12   www.vsmerlot.com   35
05/08/12   www.vsmerlot.com   36
05/08/12   www.vsmerlot.com   37
05/08/12   www.vsmerlot.com   38
05/08/12   www.vsmerlot.com   39
05/08/12   www.vsmerlot.com   40
05/08/12   www.vsmerlot.com   41
05/08/12   www.vsmerlot.com   42
05/08/12   www.vsmerlot.com   43
05/08/12   www.vsmerlot.com   44
05/08/12   www.vsmerlot.com   45
05/08/12   www.vsmerlot.com   46
05/08/12   www.vsmerlot.com   47
05/08/12   www.vsmerlot.com   48
05/08/12   www.vsmerlot.com   49
05/08/12   www.vsmerlot.com   50
Number05/08/12   www.vsmerlot.com   51
05/08/12   www.vsmerlot.com   52
Now Click Subtract05/08/12         www.vsmerlot.com   53
Subtract• On Click Event05/08/12            www.vsmerlot.com   54
Not Any Number• Next Step05/08/12          www.vsmerlot.com   55
Not Any Number• Next Step05/08/12          www.vsmerlot.com   56
Not Clear Entry05/08/12       www.vsmerlot.com   57
Not Clear Entry05/08/12       www.vsmerlot.com   58
Not Clear05/08/12    www.vsmerlot.com   59
Not Clear05/08/12    www.vsmerlot.com   60
Rule Operate• Not Step Addition05/08/12              www.vsmerlot.com   61
Not Addition Step• Rule Operate05/08/12         www.vsmerlot.com   62
Rule Operate• Step Subtract05/08/12          www.vsmerlot.com   63
Rule Operate• Step Subtraction05/08/12             www.vsmerlot.com   64
Next Rule• Operand 205/08/12       www.vsmerlot.com   65
First Step• Return to OS05/08/12          www.vsmerlot.com   66
Subtracting05/08/12     www.vsmerlot.com   67
05/08/12   www.vsmerlot.com   68
05/08/12   www.vsmerlot.com   69
Rule Operand2• Step Negate05/08/12        www.vsmerlot.com   70
05/08/12   www.vsmerlot.com   71
05/08/12   www.vsmerlot.com   72
05/08/12   www.vsmerlot.com   73
A Negative Number05/08/12        www.vsmerlot.com   74
05/08/12   www.vsmerlot.com   75
05/08/12   www.vsmerlot.com   76
05/08/12   www.vsmerlot.com   77
05/08/12   www.vsmerlot.com   78
05/08/12   www.vsmerlot.com   79
05/08/12   www.vsmerlot.com   80
05/08/12   www.vsmerlot.com   81
05/08/12   www.vsmerlot.com   82
05/08/12   www.vsmerlot.com   83
05/08/12   www.vsmerlot.com   84
05/08/12   www.vsmerlot.com   85
05/08/12   www.vsmerlot.com   86
05/08/12   www.vsmerlot.com   87
05/08/12   www.vsmerlot.com   88
05/08/12   www.vsmerlot.com   89
Then Click Equals05/08/12        www.vsmerlot.com   90
On Click Equals05/08/12       www.vsmerlot.com   91
Not Any Number Step05/08/12         www.vsmerlot.com   92
Exit Rule Operand 205/08/12         www.vsmerlot.com   93
05/08/12   www.vsmerlot.com   94
Not Clear Entry• Etc.05/08/12       www.vsmerlot.com   95
Result Rule• Not Percent Step05/08/12             www.vsmerlot.com   96
Result Rule• Equals Step05/08/12          www.vsmerlot.com   97
Result05/08/12   www.vsmerlot.com   98
Upcoming SlideShare
Loading in …5
×

It wasn’t the if-

211 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

It wasn’t the if-

  1. 1. The Model is the Code Using COSA Technology by Gordon Morrison Copyright © 2012 All Rights Reserved05/08/12 www.vsmerlot.com 1
  2. 2. It wasn’t the “go to”• The ‘if’ has caused more spaghetti code than the ‘go to’ ever could.05/08/12 www.vsmerlot.com 2
  3. 3. Simple Calculator Example• Subtract two negative numbers resulting in a negative result.05/08/12 www.vsmerlot.com 3
  4. 4. A COSA Solution• Rules – Operand1 – Operate – Operand2 – Result – Done – Error05/08/12 www.vsmerlot.com 4
  5. 5. The Application• Five Functions – Add – Subtract – Multiply – Divide – Percent• Clear• Clear Entry05/08/12 www.vsmerlot.com 5
  6. 6. On Subtract Event• Handled as Negate05/08/12 www.vsmerlot.com 6
  7. 7. Run Engine05/08/12 www.vsmerlot.com 7
  8. 8. Engine On05/08/12 www.vsmerlot.com 8
  9. 9. Check Event State• Static State – Compared to• Dynamic State05/08/12 www.vsmerlot.com 9
  10. 10. True Rule or Behavior• Dynamically bind to True Member05/08/12 www.vsmerlot.com 10
  11. 11. Operand1 Rule• Step – Negate05/08/12 www.vsmerlot.com 11
  12. 12. Rule’s True Behavior05/08/12 www.vsmerlot.com 12
  13. 13. Single Point True Trace05/08/12 www.vsmerlot.com 13
  14. 14. Trace what you want• Complex or• Simple05/08/12 www.vsmerlot.com 14
  15. 15. Next Rule• Base on True05/08/12 www.vsmerlot.com 15
  16. 16. Engine Off• Return to OS…05/08/12 www.vsmerlot.com 16
  17. 17. Exit to OS05/08/12 www.vsmerlot.com 17
  18. 18. Model• Model = Code• Code = Model05/08/12 www.vsmerlot.com 18
  19. 19. Application05/08/12 www.vsmerlot.com 19
  20. 20. Next On Click Event05/08/12 www.vsmerlot.com 20
  21. 21. Back to Engine05/08/12 www.vsmerlot.com 21
  22. 22. 05/08/12 www.vsmerlot.com 22
  23. 23. 05/08/12 www.vsmerlot.com 23
  24. 24. Same Rule Next Step• Previous Step Allows – True Any Number – False One Period05/08/12 www.vsmerlot.com 24
  25. 25. True Behavior05/08/12 www.vsmerlot.com 25
  26. 26. Turn Engine Off05/08/12 www.vsmerlot.com 26
  27. 27. Trace05/08/12 www.vsmerlot.com 27
  28. 28. Next True Step05/08/12 www.vsmerlot.com 28
  29. 29. Engine Off05/08/12 www.vsmerlot.com 29
  30. 30. Return to OS05/08/12 www.vsmerlot.com 30
  31. 31. Rule Operand1 Step Any Number• Model = Code• Code = Model05/08/12 www.vsmerlot.com 31
  32. 32. 05/08/12 www.vsmerlot.com 32
  33. 33. 05/08/12 www.vsmerlot.com 33
  34. 34. 05/08/12 www.vsmerlot.com 34
  35. 35. 05/08/12 www.vsmerlot.com 35
  36. 36. 05/08/12 www.vsmerlot.com 36
  37. 37. 05/08/12 www.vsmerlot.com 37
  38. 38. 05/08/12 www.vsmerlot.com 38
  39. 39. 05/08/12 www.vsmerlot.com 39
  40. 40. 05/08/12 www.vsmerlot.com 40
  41. 41. 05/08/12 www.vsmerlot.com 41
  42. 42. 05/08/12 www.vsmerlot.com 42
  43. 43. 05/08/12 www.vsmerlot.com 43
  44. 44. 05/08/12 www.vsmerlot.com 44
  45. 45. 05/08/12 www.vsmerlot.com 45
  46. 46. 05/08/12 www.vsmerlot.com 46
  47. 47. 05/08/12 www.vsmerlot.com 47
  48. 48. 05/08/12 www.vsmerlot.com 48
  49. 49. 05/08/12 www.vsmerlot.com 49
  50. 50. 05/08/12 www.vsmerlot.com 50
  51. 51. Number05/08/12 www.vsmerlot.com 51
  52. 52. 05/08/12 www.vsmerlot.com 52
  53. 53. Now Click Subtract05/08/12 www.vsmerlot.com 53
  54. 54. Subtract• On Click Event05/08/12 www.vsmerlot.com 54
  55. 55. Not Any Number• Next Step05/08/12 www.vsmerlot.com 55
  56. 56. Not Any Number• Next Step05/08/12 www.vsmerlot.com 56
  57. 57. Not Clear Entry05/08/12 www.vsmerlot.com 57
  58. 58. Not Clear Entry05/08/12 www.vsmerlot.com 58
  59. 59. Not Clear05/08/12 www.vsmerlot.com 59
  60. 60. Not Clear05/08/12 www.vsmerlot.com 60
  61. 61. Rule Operate• Not Step Addition05/08/12 www.vsmerlot.com 61
  62. 62. Not Addition Step• Rule Operate05/08/12 www.vsmerlot.com 62
  63. 63. Rule Operate• Step Subtract05/08/12 www.vsmerlot.com 63
  64. 64. Rule Operate• Step Subtraction05/08/12 www.vsmerlot.com 64
  65. 65. Next Rule• Operand 205/08/12 www.vsmerlot.com 65
  66. 66. First Step• Return to OS05/08/12 www.vsmerlot.com 66
  67. 67. Subtracting05/08/12 www.vsmerlot.com 67
  68. 68. 05/08/12 www.vsmerlot.com 68
  69. 69. 05/08/12 www.vsmerlot.com 69
  70. 70. Rule Operand2• Step Negate05/08/12 www.vsmerlot.com 70
  71. 71. 05/08/12 www.vsmerlot.com 71
  72. 72. 05/08/12 www.vsmerlot.com 72
  73. 73. 05/08/12 www.vsmerlot.com 73
  74. 74. A Negative Number05/08/12 www.vsmerlot.com 74
  75. 75. 05/08/12 www.vsmerlot.com 75
  76. 76. 05/08/12 www.vsmerlot.com 76
  77. 77. 05/08/12 www.vsmerlot.com 77
  78. 78. 05/08/12 www.vsmerlot.com 78
  79. 79. 05/08/12 www.vsmerlot.com 79
  80. 80. 05/08/12 www.vsmerlot.com 80
  81. 81. 05/08/12 www.vsmerlot.com 81
  82. 82. 05/08/12 www.vsmerlot.com 82
  83. 83. 05/08/12 www.vsmerlot.com 83
  84. 84. 05/08/12 www.vsmerlot.com 84
  85. 85. 05/08/12 www.vsmerlot.com 85
  86. 86. 05/08/12 www.vsmerlot.com 86
  87. 87. 05/08/12 www.vsmerlot.com 87
  88. 88. 05/08/12 www.vsmerlot.com 88
  89. 89. 05/08/12 www.vsmerlot.com 89
  90. 90. Then Click Equals05/08/12 www.vsmerlot.com 90
  91. 91. On Click Equals05/08/12 www.vsmerlot.com 91
  92. 92. Not Any Number Step05/08/12 www.vsmerlot.com 92
  93. 93. Exit Rule Operand 205/08/12 www.vsmerlot.com 93
  94. 94. 05/08/12 www.vsmerlot.com 94
  95. 95. Not Clear Entry• Etc.05/08/12 www.vsmerlot.com 95
  96. 96. Result Rule• Not Percent Step05/08/12 www.vsmerlot.com 96
  97. 97. Result Rule• Equals Step05/08/12 www.vsmerlot.com 97
  98. 98. Result05/08/12 www.vsmerlot.com 98

×