CFCs and CLIENT Variables

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default CFCs and CLIENT Variables

    Okay, so our website uses CFCs for the customer's shopping cart. We
    instantiate a copy of a Cart CFC object and store it in SESSION.Cart. We use
    SESSION variables throughout the site so that as soon as the user closes their
    browser, they're considered logged off. But we're re-thinking this scheme and
    might want to keep them logged in forever (unless they manually logout). My
    question is: Will it be possible to change my code so that the Cart object
    is stored in CLIENT.Cart instead? Questions that came up in my mind: Will I
    have to manually serialize/deserialize the entire object to and from WDDX each
    time I need to access it? Would I be better off just using a CLIENT variable to
    indentify the customer as being logged in, and then make sure that SESSION.Cart
    always exists for them as long as they don't log themselves out of the site?
    Thanks!

    Cannikinn Guest

  2. Similar Questions and Discussions

    1. PROBLEM WITH CLIENT VARIABLES - PLEASE HELP!
      What does the error - A800 UNDEFINED IN CLIENT mean? We seem to be getting this error on certain pages. The mysterious thing about it is that this...
    2. Client Variables Error
      Can someone advise action to take for: "Operation failed on the data source named "CliVars". Reason of failure "Invalid precision value " We are...
    3. Client Variables
      Help Needed, Can any one please explain why do we loose client variables when we delete cookie variables from the browser ?
    4. Client Variables in different case
      We are using ColdFusion 5 and ColdFusion MX 6.1 in production use where 5 are the main server and version 6.1 are used for very specific events. ...
    5. Client system variables
      Hi! I'd like to get some system variables via web pages from CLIENT machines. Does anyone know any script that would do? Thank you!
  3. #2

    Default Re: CFCs and CLIENT Variables

    Bump!
    Cannikinn Guest

  4. #3

    Default Re: CFCs and CLIENT Variables

    CFC's can't be in the client scope. I believe if you do, you just get a string
    that is a reference to the pointer for the original object. I think in MX 7,
    clustered mx servers can serialize CFC's, but I think this is just for
    Enterprise version's. You're probably best off using the client scenario to
    keep the user logged in. and then have the cfc as a session var. Although
    you'd need to persist the actual cart data somehow, which you'd probably wind
    up doing in other client vars. So when the user comes back in a few days, you
    can read the data that is supposed to be in their cart and create the
    session.cart and populate it.

    byron1021 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139