How To Dynamic Web Rendering?

Adam D. Ruppe destructionator at gmail.com
Sun May 15 10:36:36 PDT 2011


Alexander wrote:
>  Perhaps, you don't need it, but I do want to have an option to
>  modify application logic on the fly, in the template or any other
>  dynamic page, that's why I like mix of code and data - especially
>  when the code is insignificant fraction of data.

I think you'll feel differently once you see people abuse that
option. It becomes hard to follow what's going on. Then, when
the customer reports a bug or a change, you spend all night pounding
your head over it instead of 5 minutes doing it, then goofing off
arguing on newsgroups for the rest of the day :P


> all clear" to you - who is the author :) To me, this all is not
> so clear - as I don't know (=see) where exactly in the document
> all this happens.

You're also not used to it. (When I write this for newbies, I
often put a comment in there: <!-- filled by program -->)

It's an easy pattern though: an empty element with an ID is
meant to be filled in, and the ID should be descriptive enough
to make a good guess at what it's doing. (at least no worse than
guessing a function's behavior based on it's name. Similarly,
knowing what ID to use is the same as knowing what function to use.)

I sometimes get concerned that the id's will get out of sync, or
the new guy won't understand what's going on, but it hasn't been
a problem in practice. After you see it used once, it's not a
mystery anymore.


More information about the Digitalmars-d-learn mailing list