Presentation is loading. Please wait.

Presentation is loading. Please wait.

Brian Kotek INDUS Corporation

Similar presentations


Presentation on theme: "Brian Kotek INDUS Corporation"— Presentation transcript:

1 Brian Kotek INDUS Corporation
Fusebox 101 Brian Kotek INDUS Corporation Fusebox Conference Brian Kotek

2 Goals for the next 45 Minutes
Crash course in Fusebox Concepts and definitions Discuss the XML configuration files Walk through a very simple Fusebox request A more complex example Quick Overview of FLiP Q & A Fusebox Conference Brian Kotek

3 What is Fusebox? Fusebox is a framework for building web-based applications. Free downloadable set of “core files” at fusebox.org that implement the framework. Does a lot of the grunt work for you under the hood, so you can concentrate on creating maintainable applications that meet customer requirements. Fusebox Conference Brian Kotek

4 Benefits of Fusebox Code reuse Team development Easier maintenance
Easier testing Separation of business logic from presentation Vibrant community Fusebox Conference Brian Kotek

5 Concepts and Definitions
Fusebox Conference Brian Kotek

6 Starting Small: The Fuse
A fuse is the basic building block of a Fusebox application. A fuse is an individual code file. 3 typical types: action, query, display. Typically prefixed with “act”, “qry”, “dsp”. Examples: qry_getNews.cfm dsp_news.cfm Fusebox Conference Brian Kotek

7 The Fuseaction Users call fuseactions not fuses.
A fuseaction is made up of one or more fuses. Fuseaction “showNews” could run fuses qry_getNews.cfm and dsp_news.cfm. Fuseactions can be requested by users via URL or form posts by passing a variable called fuseaction. Fusebox Conference Brian Kotek

8 Circuits: Related Fuseactions
Circuits are logical associates of related fuseactions. Circuits map to a directory. Could have a “queries” circuit that holds fuseactions related to database queries. Could have a “display” circuit that holds fuseactions related to outputting HTML. Good circuits have internal consistency. Good circuits are self-contained. Fusebox Conference Brian Kotek

9 Circuit-Qualified Fuseactions
news.showNews A fuseaction with the format “news.showNews” is a “circuit-qualified fuseaction”. “news” is the circuit being called. “showNews” is the fuseaction within the circuit “news” that is being called. Fusebox Conference Brian Kotek

10 Using Circuit-Qualified Fuseactions
URL: index.cfm?fuseaction=news.showNews Form: <form action=“index.cfm” method=“post”> <input type=“hidden” name=“fuseaction” value=“news.showNews”> </form> Fusebox Conference Brian Kotek

11 Key Concepts Reviewed Fuse: an individual code file, written in CFML (or PHP script, etc.) Fuseaction: executes one or more fuses to fulfill a specific requirement. Circuit: logical group of fuseactions Circuit-qualified fuseaction: news.shownews Fusebox Conference Brian Kotek

12 The XML Configuration Files
Fusebox Conference Brian Kotek

13 Fusebox.xml Central configuration file (1 per app). Written in XML.
Define your circuits. Set other application-level items like global fuseactions (run on every request automatically), plugins, etc. Fusebox Conference Brian Kotek

14 Circuit.xml 1 per circuit (an app may have many)
Define the fuseactions that the circuit is responsible for: <circuit> <fuseaction> … </fuseaction> </circuit> Within the fuseaction element, define what it does using XML verbs. Fusebox Conference Brian Kotek

15 Primary XML Verbs Fuseactions often include one or more fuses: <include template=“dsp_showNews.cfm”/> Fuseactions can also call other fuseactions: <do action=“queries.getNews”/> Fusebox Conference Brian Kotek

16 A Few More XML Verbs <set>: sets a variable <if>: performs true/false test <loop>: runs a conditional loop <relocate>: forwards user Relatively basic, encourages you to perform complex logic in fuses. Fusebox Conference Brian Kotek

17 Parsed Files XML doesn’t do much on its own.
At runtime, the core files read the XML and generate parsed files. The parsed files are actual code. Typically one parsed file for each fuseaction that a user can call. Fusebox Conference Brian Kotek

18 Fusebox Execution Timeline
User requests a circuit-qualified fuseaction. Core file copies all FORM and URL variables into ATTRIBUTES scope. Core file looks up target circuit. Core file looks up fuseaction within target circuit. Core file generates a parsed file from circuit XML. Core file executes parsed file corresponding to the requested fuseaction. Fusebox Conference Brian Kotek

19 Our First Fusebox Request
Fusebox Conference Brian Kotek

20 A Composite Layout Fusebox Conference Brian Kotek

21 FLiP Fusebox Lifecycle Process Development methodology
Central tenant: “Users can’t tell you what they want until they see it.” To client, the interface IS the application. Fusebox Conference Brian Kotek

22 FLiP Stages Wireframe (text-based skeleton)
Prototype (complete interface) Signoff Architecture (fusedocs, etc.) Coding and Testing Fusebox Conference Brian Kotek

23 Questions? Fusebox Conference Brian Kotek


Download ppt "Brian Kotek INDUS Corporation"

Similar presentations


Ads by Google