Transcript Document

An Introduction to XFB

XFB

There's a fine line between genius and insanity. I have erased this line.

Oscar Levant

1

An Introduction to XFB

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.

2

An Introduction to XFB

70% Failure 3

An Introduction to XFB

Time Expended

Nike Method

4

An Introduction to XFB

Time Expended

Extended Fusebox Method

5

An Introduction to XFB

Main Points of XFB

  Project Management – – – wireframes prototypes devnotes Technical – – – – – – – xfas fusedocs nested circuits nested layouts query sims security assertions

6

An Introduction to XFB

Wireframe 7

An Introduction to XFB

8 Wireframe

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

An Introduction to XFB

Wireframe

 The wireframe is a skeleton-model of an application.

 It is meant to help clients and developers discuss what an application should do.

9

An Introduction to XFB

Wireframe 10

An Introduction to XFB

Wireframe 11

An Introduction to XFB

Wireframe

 Download available at www.bjork.net

12

An Introduction to XFB

Prototype w/DevNotes 13

An Introduction to XFB

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"..."

An Introduction to XFB

Is this what they want?

15

An Introduction to XFB

Is this what they want?

16

An Introduction to XFB

Is this what they want?

17

An Introduction to XFB

Is this what they want?

18

An Introduction to XFB

Is this what they want?

19

An Introduction to XFB

THIS is what they want!

20

An Introduction to XFB

Why the prototype?

 Clients can only tell you what they want

after they see it

21

An Introduction to XFB

What is the prototype?

22

An Introduction to XFB

Leaving no "wiggle room" 23

The prototype The deployed application

An Introduction to XFB

24 An iterative process

  The wireframe forms the basis for the first cut of the prototype Prototypes have minimal code —and are often best handled by non-programmers  The prototype is refined through interaction with client and developer using DevNotes

An Introduction to XFB

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

25

An Introduction to XFB

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."

26

An Introduction to XFB

27 What are DevNotes used for?

 Developer self-notes: "Use JavaScript for client processing of this procedure"

An Introduction to XFB

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

An Introduction to XFB

Fusebox architecture 29

An Introduction to XFB

Unplanned program flow

Module A Module B Module F Module E Module C Module D

30

An Introduction to XFB

Architected program flow

Module F Module C Module E

31

Module A Module D Module B

An Introduction to XFB

A Fusebox request

validateLogin

the fuseaction

Fusebox

the fusebox

loginUser validateLogin newUser

fuseactions

qryValidateLogin.cfm

actValidateLogin.cfm

fuses

32

An Introduction to XFB

33 Fuses always make requests of the fusebox

a fuse

Fusebox

the fusebox

An Introduction to XFB

34 The fusebox copies all URL and form variables into attributes scope

url.productID = 1027 form.lastName = ‘Helms’ attributes.productID = 1027 attributes.lastName = ‘Helms’

An Introduction to XFB

The fusebox

The fusebox

35

An Introduction to XFB

Fuseactions

 The fuseaction is the motivating force in an application.  Suggestion: use name is form of

verb

NounPhrase such as: –

add

ItemToCart – getUserInfo – showProductInfo

36

An Introduction to XFB

The fusebox

….

The fusebox

37

An Introduction to XFB

Including a fuse

The fuseaction

“doSomething” ….

The fusebox

38

aFuse.cfm

anotherFuse.cfm

yetAnotherFuse.cfm

The fuses

An Introduction to XFB

Nested circuits 39

An Introduction to XFB

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

40

An Introduction to XFB

XFB nested circuits 41

An Introduction to XFB

Conflicting circuit names 42

An Introduction to XFB

Resolving circuit naming conflicts

 Create a Circuits.cfm file  Alias name conflicts bpcf/completed/circuits.cfm

43

An Introduction to XFB

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

44

An Introduction to XFB

Inheritance

45

An Introduction to XFB

Bubbling exceptions

 Lets architect determine where certain exception types will be handled  Lets coder write fuses without worrying about handling certain classes of exceptions

46

An Introduction to XFB

Example: Bubbling exceptions

47

An Introduction to XFB

XFAs 48

An Introduction to XFB

49 XFAs

 A typical Fusebox 2 page has fuseactions hardcoded in place.

 Examples: –

An Introduction to XFB

50 XFAs

 XFAs are variables that lets fuseactions be resolved at run time  Examples – –

An Introduction to XFB

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

An Introduction to XFB

Identifying XFAs 52

An Introduction to XFB

Assigning values to XFAs

        Login XFA.submitForm  validate

User

Login Login Validation XFA.success  showMainCatalogPage Product Detail XFA.buyItem  addItemToCart Cart XFA.adjust quantities  adjustCartQuantities Cart XFA.removeItem  removeItemFromCart Registered User XFA.editInfo  edit

User

Info Registered User XFA.saveInfoUpdate  save

User

Admin Page XFA.newUser  new

User

Identifying common nouns

53

An Introduction to XFB

Identifying circuit and fuseaction 54

An Introduction to XFB

Identifying needed fuses 55

An Introduction to XFB

Fusedoc 56

An Introduction to XFB

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

57

An Introduction to XFB

Nested layouts 58

An Introduction to XFB

tag

 Used to capture the output of code and save as a request-scoped variable  Replaced in ColdFusion release 5 with

59

An Introduction to XFB

Example

I am the left side I am the right side

60

An Introduction to XFB

Example

#request.me#

XMLSpy/FD4 validateLogin.cfm

61

An Introduction to XFB

Nested layouts

 Nested circuits Parent Child GrandChild

62

UKDAXF/SampleFB3/

An Introduction to XFB

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

An Introduction to XFB

64 Implementing nested layouts

 Wrap the code in index.cfm with (version 5) or (version 4) using the circuit's alias as the name of the variable 

(Illustration next)

An Introduction to XFB

Implementing nested layouts

I am the #GetDirectoryFromPath( GetCurrentTemplatePath())# fusebox and I received a fuseaction called "#attributes.fuseaction#" that I don't have a handler for.

65

An Introduction to XFB

Implementing nested layouts

 If the child is to display something, call the layout file after the tag

66

An Introduction to XFB

Query sims 67

An Introduction to XFB

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

68

An Introduction to XFB

Test harnesses

 Provides an easy-to-implement way of unit testing fuses  Should accompany all completed fuses

69

An Introduction to XFB

Example: test harness

70

An Introduction to XFB

Proving the concept

We all agree that your theory is crazy, but is it crazy enough?

Niels Bohr

71

An Introduction to XFB

72