SlideShare ist ein Scribd-Unternehmen logo
1 von 41
MANAGE YOUR DATA
FROM A B-BOY STANCE
    John SJ Anderson / @genehack
         dc.pm / 2012-05-01
MAD PROPS



Cory Watson (GPHAT)

Jay Shirley (JSHIRLEY)
DATA::MANAGER IS
DATA::MANAGER IS
Input Validation
DATA::MANAGER IS
Input Validation

Error Handling
DATA::MANAGER IS
Input Validation

Error Handling

Message Passing
DATA::MANAGER IS
Input Validation

Error Handling

Message Passing

“Opinionated Software”
DATA::MANAGER ISN’T
DATA::MANAGER ISN’T




           Form Generation
DATA::MANAGER ISN’T




           Form Generation

           Form Rendering
DATA::MANAGER ISN’T




           Form Generation

           Form Rendering

           Right For Everybody
DATA::MANAGER IS
DATA::MANAGER IS
1 or more Data::Verifier
objects
DATA::MANAGER IS
1 or more Data::Verifier
objects

1 Message::Stack object
DATA::MANAGER IS
1 or more Data::Verifier
objects

1 Message::Stack object

Tiny bit of sugar code
sprinkled over the top
TASK:
ACCOUNT CREATION FORM
Username field (text box)

Password field (password box)

“Password again” field (password box)
TASK:
ACCOUNT CREATION FORM

            Constraints:

              username must be
              populated

              password must be >4
              characters long

              password must be the
              same as password2
TEST CASES
TEST CASES
Pass case: everything filled in properly
TEST CASES
Pass case: everything filled in properly

Fail cases:

  No username

  No password

  No password2

  Short password

  Value of password != password2
TEST CODE
      A/K/A
ILL-ADVISED LIVE DEMO
DATA::VALIDATOR CODE
        A/K/A
MORE ILL-ADVISED LIVE DEMO
WEB CONTEXT
WEB CONTEXT
          So now we understand how
          to take a set of fields and
          validate them
WEB CONTEXT
          So now we understand how
          to take a set of fields and
          validate them

          But in a web/CGI context,
          if the validation fails, we
          can’t just die();
WEB CONTEXT
          So now we understand how
          to take a set of fields and
          validate them

          But in a web/CGI context,
          if the validation fails, we
          can’t just die();

          Have to communicate nature
          of failure back to the user
WEB CONTEXT
WEB CONTEXT
Also, in a more realistic case, we’ll have more complicated
forms
WEB CONTEXT
Also, in a more realistic case, we’ll have more complicated
forms

1 form submit -> changes to multiple objects / tables on the
backend
WEB CONTEXT
Also, in a more realistic case, we’ll have more complicated
forms

1 form submit -> changes to multiple objects / tables on the
backend

From a UI perspective, we want to display error messages as
close to the source as possible
DATA::MANAGER IS
DATA::MANAGER IS
1 or more Data::Verifier objects
DATA::MANAGER IS
1 or more Data::Verifier objects

1 Message::Stack object
DATA::MANAGER IS
1 or more Data::Verifier objects

1 Message::Stack object

1 Data::Verifier per form “scope”
DATA::MANAGER IS
1 or more Data::Verifier objects

1 Message::Stack object

1 Data::Verifier per form “scope”

1 Message::Stack object to contain all errors/messages about
the results of verifying all the Data::Verifiers in the
Data::Manager
DATA::MANAGER IS
1 or more Data::Verifier objects

1 Message::Stack object

1 Data::Verifier per form “scope”

1 Message::Stack object to contain all errors/messages about
the results of verifying all the Data::Verifiers in the
Data::Manager

Tiny bit of sugar code sprinkled over the top
NO FORM GENERATION
     how does that work?
TEMPLATE MACROS
                 A/K/A MEANS NOW, RIGHT?
EVERYBODY KNOWS WHAT THIS SLIDE
PUT IT ALL TOGETHER
      what do you get?
THANKS!
 Questions?
MORE INFOZ
https://metacpan.org/module/Data::Manager

https://metacpan.org/module/Data::Verifier

https://metacpan.org/module/Message::Stack

http://www.slideshare.net/jshirley/building-better-
applications-with-datamanager

Weitere ähnliche Inhalte

Andere mochten auch (6)

Copyrightvictorialopezrevisedforch3 6
Copyrightvictorialopezrevisedforch3 6Copyrightvictorialopezrevisedforch3 6
Copyrightvictorialopezrevisedforch3 6
 
Moodle sessio1 22-06-10
Moodle sessio1 22-06-10Moodle sessio1 22-06-10
Moodle sessio1 22-06-10
 
Menú
MenúMenú
Menú
 
Ampliació
AmpliacióAmpliació
Ampliació
 
Manual de la zona d'administració de Zen cart
Manual de la zona d'administració de Zen cartManual de la zona d'administració de Zen cart
Manual de la zona d'administració de Zen cart
 
Novas ameaças do mundo conectado
Novas ameaças do mundo conectadoNovas ameaças do mundo conectado
Novas ameaças do mundo conectado
 

Ähnlich wie Manage Your Data In A B-Boy Stance

TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...
TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...
TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...
Michael Noel
 
Sql Injection Adv Owasp
Sql Injection Adv OwaspSql Injection Adv Owasp
Sql Injection Adv Owasp
Aung Khant
 
