Prelude to Fusebox The Basics: - Variable scopes: session/client/application/request/attributes/caller Custom Tags URLToken.

Slides:



Advertisements
Similar presentations
Welcome to WebCRD.
Advertisements

SharePoint Forms All you ever wanted to know about forms but were afraid to ask.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
M2 – Explain the tools and techniques used in the creation of an interactive website. By Arturas Vitkovskij.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Error Handling With Fusebox Presentation By Eron Cohen.
XHTML & CSS 2 By Trevor Adams. Last week XHTML eXtensible HyperText Mark-up Language The beginning – HTML Web Standards Concept and syntax Elements (tags)
DT228/3 Web Development Databases. Database Almost all web application on the net access a database e.g. shopping sites, message boards, search engines.
Chapter 4 Planning Site Navigation Principles of Web Design, 4 th Edition.
There is a certain way that an HTML file should be set up. The HTML section declares a beginning and an ending. Within the HTML, there should be a HEAD.
ASP.NET Programming with C# and SQL Server First Edition
UNIT-V The MVC architecture and Struts Framework.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
CST JavaScript Validating Form Data with JavaScript.
Login Screen This is the Sign In page for the Dashboard Enter Id and Password to sign In New User Registration.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Cookies Set a cookie – setcookie() Extract data from a cookie - $_COOKIE Augment user authentication script with a cookie.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Login Screen This is the Sign In page for the Dashboard New User Registration Enter Id and Password to sign In.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
FPDS- NG Reports Overview December 16, Today’s Goals Provide an overview of the FPDS-NG reporting capability Demonstrate each of the reporting tools.
Prelude to Fusebox Prerequisite Understanding: / Variable scopes: session/client/application/request/attributes/caller Custom tags URLToken If you don’t.
SqlReports Dean Dahlvang PSUG-MO March About Dean Dean Dahlvang Director of Administrative Technology for the Proctor.
More on Fusebox at Fusebox Development Methodology : More on Fusebox at Fusebox Development Methodology.
SYST Web Technologies SYST Web Technologies Lesson 6 – Intro to JavaScript.
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
SHOPPING CARTS CHAPTER 19. E-COMMERCE Typically, an e-commerce site will have public pages and admin pages.
HTML Hyper Text Markup Language A simple introduction.
Creating Tables in a Web Site
Chapter 8 Cookies And Security JavaScript, Third Edition.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
1.NET Web Forms Business Forms © 2002 by Jerry Post.
Methods and Models Choice of methods for Development of IT related products and systems SVINGSVING Conference held in Gothenburg, Sweden, October 2000.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
More on Fusebox at Fusebox 3 Development Methodology : Fusebox 3.0 With thanks to David Laing, Hal.
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
BlackBox Methodology A means of creating efficient and flexible reusable ColdFusion code.
Algorithms  Problem: Write pseudocode for a program that keeps asking the user to input integers until the user enters zero, and then determines and outputs.
1 Resperate Order Process Analysis & Recommendations. October 2006 Version 1.
9/16/2000 Nat Papovich – Putting It All Together Putting It All Together: Developing Web Applications Using Fusebox and Frames Presented by Nat Papovich.
Building Fusebox Frameworks Jeff Peters
Fusebox Conference 2001 Out with the old in with the new An introduction to Fusebox 3.0 for current Fusebox developers By Erik Voldengen
Registration Solutions for your Event Management.
CSCI 6962: Server-side Design and Programming JSF DataTables and Shopping Carts.
CS 149 Advance Perl Final Project Implementing an E-commerce shopping cart using cookies Presented by Dzung Tran.
BEHAVIOR DRIVEN TEST DEVELOPMENT Specification by Example.
Advanced Fusebox: Securing a Fusebox Application By Steve Nelson SecretAgents.com.
1 FUSEDOC: AN EMERGING STANDARD Make everything as simple as possible, but not simpler. -Albert Einstein.
 Shopping Basket  Stages to maintain shopping basket in framework  Viewing Shopping Basket.
COMP3241 E-Commerce Technologies Richard Henson University of Worcester November 2014.
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
The Need for Speed! Steve Nelson. Internet Startup Failure 2000 More Internet startups failed this year than ever before Why did this happen? How can.
Review of HTML and CSS A (very) brief review of some key fundamentals to be aware of in IT-238.
Building CF Applications with Fusebox Steve Nelson CTO, Zero-G Commerce, Inc. member, Team Allaire Chairman of Fusebox.org.
Navigation: If the tutorial opens up in your web browser, simply click your mouse to advance to the next slide. Use the “Backspace”
CF_Underground III 1 Architecting Applications with Mindmapping Tools Can anything save me time when designing an application? How can my visual brain.
Fusebox Not Just For Breakfast Anymore! An Introduction to Fusebox Author: Fred T. Sanders, Instant Knowledge Some Content unscrupulously taken from Steve.
We Behatin’. INTRODUCTION Behat background 3 Behat prep Getting started
Using Structures With CFCs By Selene Bainum. June 27 th - 30 th 2007www.cfunited.com Why Am I here? Familiar with structures Familiar with ColdFusion.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
HTML Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag). td stands.
World of Wokcraft The very best in Single pan cooking themed fantasy gaming!
JavaScript, Sixth Edition
Programming Logic and Design Seventh Edition
In this session, you will learn to:
Algorithms Problem: Write pseudocode for a program that keeps asking the user to input integers until the user enters zero, and then determines and outputs.
Cookies BIS1523 – Lecture 23.
Brian Kotek INDUS Corporation
Grocery Store Outline csc242 – web programming.
Presentation transcript:

