SlideShare uma empresa Scribd logo
1 de 98
The Model is the Code

             Using COSA Technology
                       by
                 Gordon Morrison

                Copyright © 2012
               All Rights Reserved

05/08/12            www.vsmerlot.com   1
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
Simple Calculator Example
• Subtract two negative
  numbers resulting in a
  negative result.




05/08/12            www.vsmerlot.com   3
A COSA Solution
• Rules
     –     Operand1
     –     Operate
     –     Operand2
     –     Result
     –     Done
     –     Error




05/08/12              www.vsmerlot.com   4
The Application
• Five Functions
     –     Add
     –     Subtract
     –     Multiply
     –     Divide
     –     Percent
• Clear
• Clear Entry


05/08/12                  www.vsmerlot.com   5
On Subtract Event
• Handled as Negate




05/08/12          www.vsmerlot.com   6
Run Engine




05/08/12     www.vsmerlot.com   7
Engine On




05/08/12    www.vsmerlot.com   8
Check Event State
• Static State
     – Compared to
• Dynamic State




05/08/12             www.vsmerlot.com   9
True Rule or Behavior
• Dynamically bind to
  True Member




05/08/12            www.vsmerlot.com   10
Operand1 Rule
• Step
     – Negate




05/08/12           www.vsmerlot.com   11
Rule’s True Behavior




05/08/12          www.vsmerlot.com   12
Single Point True Trace




05/08/12           www.vsmerlot.com   13
Trace what you want
• Complex or
• Simple




05/08/12         www.vsmerlot.com   14
Next Rule
• Base on True




05/08/12          www.vsmerlot.com   15
Engine Off
• Return to OS…




05/08/12          www.vsmerlot.com   16
Exit to OS




05/08/12     www.vsmerlot.com   17
Model
• Model = Code
• Code = Model




05/08/12         www.vsmerlot.com   18
Application




05/08/12     www.vsmerlot.com   19
Next On Click Event




05/08/12         www.vsmerlot.com   20
Back to Engine




05/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 Period




05/08/12                  www.vsmerlot.com   24
True Behavior




05/08/12      www.vsmerlot.com   25
Turn Engine Off




05/08/12       www.vsmerlot.com   26
Trace




05/08/12   www.vsmerlot.com   27
Next True Step




05/08/12       www.vsmerlot.com   28
Engine Off




05/08/12     www.vsmerlot.com   29
Return to OS




05/08/12      www.vsmerlot.com   30
Rule Operand1 Step Any Number
• Model = Code
• Code = Model




05/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
Number




05/08/12   www.vsmerlot.com   51
05/08/12   www.vsmerlot.com   52
Now Click Subtract




05/08/12         www.vsmerlot.com   53
Subtract
• On Click Event




05/08/12            www.vsmerlot.com   54
Not Any Number
• Next Step




05/08/12          www.vsmerlot.com   55
Not Any Number
• Next Step




05/08/12          www.vsmerlot.com   56
Not Clear Entry




05/08/12       www.vsmerlot.com   57
Not Clear Entry




05/08/12       www.vsmerlot.com   58
Not Clear




05/08/12    www.vsmerlot.com   59
Not Clear




05/08/12    www.vsmerlot.com   60
Rule Operate
• Not Step Addition




05/08/12              www.vsmerlot.com   61
Not Addition Step
• Rule Operate




05/08/12         www.vsmerlot.com   62
Rule Operate
• Step Subtract




05/08/12          www.vsmerlot.com   63
Rule Operate
• Step Subtraction




05/08/12             www.vsmerlot.com   64
Next Rule
• Operand 2




05/08/12       www.vsmerlot.com   65
First Step
• Return to OS




05/08/12          www.vsmerlot.com   66
Subtracting




05/08/12     www.vsmerlot.com   67
05/08/12   www.vsmerlot.com   68
05/08/12   www.vsmerlot.com   69
Rule Operand2
• Step Negate




05/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 Number




05/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 Equals




05/08/12        www.vsmerlot.com   90
On Click Equals




05/08/12       www.vsmerlot.com   91
Not Any Number Step




05/08/12         www.vsmerlot.com   92
Exit Rule Operand 2




05/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 Step




05/08/12             www.vsmerlot.com   96
Result Rule
• Equals Step




05/08/12          www.vsmerlot.com   97
Result




05/08/12   www.vsmerlot.com   98

Mais conteúdo relacionado

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

It wasn’t the if-