Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
What do you mean by 'scaling'? A template doesn't save you from "entities affecting each other". You have a single document only in the case of trivial pages with sparse dynamic content. If you have e.g. inclusions (of other templates), reading gets equally difficult, an you have to go back to look where each bit comes from.
By scaling I mean, you start out w/ HTML (or text) and you add logic to it. Some pages will be horridly complex and things start to get messy, sure, as we go off to infinity. Point is, you start off w/ a document and start to add the logic. If there's very little, the template looks pretty much like what you started w/. Doing it as code, it starts out as something highly unreadable, and it takes diligence to make it not look like a mess.

And yes, I can include to death, but I shouldn't be using goto, i mean spaghetti code, I mean includes except as a matter of large scale convenience.

In the end, I could throw it all away and say it really doesn't matter. It's all turing complete and equivalent. You can create the same mess in any fashion. It's the starting point and the usability of the tech that a) promotes a certain type of usage and b) gives you a good starting point. For template languages it's, start off w/ large documents and then make them dynamic. It's not, take something dynamic and make it output HTML.

Same holds true for other things. SQL is equivalent by using hashsets and mutex locks to mimic the behaviour, but hell, I'll make people cry doing that. I can probably do business logic in PL/SQL or TransactSQL, but that's not very nice either.

As for tokens meaning something, I hope you are using variables in templates that mean something. I hope there's documentation, be it wireframe or graphical mockups. :)


In reply to Re^3: The hidden charm of Template::Toolkit (and templates generally) by exussum0
in thread The hidden charm of Template::Toolkit (and templates generally) by roman

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 browsing the Monastery: (5)
As of 2024-04-16 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found