Prelude to Fusebox The Basics: - Variable scopes: session/client/application/request/attributes/caller Custom Tags URLToken

Fusebox Changes The World! How lazy coders make big bucks By Nat Papovich With help from Hal Helms and Steve Nelson

The situation with web application development these days... Skilled craftspeople are needed to create the product. Each product is a unique work of its creator. There is a shortage of skilled workers. There is a wide variation in the quality of finished goods. Maintenance of our products require the user to go back to the creator or to employ the skills of a highly-paid master craftsperson. There is no ability to interchange parts from one product to another. There is very limited division of labor. There is no efficiency of scale: it takes 10 times as long to produce 10 products.

A CF Programmer’s Dream World... Imagine if…. You could work in a team of developers and have all the code look like it was written by single person. You could understand the structure of your co-workers code in 5 minutes, without asking questions. You could concentrate on solving the problem instead of thinking about how to write the application. Nice, huh?

Why use a Structured Architecture? File based applications get messy. A structured architecture helps to clean this up. Multiple person development is more easily facilitated – without stepping on toes. If your structure is clearly defined, your application documents itself. You only focus on the client’s problem instead of the application’s architecture.

What is Fusebox? Fusebox is: A structured application architecture for building web applications, primarily using ColdFusion. A methodology of coding so you can use others’ labors without feeling guilty - as if you ever did. An open-source project, created by the ColdFusion community for the ColdFusion community. Quick to learn. Adopt as much or as little as you want. Flexible and extensible. There is no Fusebox Gestapo to make sure you followed all the rules. Free.

Before You Write Any Code Talk to the client about general ideas, business requirements and specifications. With the client on-hand, write down these ideas into a loose specification. Better yet, have him/her do it. Create a tight specification from the loose specification. Figure out all the sections of the application and all the actions required to do everything the client wants the application to do. Repeat this process until every action in the application is understood by everyone involved. Write a Fusedoc for the application from these use-case scenarios.

Create the Directory Structures Use the tight specification to figure out all the sections of the application. Each section is given its own directory; these sections are known as “Circuit Applications”. A circuit application is a section of the overall home application. Examples:

Create the Index.cfm Files Every directory (circuit application) has one index.cfm file. Index.cfm controls all the Fuseactions of that circuit application. It is the Fusebox. All links and form submissions go to the index.cfm. It is a single statement with multiple statements. Each is a different Fuseaction.

Fusebox Anatomy: the Fusebox (index.cfm) Fusebox <cfparam name=“fuseaction” Default=“login”>....

The Fusebox Architecture This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to. dsp_UserLogin.cfm Fusebox

The Fusebox Architecture Fusebox This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to.

Create the Fuseactions A Fuseaction is made up of one or more.cfm files. Determine what types of files (display/action/query) are needed to create each Fuseaction. Create a CFCASE statement for each Fuseaction and CFINCLUDE each necessary file.

Conventions, Extensions, and Rules File Naming Conventions Fusedocs

File Naming Convention (Fuses) app_globals.cfm - Global variables, one per Home application app_locals.cfm - Local variables, one per Circuit application dsp_filename.cfm - Display files act_filename.cfm - Action files qry_filename.cfm - Query files

Fusedoc: A Documentation Standard A Fusedoc outlines responsibilities, customizations, and expectations. A Fusedoc is a collection of Fusecards which are granular to the actions and steps of the application. A Fusecard contains the following elements: Fusename Responsibilities (hopefully non-technical, in plain English) Author / Coder Variables list (incoming, outgoing, and persistent)

Fusedoc Legend --> explicitly passed incoming parameter <-- explicitly passed outgoing parameter pass-thru parameter (unchanged) ++> existing persistent parameter (session, client, etc.) <++ created persistent parameter +++ included file [parameter] indicates optional Examples: --> CurrentUser: a WDDX STRUCTURE <-- [badLogin]: a STRING <++ Session.ColorChoice: a STRING (Red|Blue) UserID: an INTEGER +++ myGlobals.cfm

Sample Fusecard / Fusestub <!-- dsp_UserLogin.cfm Author: --> <!---FUSEDOC || Responsibilities: I make sure that the UserName and Password match what’s in the TableName table. If so, I let the person pass with a parameter of UserAuth set to “yes”. If not, I send the user back to the Fusebox with BadLogin set to “yes”. || FuseStub: Approved: Edits: || <-- [BadLogin]: variable sent if user tried to login unsuccessfully <-- [UserAuth]: on success, a STRING value set to “yes” --> UserName: a STRING indicating the user’s name --> Password: a STRING indicating the user’s password --> DSN: a STRING of the ODBC datasource name to use to verify --> TableName: a STRING of the table name to use to verify END FUSEDOC--->

