makemehapi icon indicating copy to clipboard operation
makemehapi copied to clipboard

update "views" exercise text to promote real templating

Open Pomax opened this issue 11 years ago • 3 comments

Currently the "views" exercise does not say that the test is to see whether the URL query argument "name" is passed into the template that the user saved to the templates directory; there is nothing in the assignment or hints to directly suggest that the template should have a {{...}} construction in it.

The assignment currently shows the "desired output HTML", so if someone is copy-pasting the hints in order to build out their program (which they will be) there is nothing in the hints to suggest a {{query.name}} is needed in order to pass the test. For people new to hapi/templating, the assignment is likely to end up as "copy the HTML, save as file, return that file on requests for /, done. My program generates the correct output without any templating magic, I'm not sure what I was supposed to learn about templating?".

(Of course, those of us already familiar with mustache/jinja/nunjucks/etc know what is required, but there will be a substantial group for whom this is their first exposure to templating, and the exercise forgets to explicitly say that a {{query.name}} or the like is needed in the HTML that goes in the template's index.html)

Pomax avatar Jan 13 '15 18:01 Pomax

Does this help clarify it better?

lloydbenson avatar Jan 13 '15 19:01 lloydbenson

left a comment on the PR

Pomax avatar Jan 13 '15 19:01 Pomax

The correct answer code passes the test but does not render a usable template in the browser. https://jsfiddle.net/lokal/ws71rc4v/

idkjs avatar Mar 06 '16 20:03 idkjs