1 / 10

"Plug it in, Plug it in" Glade Tidings of Plugins in Fusebox 4

"Plug it in, Plug it in" Glade Tidings of Plugins in Fusebox 4. John Quarto-vonTivadar Future Now, Inc johnq@futurenowinc.com. What is a Plugin?. developers often need to extend the functionality of Fusebox the real question: is this for a particular Fusebox app or all Fusebox apps?

kalani
Download Presentation

"Plug it in, Plug it in" Glade Tidings of Plugins in Fusebox 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. "Plug it in, Plug it in"Glade Tidings of Plugins in Fusebox 4 John Quarto-vonTivadar Future Now, Inc johnq@futurenowinc.com

  2. What is a Plugin? • developers often need to extend the functionality of Fusebox • the real question: is this for a particular Fusebox app or all Fusebox apps? • for particular Fusebox, solution is a fuseaction and its associated fuses • for all Fusebox apps, solution is core mod • Plugins: middle ground. Non app specific functionality yet not common to all Fuseboxes

  3. Thought Experiment #1 • suppose users are required to log in to a app • option: modify the core file • what if next app doesn't need authentication? • "log in" is a business rule of the project, • business rules have nothing to do with core files • Therefore we need a fuseaction (and possibly a circuit?)

  4. Thought Experiment #2 • suppose related login fuseactions are grouped together in a circuit "Security" • how does FB know what to do with a circuit? • how circuits (and their FAs) are accessed are not specific to a particular app – all FB apps need to be able to access circuits • a general requirement requires an abstract solution

  5. Thought Experiment #3 • suppose when an exception occurs an email should be sent to the administrator • Two parts: • part 1: send an email . • A business rule! • should be a fuseaction • not all apps send emails • part 2: handle an exception • all apps need some way to handle exceptions • what we need is ….. a Plugin!

  6. Therefore… • Plugins occupy the solution space between a functional requirement for your app versus available functionality for every app

  7. Plugin Points • preProcess • preFuseaction • postFuseaction • fuseactionException • postProcess • processError

  8. Now you try: • suppose you wanted to load a file "Constants" each request – where would it go? • You decide against normally logging procedures and instead want to write your own – where would this go? • what about users who request a non-existant fuseaction? how would that be handled? • You decide to check the permissions accorded a user before executing some functionality – where would this go?

  9. Example Plugin section of Fusebox.xml <plugins> <phase name="preProcess"> <plugin name="GlobalSettings" template="Globals.cfm" /> </phase> <plugins>

  10. Sharing Plugins • If plugins are properly written, they can work with all FB4 apps no matter what other plugins may also be in use • visit www.fusebox.org for a growing library of publicly available plugins

More Related