Loading ...
Sorry, an error occurred while loading the content.

Re: [fusebox5] A good explanation of XFA

Expand Messages
  • John M Bliss
    http://www.fusebox.org/go/about/faq/fusebox-technical-faq#ft4 What are XFAs? - XFA stands for eXit FuseAction. XFAs are a powerful idea ... -- John Bliss IT
    Message 1 of 7 , Jun 9, 2009
    • 0 Attachment
      http://www.fusebox.org/go/about/faq/fusebox-technical-faq#ft4

      What are XFAs? - XFA stands for eXit FuseAction. XFAs are a powerful idea that compliments Fusebox. Instead of hard-coding the fuseactions, an XFA variable is used instead. The XFA variables are defined in the circuit.xml file. By using a variable to define the next fuseaction, code becomes more reusable. Also, it becomes possible to change, at runtime, what a given fuseaction will actually do.


      On Tue, Jun 9, 2009 at 9:54 AM, Brian <brian.bolton@...> wrote:


      Hey -

      I'm looking for a good explanation of XFA. eXit Fuseaction doesn't mean much to me.

      Thanks,
      Brian




      --
      John Bliss
      IT Professional
      LinkedIn: http://www.linkedin.com/in/jbliss
    • Sandra Clark
      Exit Fuseactions (xfa s) were introduced in Extended Fusebox. The idea behind them is to simply de-couple the views from the controller. By using xfa s, the
      Message 2 of 7 , Jun 9, 2009
      • 0 Attachment
        Exit Fuseactions (xfa's) were introduced in Extended Fusebox. The idea
        behind them is to simply de-couple the views from the controller. By using
        xfa's, the same xfa can point to a different fuseaction depending on how a
        view is used.

        For example

        Consider a form: Without xfa's, there is a need for a separate form for
        both updates and creates since the action of the form and possibly other
        links may go to different places. Using an xfa for the submit action, the
        xfa link the xfa points to is different depending on the action, but the
        actual view used is the same.

        HTH

        Sandra Clark

        -----Original Message-----
        From: fusebox5@yahoogroups.com [mailto:fusebox5@yahoogroups.com] On Behalf
        Of Brian
        Sent: Tuesday, June 09, 2009 10:54 AM
        To: fusebox5@yahoogroups.com
        Subject: [fusebox5] A good explanation of XFA

        Hey -

        I'm looking for a good explanation of XFA. eXit Fuseaction doesn't mean
        much to me.

        Thanks,
        Brian



        ------------------------------------

        Yahoo! Groups Links
      • John M Bliss
        This might also help: http://fusebox.org/forums/messageview.cfm?FTVAR_FORUMVIEWTMP=Single&catid=31&threadid=6556&messid=29081&parentid=29080&FTVAR_MSGDBTABLE=
        Message 3 of 7 , Jun 9, 2009
        • 0 Attachment
          This might also help: http://fusebox.org/forums/messageview.cfm?FTVAR_FORUMVIEWTMP=Single&catid=31&threadid=6556&messid=29081&parentid=29080&FTVAR_MSGDBTABLE=

          On Tue, Jun 9, 2009 at 10:00 AM, John M Bliss <bliss.john@...> wrote:
          http://www.fusebox.org/go/about/faq/fusebox-technical-faq#ft4

          What are XFAs? - XFA stands for eXit FuseAction. XFAs are a powerful idea that compliments Fusebox. Instead of hard-coding the fuseactions, an XFA variable is used instead. The XFA variables are defined in the circuit.xml file. By using a variable to define the next fuseaction, code becomes more reusable. Also, it becomes possible to change, at runtime, what a given fuseaction will actually do.


          On Tue, Jun 9, 2009 at 9:54 AM, Brian <brian.bolton@...> wrote:


          Hey -

          I'm looking for a good explanation of XFA. eXit Fuseaction doesn't mean much to me.

          Thanks,
          Brian




          --
          John Bliss
          IT Professional
          LinkedIn: http://www.linkedin.com/in/jbliss



          --
          John Bliss
          IT Professional
          LinkedIn: http://www.linkedin.com/in/jbliss
        • Mike Ritchie
          Hi Brian, XFAs are a special case of the verb, that are used in conjunction with the global myself variable to parameterize anchor URLs and form
          Message 4 of 7 , Jun 9, 2009
          • 0 Attachment
            Hi Brian,

            XFAs are a special case of the <set/> verb, that are used in conjunction
            with the global "myself" variable to parameterize anchor URLs and form
            actions so that the display fuse is more portable. Using an XFA instead
            of hardcoding a form's action for example, means that the one fuse could
            be used for a member to sign up, a member to update their own profile,
            an admin to make a new member and an admin to edit an existing member.
            The form itself would still look like <form
            action="#myself##xfa.Submit_Form#" method="post">, and the actual value
            of the form action would be stored in the controller XML where it's easy
            to follow and change. The more decision making you can do in your
            circuit.xml files means the "dumber" the programming is in your end
            fuses, which makes them as reuseable as possible.

            Simple useage:

            <xfa name="Submit_Login" value="member.login"/>
            <xfa name="Continue" value="insert"/> <!-- equates to
            "#myFusebox.originalCircuit#.insert" -->

            Advanced useage:

            <xfa name="Edit_Entry" value="editform">
            <parameter name="entryid" value=""/>
            </xfa>

            You would use the above for the following:
            <cfloop query="entries">
            #EntryTitle# <a href="#myself##xfa.Edit_Entry##EntryID#">Edit</a><br />
            </cfloop>
            which would equate to
            "index.cfm?fuseaction=somecircuit.somefuseaction&entryid=123"

            What this does is abstract the XFA even further so that among other
            benefits it is possible to switch from standard urls like the above to
            SES urls (index.cfm/fuseaction/somecircuit.somefuseaction/entryid/123)
            without needing to change a single fuse.

            Unleash the power of Fusebox!

            Mike
            www.sitegidget.com

            Brian wrote:
            >
            >
            > Hey -
            >
            > I'm looking for a good explanation of XFA. eXit Fuseaction doesn't
            > mean much to me.
            >
            > Thanks,
            > Brian
            >
            >
          • Adam Haskell
            I think there have been some really good responses here but I did want to make sure you were aware of the Wiki. It actually has a fairly well thought out entry
            Message 5 of 7 , Jun 9, 2009
            • 0 Attachment
              I think there have been some really good responses here but I did want to make sure you were aware of the Wiki. It actually has a fairly well thought out entry on XFAs:
              http://wiki.fuseboxframework.org/display/fb/XFA+Verb

              Since I felt there was some additionally good content linked to the Forums, I copied that content into a separate entry, they probably should get combined at some point:

              http://wiki.fuseboxframework.org/display/fb/Additional+Information+on+XFA



              Adam H



              On Tue, Jun 9, 2009 at 10:54 AM, Brian <brian.bolton@...> wrote:


              Hey -

              I'm looking for a good explanation of XFA. eXit Fuseaction doesn't mean much to me.

              Thanks,
              Brian


            • Brian
              Hey - Wow, thanks for all of your responses. I *get it* now :)
              Message 6 of 7 , Jun 10, 2009
              • 0 Attachment
                Hey -

                Wow, thanks for all of your responses. I *get it* now :)

                --- In fusebox5@yahoogroups.com, "Brian" <brian.bolton@...> wrote:
                >
                > Hey -
                >
                > I'm looking for a good explanation of XFA. eXit Fuseaction doesn't mean much to me.
                >
                > Thanks,
                > Brian
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.