Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
In terms of separation of concerns where do you think data manipulation should be done
As reiterated in other posts - I think we may be arguing because of semantics here. We keep using the word "manipulate" (my fault). Models are obviously responsible for getting and changing their data. A view should not ever change the underlying data (again there are rare cases when it doesn't hurt - MVC is a design pattern - not an absolute). Controllers are responsible for helping the view and model interact. Beyond this (and possibly even including this) - the handling of the viewing of the data is all a little more fuzzy. Is the model responsible for sorting data? Maybe. Is the view responsible for escaping html? Maybe. Is the view allowed to do different things with the data? Maybe. The big question is "does it matter?" I think the answer is "probably not."

The different templating systems encourage work flow patterns. Is one better or worse? Well that is entirely subjective to one's work patterns.

your comments about sticking template code in the database almost gave me a heart attack.. What you call "flexibility" I call "confusion of concerns
I haven't had a specific case where I have needed to - though I have heard several people even in the last few months on the TT list asking how to do this. I can envision use patterns for it. What is a filesystem afterall if not a database table of files? Confusion may be the right term, but I can't claim to know all of the possible cases that a developer might find useful.
Taking a presentation tool and involving it in data manipulation... it is bound to fall short
You are right - it is bound to. And TT does sometimes - which is why it provides hooks for people who really want to abuse the separation of model and view. But letting them abuse the boundary is a good thing for them. I may not want to develop on their systems - but at least they could get their particular job done.

Forcing the model to be responsible for knowing the myriad ways that its data might be used is certainly a viable option. But it is wrong to enforce it in all situations. In my experience - it has potential to lead to heavier models. Data is just data.

my @a=qw(random brilliant braindead); print $a[rand(@a)];

In reply to Re: can you say separation of concerns? probably not :) by Rhandom
in thread RFC - Template::Empty by redhotpenguin

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (11)
    As of 2018-05-24 12:47 GMT
    Find Nodes?
      Voting Booth?