Manage Your Data In A B-Boy Stance
Upcoming SlideShare
Loading in...5
×
 

Manage Your Data In A B-Boy Stance

on

  • 2,743 views

 

Statistics

Views

Total Views
2,743
Views on SlideShare
2,742
Embed Views
1

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 1

https://twimg0-a.akamaihd.net 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Manage Your Data In A B-Boy Stance Manage Your Data In A B-Boy Stance Presentation Transcript

  • MANAGE YOUR DATAFROM A B-BOY STANCE John SJ Anderson / @genehack dc.pm / 2012-05-01
  • MAD PROPSCory Watson (GPHAT)Jay Shirley (JSHIRLEY)
  • DATA::MANAGER IS
  • DATA::MANAGER ISInput Validation
  • DATA::MANAGER ISInput ValidationError Handling
  • DATA::MANAGER ISInput ValidationError HandlingMessage Passing
  • DATA::MANAGER ISInput ValidationError HandlingMessage 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 IS1 or more Data::Verifierobjects
  • DATA::MANAGER IS1 or more Data::Verifierobjects1 Message::Stack object
  • DATA::MANAGER IS1 or more Data::Verifierobjects1 Message::Stack objectTiny bit of sugar codesprinkled over the top
  • TASK:ACCOUNT CREATION FORMUsername 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 CASESPass case: everything filled in properly
  • TEST CASESPass case: everything filled in properlyFail cases: No username No password No password2 Short password Value of password != password2
  • TEST CODE A/K/AILL-ADVISED LIVE DEMO
  • DATA::VALIDATOR CODE A/K/AMORE 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 CONTEXTAlso, in a more realistic case, we’ll have more complicatedforms
  • WEB CONTEXTAlso, in a more realistic case, we’ll have more complicatedforms1 form submit -> changes to multiple objects / tables on thebackend
  • WEB CONTEXTAlso, in a more realistic case, we’ll have more complicatedforms1 form submit -> changes to multiple objects / tables on thebackendFrom a UI perspective, we want to display error messages asclose to the source as possible
  • DATA::MANAGER IS
  • DATA::MANAGER IS1 or more Data::Verifier objects
  • DATA::MANAGER IS1 or more Data::Verifier objects1 Message::Stack object
  • DATA::MANAGER IS1 or more Data::Verifier objects1 Message::Stack object1 Data::Verifier per form “scope”
  • DATA::MANAGER IS1 or more Data::Verifier objects1 Message::Stack object1 Data::Verifier per form “scope”1 Message::Stack object to contain all errors/messages aboutthe results of verifying all the Data::Verifiers in theData::Manager
  • DATA::MANAGER IS1 or more Data::Verifier objects1 Message::Stack object1 Data::Verifier per form “scope”1 Message::Stack object to contain all errors/messages aboutthe results of verifying all the Data::Verifiers in theData::ManagerTiny 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 INFOZhttps://metacpan.org/module/Data::Managerhttps://metacpan.org/module/Data::Verifierhttps://metacpan.org/module/Message::Stackhttp://www.slideshare.net/jshirley/building-better-applications-with-datamanager