The Evolving Security Environment For Web Services
The Evolving Security Environment For Web ServicesThe Evolving Security Environment For Web Services
The Evolving Security Environment For Web Services
Qanita Ahmad
 

Ähnlich wie Manage Your Data In A B-Boy Stance (20)

Flash And The City 2010
Flash And The City 2010Flash And The City 2010
Flash And The City 2010
 
Validating forms (and more) with the HTML5 pattern attribute
Validating forms (and more) with the HTML5 pattern attributeValidating forms (and more) with the HTML5 pattern attribute
Validating forms (and more) with the HTML5 pattern attribute
 
Generating Complex and Faulty Test Data Through Model-Based Mutation Analysis
Generating Complex and Faulty Test Data Through Model-Based Mutation AnalysisGenerating Complex and Faulty Test Data Through Model-Based Mutation Analysis
Generating Complex and Faulty Test Data Through Model-Based Mutation Analysis
 
TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...
TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...
TechEd Africa 2011 - OFC308: SharePoint Security in an Insecure World: Unders...
 
Sql injection
Sql injectionSql injection
Sql injection
 
Why Our Code Smells
Why Our Code SmellsWhy Our Code Smells
Why Our Code Smells
 
Building Microservices with Event Sourcing and CQRS
Building Microservices with Event Sourcing and CQRSBuilding Microservices with Event Sourcing and CQRS
Building Microservices with Event Sourcing and CQRS
 
Chapter 14 sql injection
Chapter 14 sql injectionChapter 14 sql injection
Chapter 14 sql injection
 
Advanced SQL Injection
Advanced SQL InjectionAdvanced SQL Injection
Advanced SQL Injection
 
Sql Injection Adv Owasp
Sql Injection Adv OwaspSql Injection Adv Owasp
Sql Injection Adv Owasp
 
The Evolving Security Environment For Web Services
The Evolving Security Environment For Web ServicesThe Evolving Security Environment For Web Services
The Evolving Security Environment For Web Services
 
"Test Design Techniques"
"Test Design Techniques" "Test Design Techniques"
"Test Design Techniques"
 
Building Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka StreamsBuilding Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka Streams
 
Asp
AspAsp
Asp
 
Using Websockets with Play!
Using Websockets with Play!Using Websockets with Play!
Using Websockets with Play!
 
Living with Acceptance Tests: Beyond Write-Once
Living with Acceptance Tests: Beyond Write-OnceLiving with Acceptance Tests: Beyond Write-Once
Living with Acceptance Tests: Beyond Write-Once
 
Real-World WebAppSec Flaws - Examples and Countermeasues
Real-World WebAppSec Flaws - Examples and CountermeasuesReal-World WebAppSec Flaws - Examples and Countermeasues
Real-World WebAppSec Flaws - Examples and Countermeasues
 
Measure() or die()
Measure() or die()Measure() or die()
Measure() or die()
 
Measure() or die()
Measure() or die() Measure() or die()
Measure() or die()
 
Top Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your PipelineTop Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your Pipeline
 

Mehr von John Anderson

A Modest Introduction To Swift
A Modest Introduction To SwiftA Modest Introduction To Swift
A Modest Introduction To Swift
John Anderson
 
JSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your Life
John Anderson
 
Old Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This CenturyOld Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This Century
John Anderson
 
A Modest Introduction to Swift
A Modest Introduction to SwiftA Modest Introduction to Swift
A Modest Introduction to Swift
John Anderson
 
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
John Anderson
 

Mehr von John Anderson (20)

#speakerlife
#speakerlife#speakerlife
#speakerlife
 
Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)
 
Logs are-magic-devfestweekend2018
Logs are-magic-devfestweekend2018Logs are-magic-devfestweekend2018
Logs are-magic-devfestweekend2018
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning project
 
Do you want to be right or do you want to WIN?
Do you want to be right or do you want to WIN?Do you want to be right or do you want to WIN?
Do you want to be right or do you want to WIN?
 
An Introduction to Git (even for non-developers)
An Introduction to Git (even for non-developers)An Introduction to Git (even for non-developers)
An Introduction to Git (even for non-developers)
 
You got chocolate in my peanut butter! .NET on Mac & Linux
You got chocolate in my peanut butter! .NET on Mac & LinuxYou got chocolate in my peanut butter! .NET on Mac & Linux
You got chocolate in my peanut butter! .NET on Mac & Linux
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning project
 
Old Dogs & New Tricks: What's New with Perl5 This Century
Old Dogs & New Tricks: What's New with Perl5 This CenturyOld Dogs & New Tricks: What's New with Perl5 This Century
Old Dogs & New Tricks: What's New with Perl5 This Century
 
Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)
 
Introduction to Git for Non-Developers
Introduction to Git for Non-DevelopersIntroduction to Git for Non-Developers
Introduction to Git for Non-Developers
 
A Modest Introduction To Swift
A Modest Introduction To SwiftA Modest Introduction To Swift
A Modest Introduction To Swift
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning project
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
 
JSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your Life
 
Old Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This CenturyOld Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This Century
 
A Modest Introduction to Swift
A Modest Introduction to SwiftA Modest Introduction to Swift
A Modest Introduction to Swift
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
 
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
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...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Manage Your Data In A B-Boy Stance

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n