Presentation is loading. Please wait.

Presentation is loading. Please wait.

BlackBox Methodology A means of creating efficient and flexible reusable ColdFusion code. www.cfblackbox.com.

Similar presentations


Presentation on theme: "BlackBox Methodology A means of creating efficient and flexible reusable ColdFusion code. www.cfblackbox.com."— Presentation transcript:

1 BlackBox Methodology A means of creating efficient and flexible reusable ColdFusion code. www.cfblackbox.com

2 Personal Info -Dan Chick Web programmer since 1994 Founder of FastCart Corp. (www.fastcart.com)www.fastcart.com Founder of Webkit Inc. (www.webkit.com)www.webkit.com Creator of BlackBox Methodology Published CF author, Allaire.com, CFDJ Ran Twin Cities CFUG for 3 years Semi-pro photographer and musician dan@webkit.com

3 The State of 1999 Fusebox (www.fusebox.org)www.fusebox.org Difficult to nest modules/applications Unattractive URLs Often difficult to customize the output I created techniques to address these but they were awkward and difficult I wanted a better way that addressed all of these issues. Enter BlackBox….

4 What’s in a Good Methodology? Separates brains from beauty Re-use of code Flexible code Attractive URLs Ability to make different modules interact Lets you code in your own style while still allowing you to share code with others Simple to learn and employ

5 Why BlackBox? Developers say… Abstraction of functionality A high level of code re-use A tremendous increase in development speed Enhanced flexibility and extensibility A thought process leading to an ease of development Rapid prototypes Compartmentalization of code Easy knowledge transfer Portability and openness Confidence in existing modules

6 Coding in BlackBox Learn the concept Get blackbox.cfm (Optional) Get starter modules from cfblackbox.com Start coding

7 Technical Aspects It’s all about how your organize your files Web Root (folder, can access modules) Blackbox (folder) Forums Guestbook Users Blackbox.cfm Directory1 (folder, can access modules) Blackbox.cfm Directory2 (folder, can access modules) Blackbox.cfm Directory3 (folder, can NOT access modules)

8 Or… Custom Tag Folder Custom Tags Blackbox (folder) Forums Guestbook Users Blackbox.cfm Web Root (folder, can access modules) Directory1 (folder, can access modules) Directory2 (folder, can access modules) Directory3 (folder, can access modules)

9 How To Call Blackbox OR (more on packages in a second…)

10 Interview with the Module bbsettings.cfm Form_add_message.cfm Display_messages.cfm Action_add_message.cfm These can be coded in ANY STYLE YOU WANT!!!

11 Techniques: bbsettings.cfm I put a file called bbsettings.cfm in the Blackbox root folder Contains functions and settings I want to share to all modules Another file in each module called bbsettings.cfm that includes../bbsettings.cfm My blackbox.cfm file checks to see if this file exists in module folder and includes it. Think of this as a sort of an application.cfm for one or more modules

12 Techniques: application.cfm Certain variables can be shared if they are established in the scope of the entire app Request.datasource, request.username, request.password Application.site_root, application.site_directory

13 Inheriting settings… …if you want #attributes.datasource# - uses passed value OR request value as default OR is empty #attributes.user_guid# - uses passed value OR url value OR form value OR session value OR is empty

14 Packages - Overview All pages link to attributes.nextpage attributes.nextpage default value is cgi.script_name Each page exit action (link, form) passes another variable (module_action) One ‘package’ action within the folder is the only action called. It uses module_action to access the right files Modules can be called as packages OR as standalone actions

15 Packages - Anatomy

16 Illustration of Time Saved ColderFusion 50 minutes including design User and user profiles Content Links File Repository Forums

17 The developing community www.cfblackbox.com Forums File sharing area White papers Developer Profiles Mailing List http://groups.yahoo.com/group/cfblackbox/

18 Some sites running BlackBox www.flashmn.com www.darktwincities.com www.colderfusion.com www.cfblackbox.com www.pinhole.org www.photosmack.com

19 Questions…..


Download ppt "BlackBox Methodology A means of creating efficient and flexible reusable ColdFusion code. www.cfblackbox.com."

Similar presentations


Ads by Google