>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

Fusebox 101: Using switch and case verbs

As part of my fusebox 101 updates I've decided to show how to use the switch and case verb in fusebox.

Fusebox 101

Here is the code you will need (you can easily spot the similarities):

[More]


Quick update to the TQL fusebox lexicon

Anyone using the TQL lexicon which a wrote about a while back should update it to use the following code:

<cfscript>
   // usage inside other verbs:    //      <transfer:parameter
   //            name="paramName"
   //            value="someVal"
   //            dataType="date" />

   if (fb_.verbInfo.executionMode is "start") {
      // validate attributes       // <parameter> must have a parent verb this lexicon:       if (structKeyExists(fb_.verbInfo,"parent") and
            fb_.verbInfo.parent.lexicon is fb_.verbInfo.lexicon and
            listFind("delete,read,save,tql",fb_.verbInfo.parent.lexiconVerb) neq 0) {

         // name - string - required          if (not structKeyExists(fb_.verbInfo.attributes,"name")) {
            fb_throw("fusebox.badGrammar.requiredAttributeMissing",
                     "Required attribute is missing",
                     "The attribute 'name' is required, for a 'parameter' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#.");
         }
         // value - string - required          if (not structKeyExists(fb_.verbInfo.attributes,"value")) {
            fb_throw("fusebox.badGrammar.requiredAttributeMissing",
                     "Required attribute is missing",
                     "The attribute 'value' is required, for a 'parameter' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#.");
         }
         // check to see if we're passing in a datatype          if (structKeyExists(fb_.verbInfo.attributes,"dataType")) {
               thisValue = '#fb_.verbInfo.attributes.value#,"#fb_.verbInfo.attributes.dataType#"';
         }
         else{
            thisValue = fb_.verbInfo.attributes.value;
         }
         // add this parameter to the parent data:          fb_.verbInfo.parent.parameters[fb_.verbInfo.attributes.name]   = thisValue;
         

      } else {

         fb_throw("fusebox.badGrammar.parameterInvalidParent",
                  "Verb 'parameter' has invalid parent verb",
                  "Found 'parameter' verb with no valid parent verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#.");

      }

   }
</cfscript>

[More]


Oh I would like to work by the sea-side

Love coldfusion, love the coast then we have the ideal job for you in Brighton, UK.

You will report to me and work on a wide range of CF based web sites

What we're looking for is an enthusiastic, experienced, self motivated web developer. With an minimum of 2 years experience ideally with a background of working with coldfusion frameworks. The role will entail development as well as specifying technical specifications, testing and deployment and some documentation.

The basic skills we are looking for are

  • ColdFusion 6+
  • SQL Server
  • Unit testing
  • CF Frameworks (fusebox, coldspring, model-glue)
  • Ajax (jQuery, Spry, Ext etc)

Any experience with server deployment & configuration, Subversion and ANT would be a big plus.

What we look for in a person:

  • Someone looking to work on the latest technologies and push the web to it's limits.
  • Good communication & writing skills
  • A solid technical background
  • Good problem solving ability
  • Flexibility

This position is based in Brighton but once you've settled in we are flexible.

That's all there is to it - please contact me succorJobBlogPost [at] talkwebsolutions [dot] co.uk

All AGENCIES will be cursed! (we do love you really).


Fusebox 101: myFusebox

Within fusebox you have access to the myFusebox CFC. This can help you get a lot of information about your fusebox app and it has some nice shortcuts to information, here are a couple I use a lot:

  • #myFusebox.originalCircuit# - returns the original circuit in the request
  • #myFusebox.originalFuseaction# - returns the original fuseaction in the request

What other do you use?

View the full list of functions on Sean Corfelds site

Fusebox 5.5 is ready for shipping

Sean Corfield has announced that fusebox 5.5 is ready for shipping and should appear on the fusebox.org website very soon.

Some of the updates in fusebox 5.5 are:

[More]

Fusebox 101: What's XFA all about?

I've just been chatting with someone about the XFA in verb for fusebox and I thought I would post my thoughts.

XFA stands for eXit FuseAction - this is where you store variables to be used in your web pages. The question here is, why use it?

Well imagine this, you have a login form that is used on your website. When a user goes to certain areas, you check to see if the user is logged in. If they are, then they will continue as normal, on the other hand they will need to login.

Being a great coder you don't want to have lots of forms all over the place, so you include one login form. This form then performs different actions depending on the what you need it to do.

[More]

Fusebox 101

I've been asked a few questions about fusebox recently and I've been happy to blog my responses but it's got me thinking, what would be nice is a fusebox 101 section. I've setup a fusebox 101 category, where I intend to post some fusebox posting with some of the more fundamental aspects of fusebox.

Fusebox 101

If you have any questions you would like to ask then please contact me and I'll post a response. In fact ask any questions and I'd be happy to answer.

To kick start check out the related posts below.

UPDATE: I'm wondering what peoples thoughts are on fusebox? Is it covered well, and what level of coverage do you think it has? Comments below please.

Different modes in Fusebox

I was asked today what the different modes in fusebox do. For those that don't know fusebox allows you to have 3 different modes (these can be changed in the fusebox.xml.cfm file).

[More]

Permissions attribute in fusebox

Here is an overview of the permissions attribute and how you can use it within fusebox.

From: http://halhelms.com/index.cfm?fuseaction=newsletters.show&issue=052203_rolesBasedSecurity

<circuit access="public" permission="useQuizBuilder">
<fuseaction name="deleteQuiz" permission="deleteQuiz">
...
</fuseaction>
Fusebox itself does not apply any security check, but does make the values set in these attributes available to the programmer. It then becomes a simple matter of a few lines of code to write any challenge code you wish. For example, we might write a plugin to ensure that to use any fuseaction in the circuit, the user must have the useQuizBuilder permission. If the user wants to delete a quiz, s/he can now be challenged for the deleteQuiz key. The rules for permission binding can be stored and gotten from database table(s), XML files, .ini files, through the use of web services, etc.

One needs to create a plug-in to check if the permission set (or permissions made available) are matched by the current user – thus (plugins/listCheckSecurity.cfm):

[More]

Want to see the first public preview of Fusebox 5.5

This Thursday (2nd August 2007) Sean Corfield will be giving the world the first preview of fusebox 5.5. To find out more, and how you can attend visit cfFrameworks.com

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.