ctcrmcou on Jul 20, 2005 at 10:15:35 AM (# 2) This message has been edited.It depends how you are generating your HTML. If you are doing it from the server, your functions can easily manage the repetition, and make debugging easier. You don't have to keep referencing another source, and deal with the exceptions all the time. It's neat and clean, however, but not really practical in a dynamic environment. And think about the fact that you would have to always update changes in two places, not just one.
clarify edit: By "your functions", I mean you write functions that render your HTML script that are repeated many times, like buttons that have many attributes and handlers, not the functions you referenced in your question. Badotz on Jul 20, 2005 at 10:30:52 AM (# 3)ctcrmcou: "...two places, not just one." Referring to the eventHandler code and the XML file; but I would still have to change two items, wouldn't I? #1 the HTML element and #2 the code to handle the event? Unless I'm misunderstanding your inference...the depth of my ignorance is boundless ;-)
This all happens client-side (currently); it was more of an experiment than anything else. I just wondered how far I should go with it. I tend to over-engineer things (as my wife is fond of saying). ctcrmcou on Jul 20, 2005 at 10:52:16 AM (# 4)If it's all client side, then do what you can to be efficient. But two place refers to two different files, back and forth, not on the same line of HTML script. Badotz on Jul 20, 2005 at 11:06:52 AM (# 5)Understood. Perhaps it needs a second look, but I'll let it stew for a day or two. Thanks for the feedback.
|