Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-18 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found