Separation of logic from presentation: HTTP variable names?
Posted
by Allan Jardine
on Stack Overflow
See other posts from Stack Overflow
or by Allan Jardine
Published on 2010-06-08T07:00:38Z
Indexed on
2010/06/08
8:52 UTC
Read the original article
Hit count: 350
Hello all,
This could probably be considered an academic question, rather than a real world one - but throwing it out to see if anyone has any great ideas! We all know that keeping the business logic of an application separate from the presentation is a good idea (I'm looking at web-apps atm), but there needs to be an understanding between the business logic for what HTTP variables to expect (and then process) and the variable names which are sent by the presentation layer.
Is this simply a matter of telling the designer what variable names to use in a template? The template doesn't need to know what the variable names are (unless using them for JS/CSS selectors), so why should they be 'hardcoded' in there. Or should the business logic put the names into variables to be printed out? Another layer of complexity for the templates?
Does anyone have any experience of this, or thoughts on how to deal with it?
Thanks, Allan
© Stack Overflow or respective owner