XFB - PowerPoint PPT Presentation

About This Presentation
Title:

XFB

Description:

... technical innovations (XFAs, query sims, nested circuits, nested layouts, ... Fusebox 2 worked with the concept of a federation of circuits,each having to ... – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 73
Provided by: halh
Category:
Tags: xfb

less

Transcript and Presenter's Notes

Title: XFB


1
XFB
  • There's a fine line between genius and insanity.
    I have erased this line.Oscar Levant

2
Origins of XFB
  • XFB (Extended Fusebox) grew out of a desire to
    tip the scale of project success.
  • XFB combines technical innovations (XFAs, query
    sims, nested circuits, nested layouts, integrated
    security, etc.) with project management features.

3
70 Failure
4
Time Expended
Nike Method
Design
Testing
Delivery
Coding
Architecture
Requirements
www.halhelms.com
5
Time Expended
Extended Fusebox Method
Coding
Testing
Delivery
Architecture
Requirements/Design
www.halhelms.com
6
Main Points of XFB
  • Project Management
  • wireframes
  • prototypes
  • devnotes
  • Technical
  • xfas
  • fusedocs
  • nested circuits
  • nested layouts
  • query sims
  • security
  • assertions

7
Wireframe
8
Wireframe
  • Wireframes provide a "booster rocket" to help us
    escape the gravitational pull of our prejudices
    and assumptions about what clients want.

9
Wireframe
  • The wireframe is a skeleton-model of an
    application.
  • It is meant to help clients and developers
    discuss what an application should do.

10
Wireframe
11
Wireframe
12
Wireframe
  • Download available at www.bjork.net

13
Prototype w/DevNotes
14
Why a prototype?
  • "Requirements gathering" doesn't work
  • The Musee d'Orsay in Paris wants to hire you to
    reproduce a famous painting Arrangement in Black
    and Grey No. 1
  • Specification "The work shall be oil on canvas,
    56-1/4" x 63-1/4"..."

15
Is this what they want?
16
Is this what they want?
17
Is this what they want?
18
Is this what they want?
19
Is this what they want?
20
THIS is what they want!
21
Why the prototype?
  • Clients can only tell you what they want after
    they see it

22
What is the prototype?
23
Leaving no "wiggle room"
The prototype
The deployed application
24
An iterative process
  • The wireframe forms the basis for the first cut
    of the prototype
  • Prototypes have minimal codeand are often best
    handled by non-programmers
  • The prototype is refined through interaction with
    client and developer using DevNotes

25
What is DevNotes?
  • DevNotes is a simple, threaded message system
    that sits below each individual prototype page.
  • All issues related to the application are
    recorded as DevNotes

26
What are DevNotes used for?
  • Client direction "Move the buttons to the
    left/Make the blue a little more like cornflower
    and less like slate"
  • Developer questions "Where will the product
    information come from?/Is there an existing
    database or file with authorized users?"
  • Client answers "I think the IT people have a
    spreadsheet or something with users."

27
What are DevNotes used for?
  • Developer self-notes "Use JavaScript for client
    processing of this procedure"

28
Prototype freeze
  • We are done with the prototype when both client
    and developer are confident that
  • all questions regarding functionality have been
    resolved
  • all content has been received from client
  • graphical interface/look and feel has been
    approved
  • any changes occurring after this point will
    either become a new release or will be
    exorbitantly expensive

29
Fusebox architecture
30
Unplanned program flow
Module F
Module E
Module B
Module C
Module A
Module D
31
Architected program flow
Module E
Module F
Module C
Module A
Module B
Module D
32
A Fusebox request
validateLogin
the fuseaction
loginUser
Fusebox
qryValidateLogin.cfm
validateLogin
actValidateLogin.cfm
newUser
fuses
the fusebox
fuseactions
33
Fuses always make requests of the fusebox
ltform actionindex.cfm methodpostgt ltinput
typehidden namefuseaction valuevali
dateUsergt ltinput typetext nameusernamegt lt
input typepassword namepasswordgt ltinput
typesubmitgt lt/formgt
Fusebox
a fuse
the fusebox
34
The fusebox copies all URL and form variables
into attributes scope
ltcf_FormURL2Attributesgt
url.productID 1027 form.lastName Helms
attributes.productID 1027 attributes.lastName
Helms
35
The fusebox
ltcfswitch expression attributes.fuseactiongt
ltcfcase valueloginUsergt ltcfinclude
templatedspLoginUser.cfmgt lt/cfcasegt ltcfcas
e valuevalidateLogingt ltcfinclude
templateqryValidateLogin.cfmgt ltcfinclude
templateactValidateLogin.cfmgt lt/cfcasegt lt/cfs
witchgt
The fusebox
36
Fuseactions
  • The fuseaction is the motivating force in an
    application.
  • Suggestion use name is form of verbNounPhrase
    such as
  • addItemToCart
  • getUserInfo
  • showProductInfo

37
The fusebox
ltcfswitch expression attributes.fuseactiongt
ltcfcase valuedoSomethinggt ltcfinclude
templateaFuse.cfmgt lt/cfcasegt . ltcfcase
valuedoSomethingElsegt ltcfmodule
templateanotherFuse.cfmgt lt/cfcasegt lt/cfswitch
gt
The fusebox
38
Including a fuse
The fuseaction
doSomething
ltcfswitch expression attributes.fuseactiongt
ltcfcase valuedoSomethinggt ltcfinclude
templateaFuse.cfmgt lt/cfcasegt . ltcfcase
valuedoSomethingElsegt ltcfmodule
templateanotherFuse.cfmgt lt/cfcasegt lt/cfswitch
gt
yetAnotherFuse.cfm
The fuses
The fusebox
39
Nested circuits
40
Benefits of nested circuits
  • More and easier code reuse
  • Independent, concurrent development of code
    modules
  • Descendant modules inherit variables from parents
  • Variables from parents are inherited by children
  • Layout files can be nested
  • Exceptions bubble upwards

41
XFB nested circuits
42
Conflicting circuit names
43
Resolving circuit naming conflicts
  • Create a Circuits.cfm file
  • Alias name conflicts

bpcf/completed/circuits.cfm
44
FB3 nested circuits
  • Fusebox 2 worked with the concept of a federation
    of circuits,each having to know of the existence
    of each other
  • Fusebox 3 works with the concept of
    interchangeable circuits that can be reused in
    different applications

45
Inheritance
ltcfset dsn "OurApplication"gt
ltcfquery datasourcedsngt
46
Bubbling exceptions
  • Lets architect determine where certain exception
    types will be handled
  • Lets coder write fuses without worrying about
    handling certain classes of exceptions

47
Example Bubbling exceptions
lt!-- index.cfm --gt ltcftrygt ltcfcatch
typeUserAlertgt ltscriptgt alert( lt/scriptgt
lt/cfcatchgt lt/cftrygt
lt!-- index.cfm --gt
lt!-- aFuse.cfm --gt ltcftrygt ltcfinclude
templatemyPage.cfmgt ltcfcatchgt
ltcf_LogException messagecfcatch.messagegt lt
cfthrow typeUserAlertgt lt/cfcatchgt lt/cftrygt
48
XFAs
49
XFAs
  • A typical Fusebox 2 page has fuseactions
    hardcoded in place.
  • Examples
  • ltform action"index.cfm?fuseactionupdateProductIn
    fo"gt
  • lta href"index.cfm?fuseactionshowUserMenu"gt
  • ltcflocation url"index.cfm?fuseactionshowMainPage
    "gt

50
XFAs
  • XFAs are variables that lets fuseactions be
    resolved at run time
  • Examples
  • ltform action"index.cfm?fuseactionXFA.submitForm
    "gt
  • lta href"index.cfm?fuseactionXFA.next"gt
  • ltcflocation url"index.cfm?fuseactionXFA.home"gt

51
Identifying XFAs
  • Mark up the prototype for any exit points any
    point at which the user or the system can make
    another fuseaction request

52
Identifying XFAs
53
Assigning values to XFAs
  • Login XFA.submitForm ? validateUserLogin
  • Login Validation XFA.success ? showMainCatalogPage
  • Product Detail XFA.buyItem ? addItemToCart
  • Cart XFA.adjust quantities ? adjustCartQuantities
  • Cart XFA.removeItem ? removeItemFromCart
  • Registered User XFA.editInfo ? editUserInfo
  • Registered User XFA.saveInfoUpdate ? saveUser
  • Admin Page XFA.newUser ? newUser

Identifying common nouns
54
Identifying circuit and fuseaction
55
Identifying needed fuses
56
Fusedoc
57
Fusedocs
  • Provide documentation/PDL (program design
    language) for each fuse
  • Tells coder what they need to know to write a
    fuse without knowledge of the application
  • XML-based with DTD for validation

58
Nested layouts
59
ltcf_bodycontentgt tag
  • Used to capture the output of code and save as a
    request-scoped variable
  • Replaced in ColdFusion release 5 with
    ltcfsavecontentgt

60
Example ltcf_bodycontentgt
ltcf_bodyContent name"me"gt ltcfset reverseColor
RandRange( 0, 1 )gt lttable border"2"gt lttrgt
lttdgtI am the left sidelt/tdgt lttdgtI am
the right sidelt/tdgt lt/trgt
lt/tablegt lt/cf_bodyContentgt ltcfinclude
template"layout.cfm"gt
61
Example ltcf_bodycontentgt
ltcfoutputgt ltcfset thebg "white"gt ltcfset thefg
"black"gt ltcfif reversecolorgt ltcfset thebg
"black"gt ltcfset thefg "white"gt lt/cfifgt ltstylegt
td background-color thebg color thefg
lt/stylegt ltpgtrequest.melt/pgt lt/cfoutputgt
XMLSpy/FD4 validateLogin.cfm
62
Nested layouts
  • Nested circuits

Parent
Child
GrandChild
UKDAXF/SampleFB3/
63
Post-processing decision making
  • Because the child is returned to the parent as a
    variable (rather than simply output onto the
    screen), the parent can make decisions based on
    the results of the child's processing

64
Implementing nested layouts
  • Wrap the code in index.cfm with ltcfsavecontentgt
    (version 5) or ltcf_bodycontentgt (version 4) using
    the circuit's alias as the name of the variable
  • (Illustration next)

65
Implementing nested layouts
  • ltcfsavecontent variable"Users"gt
  •  
  • ltcfinclude template"app_locals.cfm"gt
  • lt!--- Peel off the first layer and determine
    whether to delegate the fuseaction. ---gt
  • ltcfif ListLen( attributes.fuseaction, '.' ) GT 1gt
  • ltcfinclude template"ListFirst(
    attributes.fuseaction, '.' )/index.cfm"gt
  • ltcfelsegt
  • lt!--- I'm going to get one (and only one)
    fuseaction at a time. Fuseactions
  • correspond to methods or messages in OO
    languages. ---gt
  • ltcfswitch expression "attributes.fuseaction
    "gt
  • ltcfcase value"home"gt
  • ltcfinclude template"UserInfo.cfm"gt
  • lt/cfcasegt
  • ltcfdefaultcasegt
  • ltcfoutputgt
  • I am the GetDirectoryFromPath(
    GetCurrentTemplatePath()) fusebox and I received
    a fuseaction called ltBgtltFONT COLOR"000066"gt
  • "attributes.fuseaction"lt/FONTgtlt/Bgt that I don't
    have a handler for.
  • lt/cfoutputgt
  • lt/cfdefaultcasegt

66
Implementing nested layouts
  • If the child is to display something, call the
    layout file after the ltcfsavecontentgt tag
  • ltcfinclude template"dsp_layout32a.cfm"gt

67
Query sims
68
Query sims
  • Provides a simulated query to work with code
  • Allows code architecture to be done before all
    database decisions have been finalized
  • Provides instruction to SQL coders on what
    information is needed
  • Lets architect determine data variable names

test/QSimSample
69
Test harnesses
  • Provides an easy-to-implement way of unit-testing
    fuses
  • Should accompany all completed fuses

70
Example test harness
ltcfset selfTestMe.cfmgt ltcfset XFA.submitForm
gt ltcfset XFA.cancelForm gt ltcfset
attributes.userID 101gt ltcfinclude
templatedspEditUser.cfmgt
71
Proving the concept
  • We all agree that your theory is crazy, but is
    it crazy enough?Niels Bohr

72
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com