SlideShare a Scribd company logo
Business Natural
Language (BNL)
       Jay Fields
    http://jayfields.com
What?
Domain Specific
Language (DSL)
Why?
Developer
           Developer



Business


                       QA
Developer
           Developer



Business


                       QA
Developer
           Developer



Business


                       QA
Developer
           Developer



Business


                       QA
Developer
           Developer



Business


                       QA
Developer
           Developer



Business


                       QA
Developer




                 DSL
Business
Why?
Benefits
Benefits
Managers
-Improve efficiency by
 distributing workload
Benefits
Benefits
Developers
-Technical Decisions
 not Business Details
Benefits
Benefits

Business
-Time to market
BNL == DSL
BNL == DSL
   #=> false
Domain Specific Languages
Domain Specific Languages

   YACC      Excel Macros


              Ruby on Rails
                 Cobol
    Rake         XML
                 etc...
So?
Concise or
 Verbose?
Concise or
 Verbose?


             Who’s the
              author?
“DSL” is too
  general
BNL < DSL
BNL < DSL
  #=> true
The Difference
The Difference
• Natural Language
The Difference
• Natural Language
• Written by the Business
 - subject matter experts
Today
Specification
Award 2 points if the fare
  class is A, C, D, J, Z
Code
account.award 2.points if
[A, C, D, J, Z].include?
fare
Specification
Award 2 points if the fare
  class is A, C, D, J, Z
Code
Award 2 points if the fare
  class is A, C, D, J, Z
How?
External
Award 2 points if the fare
  class is A, C, D, J, Z
Award 2 points if the fare
  class is A, C, D, J, Z

account.award 2.points if
[A, C, D, J, Z].include?
fare
Award 2 points if the
fare class is A, C, D, J, Z
Award 2 points if the
fare class is A, C, D, J, Z

•account.instance_eval
Award 2 points if the
fare class is A, C, D, J, Z

•rule.gsub /^A/, “a”
award 2 points if the
fare class is A, C, D, J, Z

•rule.gsub /^A/, “a”
award 2 points if the
fare class is A, C, D, J, Z

•   rule.gsub /d /, ‘1.’
award 2.points if the
fare class is A, C, D, J, Z

•   rule.gsub /d /, ‘1.’
award 2.points if the
fare class is A, C, D, J, Z

•rule.gsub /class/, ‘’
award 2.points if the
fare      is A, C, D, J, Z

•rule.gsub /class/, ‘’
award 2.points if the
  fare is A, C, D, J, Z

•rule.gsub /([A-Z, ]+)/,
 '[1]'
award 2.points if the
  fare is [ A, C, D, J, Z ]

•rule.gsub /([A-Z, ]+)/,
 '[1]'
award 2.points if the
  fare is [ A, C, D, J, Z ]

•rule.gsub /if the ([a-z]
 +) is([.+])/, 'if
 2.include? 1'
award 2.points if
[ A, C, D, J, Z].include? fare

 •rule.gsub /if the ([a-z]
   +) is([.+])/, 'if
   2.include? 1'
award 2.points if
[ A, C, D, J, Z].include? fare
award 2.points if
[ A, C, D, J, Z].include? fare

account.award 2.points if
[A, C, D, J, Z].include? fare
award 2.points if
[ A, C, D, J, Z].include? fare

account.award 2.points if
[A, C, D, J, Z].include? fare
Specification == Code
Code, Specification,
Code, Specification,
and Documentation
Readable
Documentation
Descriptive And
  Maintainable
Phrases (DAMP)
Maintainable
Readable by any
subject matter
    expert
Who is the user?
Training
Training
Statistics
Developer
           Developer



Business


                       QA
Developer
           Developer



Business


                       QA
Developer
           Developer



Business


                       QA
Developer




                BNL
Business
quot;A change that used to
take 3-4 days now takes
   about 10 minutes.quot;
Example
First Class /
Business Class / A, C, D, J, R, Z   2
 BusinessFirst

   Full Fare
                       Y, H         2
Economy Class


                    K, M, N, B,
Economy Class                       1
                     O,V, U
Business Logic
BNL?
No
No
BNL
When the fare class
 is A, C, D, J, R, or Z
then award 2 points
When the fare class is A, C,
D, J, R, or Z then award 2
            points
When the fare class is A, C,
D, J, R, or Z then award 2
            points
rule.gsub /the fare class is /, ‘’

When A, C, D, J, R, or Z then
     award 2 points
When A, C, D, J, R, or Z
 then award 2 points
When A, C, D, J, R, or Z
   then award 2 points

    rule.gsub /^W/, ‘w’

when A, C, D, J, R, or Z then
     award 2 points
when A, C, D, J, R, or Z then
     award 2 points
