javascript - How would MVC-like code work in Node.js? -
I'm starting to get my head around node.js, and I'm trying to figure out that How do I generalize the MVC stuff for example, here is a Django view that draws two sets of records from the database, and sends them to provide them in a template.
def view (requested): things1 = ThingsOne.objects.all () things2 = ThingsTwo.objects.all () render_to_response ('template.html, {' items1 ': Things 1, Things 2 ': Things2})
The same node.What does the JS function look like?
is a great small article, in which there is a full example of a MVC pattern, which is used by the Defratch Node Module does. It lists the optional modules currently available, it has answered this question to me, compared to which there are some good things but I did not find anything at MVC.
Comments
Post a Comment