Like most categorical statements, this is false.

There is a real cost to setting up a framework that nicely separates different kinds of code. This cost is seen in additional up front complexity in design, the need to be sure that tools which are used for each component play well with whatever system (eg templating) you use to get the components to interact, additional layers to worry about, etc.

Now I do not deny that when you mix languages together, that makes that piece unmaintainable unless you have people who understand and can easily switch between all languages in question. I likewise would agree that any good program is factored and a natural factoring into kinds of tasks should show a fault line where you switch languages. Furthermore I absolutely agree that the decision of whether or not to separate your HTML from your code has huge implications for how you continue to work from then on.

However I strongly disagree that the trade-offs are so clear that in any project with more than one user it is best to split along that line. I even disagree that the answer is always obvious for projects with many users and multiple developers. For very large projects with ongoing maintainance and customization going on among separate teams, it would be insane to not have that split. For small tasks of the form, "Gimme a working web interface to do X, it doesn't have to be pretty." it would be insane to insist on that split. Between these clear extremes there are definitely some shades of grey.


In reply to Re (tilly) 4: Code Critique? by tilly
in thread Code Critique? by rostiguy

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.