when A, C, D, J, R, or Z then
     award 2 points

     rule.gsub / or /, ‘ ’

 when A, C, D, J, R, Z then
     award 2 points
when A, C, D, J, R, Z then
    award 2 points
when A, C, D, J, R, Z then
     award 2 points

   rule.gsub /award /, ‘’

when A, C, D, J, R, Z then 2
         points
when A, C, D, J, R, Z then 2
         points
when A, C, D, J, R, Z then 2
         points

   rule.gsub / points/, ‘’


when A, C, D, J, R, Z then 2
when A, C, D, J, R, Z then 2
when A, C, D, J, R, Z then 2


    rule.gsub /([A-Z])/,
       'FareClass::1'
when FareClass::A,
FareClass::C, FareClass::D,
 FareClass::J, FareClass::R,
    FareClass::Z then 2
when FareClass::A,
FareClass::C, FareClass::D,
 FareClass::J, FareClass::R,
    FareClass::Z then 2
Getting it to
 execute
BusinessLogic.rules returns the
      rules from the DB
Developer



Business
Developer



Business
Approver
           Developer



Business


               Production
Deployment?
Programmers: Are
you out of a job?
Absolutely Not
Absolutely Not

•   Language Workbench
Absolutely Not

•Language Workbench
 •Syntax Checking
Absolutely Not

•Language Workbench
 •Syntax Checking
 •Test Environment
Absolutely Not

•Language Workbench
 •Syntax Checking
 •Test Environment
 •Approval Workflow
Syntax Checking
Syntax Checking
When the fare class is A, C,
D, J, R, or Z then award 2
            points
Syntax Checking
Syntax Checking
      When the far

Did you mean ‘fare class’?
Commercial
 Language
Workbenches
Commercial
 Language
Workbenches
 MPS - JetBrains
  Intentional
Another Example
Employee
Compensation
Corporate
Datastore
Example Employees
Demo
Bad Choice?
Author?
Author?


           Change
          Frequency
What deserves a
    BNL?
Ruby?
BNL vs Rules
  Engines
More Information

bnl.jayfields.com
Questions

bnl@jayfields.com
          Jay Fields
   http://www.jayfields.com

More Related Content

More from ConSanFrancisco123

Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any Time
ConSanFrancisco123
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal Level
ConSanFrancisco123
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise Development
ConSanFrancisco123
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
ConSanFrancisco123
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
ConSanFrancisco123
 
Http Status Report
Http Status ReportHttp Status Report
Http Status Report
ConSanFrancisco123
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My Spacecom
ConSanFrancisco123
 
Building Blueprint With Gwt
Building Blueprint With GwtBuilding Blueprint With Gwt
Building Blueprint With Gwt
ConSanFrancisco123
 
Soa And Web Services Security
Soa And Web Services SecuritySoa And Web Services Security
Soa And Web Services Security
ConSanFrancisco123
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software Development
ConSanFrancisco123
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static Analysis
ConSanFrancisco123
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The Large
ConSanFrancisco123
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And Change
ConSanFrancisco123
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered About
ConSanFrancisco123
 
Linked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And ScalabilityLinked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And Scalability
ConSanFrancisco123
 
Designing Res Tful Rails Applications
Designing Res Tful Rails ApplicationsDesigning Res Tful Rails Applications
Designing Res Tful Rails Applications
ConSanFrancisco123
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application Infrastructure
ConSanFrancisco123
 
Clustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And AvailabilityClustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And Availability
ConSanFrancisco123
 
Second Life How It Works And How It Doesnt
Second Life How It Works And How It DoesntSecond Life How It Works And How It Doesnt
Second Life How It Works And How It Doesnt
ConSanFrancisco123
 

More from ConSanFrancisco123 (19)

Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any Time
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal Level
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise Development
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Http Status Report
Http Status ReportHttp Status Report
Http Status Report
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My Spacecom
 
Building Blueprint With Gwt
Building Blueprint With GwtBuilding Blueprint With Gwt
Building Blueprint With Gwt
 
Soa And Web Services Security
Soa And Web Services SecuritySoa And Web Services Security
Soa And Web Services Security
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software Development
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static Analysis
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The Large
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And Change
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered About
 
Linked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And ScalabilityLinked In Lessons Learned And Growth And Scalability
Linked In Lessons Learned And Growth And Scalability
 
Designing Res Tful Rails Applications
Designing Res Tful Rails ApplicationsDesigning Res Tful Rails Applications
Designing Res Tful Rails Applications
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application Infrastructure
 
Clustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And AvailabilityClustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And Availability
 
Second Life How It Works And How It Doesnt
Second Life How It Works And How It DoesntSecond Life How It Works And How It Doesnt
Second Life How It Works And How It Doesnt
 

Recently uploaded

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 

Recently uploaded (20)

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 

Business Natural Languages Development In Ruby