While I'd agree that conceptually cookies and hidden fields are similar -- they both offer ways to maintain state within the confines of a stateless protocol -- I would argue that they are, in fact, different enough for separate discussion. There are RFC's for cookies that make their use much more predictable than hidden fields. And they have features like expirations that you'd have to build into a hidden fields implementation.

I'm not arguing that any one state mechanism is better or worse. But they are different. I've used them both for different situations. The advantage of good abstractions and wrappers is that they provide a consistent state-saving API regardless of the underlying method(s) used. This may be what Selena/Eric was referring to with J2EE. To my knowledge it only hides it all under a consistent API, but still uses cookies (usually) or hidden fields as the mechanism. I always throw those "encoded in the URL" state-saving methods into the same bucket as hidden fields, but one could argue that as another, distinct method with its own distinct merits. IMO, A really good API defaults to whatever is available so that there's no real dependency. i.e., if cookies are disabled use another method. Selena/Eric's knock on CGI may be that there is no such layering there. I'd argue that for that you pick a higher level abstraction.


In reply to Re: Re^3: Ignorant Article by steves
in thread Ignorant Article by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.