I also was having a bit of trouble following your post, but it sounds to me like the "ah-ha" for you is the idea that an object is something separate from its representation - whether that representation be JSON, relational database tables, a Moose object, or a standard Perl object. By turning storage into yet another role, Moose has given you the ability to mentally decouple your notion of "thingness" from its various representations.

However, as BrowserUk hints at, this is not something specific to Moose, or even this application of Moose. Once you have latched onto the idea that the representation is not the "Thing", you are set free in many ways - even from a specific OOP framework (which is itself yet another representation). One thing that has come clear to me over the years is that a very great deal of programming is about representational changes: moving round and round, back and forth from visual image on the screen or browser to representation in program memory to database records and SQL statements to IPC stream to various document formats (XML, PDF, MSWord, RSS feeds, etc, etc) and back again.

Best, beth


In reply to Re: Reflections on the design of a pure-Moose web app... by ELISHEVA
in thread Reflections on the design of a pure-Moose web app... by locked_user sundialsvc4

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.