What’s in a Fuse? 1. Fusedoc 2. [HTML] 3. Code The perfect fuse is small and has a very narrow focus.

Create the Necessary Files (Fuses) All links and forms in the display files should point to one of the index.cfm files in the application, never to the specific dsp or act files. All links and forms must specify which Fuseaction they point to. A hint now, for advanced Fusebox techniques: Use the “attributes” scope instead of form/url scope. This allows you to call the index.cfm file as a custom tag.

Fusebox Anatomy: a fuse A Fuse <!-- dsp_UserLogin.cfm Author: --> <!---FUSEDOC – blah blah blah (Hal likes his Fusedocs) END FUSEDOC---> <input type=“hidden” name=“fuseaction” value=“FormAction1”> Name: Password: I am a fuse …

Putting it all Together One home application is made up of many smaller circuit applications. One circuit application is made up of a directory of files. Each circuit must contain an app_locals.cfm and index.cfm file plus other display/action/query files as Fuses. One index.cfm file is made up of one or more Fuseactions. One Fuseaction includes one or more display/action/query files plus any necessary CFML logic.

Extending Fusebox ? Fusebox Circuits ? ? ? UserManager ShoppingCart CompanyInfo This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to. This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to. This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to. This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to. This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to. This is Meant to Be Just text That isn’t Clear. I hope It works the Way I want It to.

Building A Fusebox Shopping Cart Display Fuses showCartSummary showCatalog showItem Action Fuses addItemToCart removeItemFromCart clearCart

The Shopping Cart Array Implement shopping cart as 2d array itemIDquantitydescriptionprice 21052ColdFusion To Go Fusebox Essentials 99.99

The Cart Summary page <!-- dsp_CartSummary.cfm Author: --> <!---FUSEDOC || Responsibilities: I show the contents of the user’s shopping Cart. || Edits: || ++> session.shoppingCart: a 2D ARRAY with columns of itemID, quantity, description, price <-- [itemID]: a PK from Items table END FUSEDOC--->

The Catalog page <!-- dsp_Catalog.cfm Author: --> <!---FUSEDOC || Responsibilities: I show the contents of the Items table to the customer, letting them examine an item or buy it. || Edits: || --> request.DSN:a valid ODBC DATASOURCE <-- [itemID]: a PK from Items table <-- quantity: an INTEGER END FUSEDOC--->

The Item page <!-- dsp_Item.cfm Author: --> <!---FUSEDOC || Responsibilities: I show the details of a particular item to the customer hoping they’ll buy it. || Edits: || --> request.DSN:a valid ODBC DATASOURCE --> itemID:a valid PK from Items table <-- [itemID]: a PK from Items table <-- [quantity]: an INTEGER END FUSEDOC--->

Adding an item to the cart <!-- act_addItem.cfm Author: --> <!---FUSEDOC || Responsibilities: I add an item to the cart. If I already have one of these items in my cart, I’ll just increment the value. || Edits: || --> itemID:a valid PK from Items table --> quantity: an INTEGER --> request.dsn:a valid ODBC DATASOURCE ++> session.shoppingCart: a 2D ARRAY with columns of itemID, quantity, description, price END FUSEDOC--->

Removing an item from cart <!-- act_removeItem.cfm Author: --> <!---FUSEDOC || Responsibilities: I remove an item from the cart. If I have more than one of these items in my cart, I will just decrement the value. || Edits: || --> itemID:a valid PK from Items table ++> session.shoppingCart: a 2D ARRAY with columns of itemID, quantity, description, price END FUSEDOC--->

Clearing the cart <!-- act_clearCart.cfm Author: --> <!---FUSEDOC || Responsibilities: I remove all items from the cart || Edits: || ++> session.shoppingCart: a 2D ARRAY with columns of itemID, quantity, description, price END FUSEDOC--->

The Fusebox – index.cfm <cflocation url=“index.cfm?fuseaction=cartSummary.cfm”

App_Locals.cfm

App_Globals.cfm

Congratulations! That’s all there is to Fusebox. Not too scary, eh?

Current Enhancements to Vanilla Fusebox Application.cfm Return fuseactions Exploded Benchmarking for 4.01 HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Debug String Value: WriteExplodedBenchmarkingInfo=1

Conclusion: Why use Fusebox Fusebox is (most likely) very similar to how you may already build an application, thus it will be easy to learn. It is a well thought out process, and will continue to be improved by the CF community. It’ll save you time, which will save you money. Cut-n-paste your way into completed applications. (No, really. I’m serious!) Most importantly it will prevent hair loss.

Fusebox Resources Somewhat dated white paper Fusebox mailing list Fusebox primers Source code for using Fusebox and frames happily