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

fusebox mode change when local loaded

Expand Messages
  • Phillip M. Vector
    Is there a way to do an if-then in XML to test against the IP of the connection? Something like..
    Message 1 of 13 , Nov 1, 2007
    • 0 Attachment
      Is there a way to do an if-then in XML to test against the IP of the
      connection?

      Something like..

      <cfif session.ip is '127.0.0.1'>
      <parameter name="mode" value="Development-full-load" />
      <cfelse>
      <parameter name="mode" value="Production" />
      </cfif>

      but in XML?

      Sean Corfield wrote:
      >
      >
      > In the Alpha builds, you could access the top-level variables (from
      > page scope) via myFusebox.getTopLevelVariablesScope().
      >
      > That was considered to painful to use easily so in the Public Beta,
      > it changed to simply myFusebox.variables, i.e., a plain variable
      > reference. That made it easy to use but the downside was that you
      > could no longer dump myFusebox (or variables scope in a fuse).
      >
      > In SVN, this has changed to myFusebox.variables() and that will be
      > what is in the final release on December 1st (unless anyone has a
      > better suggestion). This is still easy to use but it solves the
      > problem with dumping myFusebox and variables scope.
      >
      > If you have code based on the myFusebox.variables implementation in
      > the Public Beta, you will need to update that code when the final
      > release appears to myFusebox.variables() (or you can update from SVN
      > and make the change now).
      >
      > <cfscript>
      > // controller.cfc
      >
      > function welcome(myFusebox,event) {
      > // Alpha version:
      > // myFusebox.getTopLevelVariablesScope().something = 42;
      > // Public Beta version:
      > // myFusebox.variables.something = 42;
      > // Final version:
      > myFusebox.variables().something = 42;
      > myFusebox.do( action="hello" );
      > }
      >
      > </cfscript>
      >
      > <!--- hello.cfm --->
      > <cfoutput>
      > The answer is #something#!
      > </cfoutput>
      >
      > Sean A Corfield -- (904) 302-SEAN
      > An Architect's View -- http://corfield.org/ <http://corfield.org/>
      >
      > "If you're not annoying somebody, you're not really alive."
      > -- Margaret Atwood
      >
      >
    • Sean Corfield
      ... Not in fusebox.xml - but you can use in circuit.xml. In Fusebox 5.5, you can set parameters in index.cfm (or in Application.cfc) that override
      Message 2 of 13 , Nov 1, 2007
      • 0 Attachment
        On Nov 1, 2007, at 5:03 AM, Phillip M. Vector wrote:
        > Is there a way to do an if-then in XML to test against the IP of the
        > connection?

        Not in fusebox.xml - but you can use <if> in circuit.xml.

        In Fusebox 5.5, you can set parameters in index.cfm (or in
        Application.cfc) that override parameters in fusebox.xml (when you
        reload the fusebox).

        <cfif session.ip is '127.0.0.1'>
        <cfset FUSEBOX_PARAMETERS.mode = "Development-full-load" />
        <cfelse>
        <cfset FUSEBOX_PARAMETERS.mode = "Production" />
        </cfif>

        Note that FUSEBOX_PARAMETERS only take effect when you reload (which
        in development-full-load mode is on every request but in production
        mode on when you explicitly reload with fusebox.load=true).

        In circuit.xml, you have the <if> verbs:

        <if condition="sessio.ip is '127.0.0.1'">
        <true>
        ... some stuff ...
        </true>
        <false>
        ... some stuff ...
        </false>
        </if>

        Sean A Corfield -- (904) 302-SEAN
        An Architect's View -- http://corfield.org/

        "If you're not annoying somebody, you're not really alive."
        -- Margaret Atwood
      • Phillip M. Vector
        ... Yeah.. But will it work in 5.1? I m hesitant to take the 5.5 leap on my production servers until it s officially released (and even then, a few months
        Message 3 of 13 , Nov 1, 2007
        • 0 Attachment
          Sean Corfield wrote:
          >
          > On Nov 1, 2007, at 5:03 AM, Phillip M. Vector wrote:
          > > Is there a way to do an if-then in XML to test against the IP of the
          > > connection?
          >
          > In Fusebox 5.5, you can set parameters in index.cfm (or in
          > Application.cfc) that override parameters in fusebox.xml (when you
          > reload the fusebox).
          >
          > <cfif session.ip is '127.0.0.1'>
          > <cfset FUSEBOX_PARAMETERS.mode = "Development-full-load" />
          > <cfelse>
          > <cfset FUSEBOX_PARAMETERS.mode = "Production" />
          > </cfif>
          >

          Yeah.. But will it work in 5.1? I'm hesitant to take the 5.5 leap on my
          production servers until it's officially released (and even then, a few
          months after to fix up the bugs that will probably show up). Will I have
          to upgrade to 5.5 to do this or will fusebox_parameters.mode work in 5.1?
        • Sean Corfield
          ... No, FUSEBOX_PARAMETERS is new in 5.5. ... Have you started testing 5.5 on your dev / staging servers? If not, why not? The whole point of the Public Beta
          Message 4 of 13 , Nov 1, 2007
          • 0 Attachment
            On Nov 1, 2007, at 9:47 AM, Phillip M. Vector wrote:
            > Yeah.. But will it work in 5.1?

            No, FUSEBOX_PARAMETERS is new in 5.5.

            > I'm hesitant to take the 5.5 leap on my
            > production servers until it's officially released

            Have you started testing 5.5 on your dev / staging servers? If not,
            why not? The whole point of the Public Beta is so that folks can test
            things and make sure that bugs are found early, before the official
            release.

            If you don't test and then you find a bug in 5.5 after the official
            release, it probably won't get fixed until 5.6! If you look at the
            history of Fusebox, you'll see only a few bug fix releases have ever
            been made (in the 4.0.x timeframe).

            I've been running corfield.org and scazu.com on 5.5 builds for
            months. A large UK-based company has tested their extensive ecommerce
            system on 5.5 and found no problems. In fact, across all of the
            testing done so far, only two small edge case bugs have been found in
            the 5.5 Public Beta (and those are already both fixed in SVN - and
            the bug reporters have confirmed the fixes work).

            > months after to fix up the bugs that will probably show up). Will I
            > have
            > to upgrade to 5.5 to do this or will fusebox_parameters.mode work
            > in 5.1?

            Upgrade to the Public Beta. Test it. Find bugs. You only have
            November. After that 5.5 will be an official release and work will
            start on 5.6 which will probably be released next Summer.

            Sean A Corfield -- (904) 302-SEAN
            An Architect's View -- http://corfield.org/

            "If you're not annoying somebody, you're not really alive."
            -- Margaret Atwood
          • Seth Johnson
            I have switched over two large corporate Intranet sites, and one smaller app - no problems yet! I am now trying out the noxml features. Seth ... From: Sean
            Message 5 of 13 , Nov 1, 2007
            • 0 Attachment
               
              I have switched over two large corporate Intranet sites, and one smaller app - no problems yet!
               
              I am now trying out the noxml features.
               
              Seth
               
              ----- Original Message -----
              Sent: Thursday, November 01, 2007 2:01 PM
              Subject: Re: [fusebox5] fusebox mode change when local loaded

              On Nov 1, 2007, at 9:47 AM, Phillip M. Vector wrote:
              > Yeah.. But will it work in 5.1?

              No, FUSEBOX_PARAMETERS is new in 5.5.

              > I'm hesitant to take the 5.5 leap on my
              > production servers until it's officially released

              Have you started testing 5.5 on your dev / staging servers? If not,
              why not? The whole point of the Public Beta is so that folks can test
              things and make sure that bugs are found early, before the official
              release.

              If you don't test and then you find a bug in 5.5 after the official
              release, it probably won't get fixed until 5.6! If you look at the
              history of Fusebox, you'll see only a few bug fix releases have ever
              been made (in the 4.0.x timeframe).

              I've been running corfield.org and scazu.com on 5.5 builds for
              months. A large UK-based company has tested their extensive ecommerce
              system on 5.5 and found no problems. In fact, across all of the
              testing done so far, only two small edge case bugs have been found in
              the 5.5 Public Beta (and those are already both fixed in SVN - and
              the bug reporters have confirmed the fixes work).

              > months after to fix up the bugs that will probably show up). Will I
              > have
              > to upgrade to 5.5 to do this or will fusebox_parameters. mode work
              > in 5.1?

              Upgrade to the Public Beta. Test it. Find bugs. You only have
              November. After that 5.5 will be an official release and work will
              start on 5.6 which will probably be released next Summer.

              Sean A Corfield -- (904) 302-SEAN
              An Architect's View -- http://corfield. org/

              "If you're not annoying somebody, you're not really alive."
              -- Margaret Atwood

            • Phillip M. Vector
              ... Ok. ... Because at the rate I need to design webpages, I don t have time to fix issues that crop up. If I update and a bug that hits our servers, I don t
              Message 6 of 13 , Nov 1, 2007
              • 0 Attachment
                Sean Corfield wrote:
                >
                >
                > On Nov 1, 2007, at 9:47 AM, Phillip M. Vector wrote:
                > > Yeah.. But will it work in 5.1?
                >
                > No, FUSEBOX_PARAMETERS is new in 5.5.

                Ok.

                > > I'm hesitant to take the 5.5 leap on my
                > > production servers until it's officially released
                >
                > Have you started testing 5.5 on your dev / staging servers? If not,
                > why not? The whole point of the Public Beta is so that folks can test
                > things and make sure that bugs are found early, before the official
                > release.

                Because at the rate I need to design webpages, I don't have time to fix
                issues that crop up. If I update and a bug that hits our servers, I
                don't have the time to redo all the pages to kludge around the issue
                that 5.5 has until December.

                > If you don't test and then you find a bug in 5.5 after the official
                > release, it probably won't get fixed until 5.6! If you look at the
                > history of Fusebox, you'll see only a few bug fix releases have ever
                > been made (in the 4.0.x timeframe).

                True.. But 5.1 works fine for me currently. I don't want to mess that up.

                > I've been running corfield.org and scazu.com on 5.5 builds for
                > months. A large UK-based company has tested their extensive ecommerce
                > system on 5.5 and found no problems. In fact, across all of the
                > testing done so far, only two small edge case bugs have been found in
                > the 5.5 Public Beta (and those are already both fixed in SVN - and
                > the bug reporters have confirmed the fixes work).

                That's fine. I realize it's probably very stable. But you never know.
                I'm not in a position to take the chance that it may mess up.

                > > months after to fix up the bugs that will probably show up). Will I
                > > have
                > > to upgrade to 5.5 to do this or will fusebox_parameters.mode work
                > > in 5.1?
                >
                > Upgrade to the Public Beta. Test it. Find bugs. You only have
                > November. After that 5.5 will be an official release and work will
                > start on 5.6 which will probably be released next Summer.

                Sorry. I have to pass. If my workload slows down any, I'll consider
                running it on a virtual PC and see how the sites transfer over.
              • Phillip M. Vector
                ... Cool. Glad it s working for you. You can t be sure that I won t have an issue though. Perhaps the first time I went from 4 to 5.1, I found a bug that took
                Message 7 of 13 , Nov 1, 2007
                • 0 Attachment
                  Seth Johnson wrote:
                  > I have switched over two large corporate Intranet sites, and one smaller
                  > app - no problems yet!
                  >
                  > I am now trying out the noxml features.

                  Cool. Glad it's working for you. You can't be sure that I won't have an
                  issue though.

                  Perhaps the first time I went from 4 to 5.1, I found a bug that took
                  (what seemed to me) forever (probably only a few days) to get fixed. I
                  had to work all my sites around the issue so that it would work. I don't
                  want that headache again if I can avoid it. :)
                • Sean Corfield
                  ... Thanx Seth - that s what I like to hear :) ... I look forward to your feedback. Sean A Corfield -- (904) 302-SEAN An Architect s View --
                  Message 8 of 13 , Nov 1, 2007
                  • 0 Attachment
                    On Nov 1, 2007, at 11:16 AM, Seth Johnson wrote:
                    > I have switched over two large corporate Intranet sites, and one
                    > smaller app - no problems yet!

                    Thanx Seth - that's what I like to hear :)

                    > I am now trying out the noxml features.

                    I look forward to your feedback.

                    Sean A Corfield -- (904) 302-SEAN
                    An Architect's View -- http://corfield.org/

                    "If you're not annoying somebody, you're not really alive."
                    -- Margaret Atwood
                  • Sean Corfield
                    ... If you update a staging / dev server and hit a bug, I will make a new build available to you with a bug fix as fast as I can (for one of the bug reporters,
                    Message 9 of 13 , Nov 1, 2007
                    • 0 Attachment
                      On Nov 1, 2007, at 11:19 AM, Phillip M. Vector wrote:
                      > Because at the rate I need to design webpages, I don't have time to
                      > fix
                      > issues that crop up. If I update and a bug that hits our servers, I
                      > don't have the time to redo all the pages to kludge around the issue
                      > that 5.5 has until December.

                      If you update a staging / dev server and hit a bug, I will make a new
                      build available to you with a bug fix as fast as I can (for one of
                      the bug reporters, that was a few minutes). My IM is seancorfield on
                      AIM / Skype / Yahoo! and seancorfield@... on Gtalk and
                      seancorfield@... on MSN. If you hit me up on IM, I guarantee
                      you'll get a fast response :)

                      Besides, if you use a /fusebox5 mapping, you can install Fusebox 5.5
                      in a different directory and just switch the mapping between 5.1 and
                      5.5 so it won't take you any time to revert to 5.1.

                      > That's fine. I realize it's probably very stable. But you never know.
                      > I'm not in a position to take the chance that it may mess up.

                      Then don't complain if 5.5 comes out and you get bitten by a bug that
                      no one else found in the beta: you'll then be stuck on 5.1 until 5.6
                      comes out (assuming you actually report the bug with a test case).

                      > Sorry. I have to pass. If my workload slows down any, I'll consider
                      > running it on a virtual PC and see how the sites transfer over.

                      Frankly, I think you're making rather feeble excuses. If you have a
                      mapping for the core files, it's a five second job to switch back and
                      you've hardly lost anything.

                      Most people here are committed to the Fusebox community and are
                      prepared to take some time to help make Fusebox better. They are
                      happy to give back some of their time in return for the benefits that
                      Fusebox has brought them.

                      Sean A Corfield -- (904) 302-SEAN
                      An Architect's View -- http://corfield.org/

                      "If you're not annoying somebody, you're not really alive."
                      -- Margaret Atwood
                    • Phillip M. Vector
                      Ok.. You got me.. I m a jerk. :) I downloaded 5.5 already and doing some initial tests. I ll let you know if I run into anything. and just for the record, I
                      Message 10 of 13 , Nov 1, 2007
                      • 0 Attachment
                        Ok.. You got me.. I'm a jerk. :)

                        I downloaded 5.5 already and doing some initial tests. I'll let you know
                        if I run into anything.

                        and just for the record, I use a hosting service which doesn't allow
                        mappings. So while I can do it on my dev server, I can't on the
                        production (and I really like to have dev and production as close as
                        possible).

                        But your statements suggesting that I'm not helping the community and
                        that I won't report bugs (which I have in the past even though you
                        argued with me that I didn't know what I was talking about until I
                        provided proof).

                        See? I can be passive aggressive to. :) Have a good day Sean. Thank you
                        for fusebox and it is helpful.

                        Sean Corfield wrote:
                        >
                        >
                        > On Nov 1, 2007, at 11:19 AM, Phillip M. Vector wrote:
                        > > Because at the rate I need to design webpages, I don't have time to
                        > > fix
                        > > issues that crop up. If I update and a bug that hits our servers, I
                        > > don't have the time to redo all the pages to kludge around the issue
                        > > that 5.5 has until December.
                        >
                        > If you update a staging / dev server and hit a bug, I will make a new
                        > build available to you with a bug fix as fast as I can (for one of
                        > the bug reporters, that was a few minutes). My IM is seancorfield on
                        > AIM / Skype / Yahoo! and seancorfield@...
                        > <mailto:seancorfield%40gmail.com> on Gtalk and
                        > seancorfield@... <mailto:seancorfield%40hotmail.com> on MSN. If
                        > you hit me up on IM, I guarantee
                        > you'll get a fast response :)
                        >
                        > Besides, if you use a /fusebox5 mapping, you can install Fusebox 5.5
                        > in a different directory and just switch the mapping between 5.1 and
                        > 5.5 so it won't take you any time to revert to 5.1.
                        >
                        > > That's fine. I realize it's probably very stable. But you never know.
                        > > I'm not in a position to take the chance that it may mess up.
                        >
                        > Then don't complain if 5.5 comes out and you get bitten by a bug that
                        > no one else found in the beta: you'll then be stuck on 5.1 until 5.6
                        > comes out (assuming you actually report the bug with a test case).
                        >
                        > > Sorry. I have to pass. If my workload slows down any, I'll consider
                        > > running it on a virtual PC and see how the sites transfer over.
                        >
                        > Frankly, I think you're making rather feeble excuses. If you have a
                        > mapping for the core files, it's a five second job to switch back and
                        > you've hardly lost anything.
                        >
                        > Most people here are committed to the Fusebox community and are
                        > prepared to take some time to help make Fusebox better. They are
                        > happy to give back some of their time in return for the benefits that
                        > Fusebox has brought them.
                        >
                        > Sean A Corfield -- (904) 302-SEAN
                        > An Architect's View -- http://corfield.org/ <http://corfield.org/>
                        >
                        > "If you're not annoying somebody, you're not really alive."
                        > -- Margaret Atwood
                        >
                        >
                      • Seth Johnson
                        In my case, I could easily roll back to 5.1. Just a quick change of the mapping and I would be back to stable ground . . . If all you are concerned with is
                        Message 11 of 13 , Nov 1, 2007
                        • 0 Attachment
                          In my case, I could easily roll back to 5.1.  Just a quick change of the mapping and I would be back to "stable" ground . . .
                           
                          If all you are concerned with is switching the development mode in code, I wouldn't use that as an excuse not to upgrade . . .
                           
                          ----- Original Message -----
                          Sent: Thursday, November 01, 2007 2:21 PM
                          Subject: Re: [fusebox5] fusebox mode change when local loaded



                          Seth Johnson wrote:
                          > I have switched over two large corporate Intranet sites, and one smaller
                          > app - no problems yet!
                          >
                          > I am now trying out the noxml features.

                          Cool. Glad it's working for you. You can't be sure that I won't have an
                          issue though.

                          Perhaps the first time I went from 4 to 5.1, I found a bug that took
                          (what seemed to me) forever (probably only a few days) to get fixed. I
                          had to work all my sites around the issue so that it would work. I don't
                          want that headache again if I can avoid it. :)

                        • Sean Corfield
                          ... Thank you. See, you just needed a little persuasion :) :) ... Understood. You could put fb55 outside the webroot on the dev server and introduce a mapping
                          Message 12 of 13 , Nov 1, 2007
                          • 0 Attachment
                            On Nov 1, 2007, at 11:56 AM, Phillip M. Vector wrote:
                            > Ok.. You got me.. I'm a jerk. :)
                            >
                            > I downloaded 5.5 already and doing some initial tests. I'll let you
                            > know
                            > if I run into anything.

                            Thank you. See, you just needed a little persuasion :) :)

                            > and just for the record, I use a hosting service which doesn't allow
                            > mappings. So while I can do it on my dev server, I can't on the
                            > production (and I really like to have dev and production as close as
                            > possible).

                            Understood. You could put fb55 outside the webroot on the dev server
                            and introduce a mapping temporarily to see if everything runs fine
                            with the new cores. Whether you're comfortable upgrading production
                            or not is entirely up to you and I can understand how even if you
                            find no problems on dev, you may well want to hold off until the
                            final release. I appreciate that you're willing to test this on dev.

                            > But your statements suggesting that I'm not helping the community and
                            > that I won't report bugs

                            I didn't say you weren't / won't. I just said lots of people are :)

                            Not everyone can spare the time - I only pushed your buttons because
                            you made a big deal about the possibility of bugs in the final
                            release. None of us want that.

                            In some ways I actually hope you *do* find bugs in 5.5 because it's
                            much better to find them before the final release and I'm a bit
                            surprised that only two very minor bugs have been logged in the
                            public beta. OTOH, apart from rewriting fusebox5.cfm to use
                            Application.cfc, I have tried really hard not to mess with any of the
                            core FB51 code. Nearly all of the FB55 stuff is additional code that
                            addresses new features.

                            Again, thank you!

                            Sean A Corfield -- (904) 302-SEAN
                            An Architect's View -- http://corfield.org/

                            "If you're not annoying somebody, you're not really alive."
                            -- Margaret Atwood
                          Your message has been successfully submitted and would be delivered to recipients shortly.