As we already know, a Model View Controller (MVC) application framework divides the application-specific code into models, views, and controllers. Controllers are supposed to be handling the task of binding the appropriate data to its relevant views to generate the output for an incoming web application request. So, views are supposed to be independent of the data and only contain code relevant to the presentation of the data, which will be mostly HTML. Apart from HTML, views will need to contain presentation logic, which will be conditions written on the data passed to them via controllers. Then, the main task that templating frameworks do in this case is that they make this process of embedding presentational logic simpler and readable. Also, they attempt to segregate the views into more understandable subcomponents.
Web Development with MongoDB and NodeJS Second edition
Web Development with MongoDB and NodeJS Second edition
Overview of this book
Table of Contents (19 chapters)
Web Development with MongoDB and NodeJS Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Welcome to JavaScript in the Full Stack
Getting Up and Running
Node and MongoDB Basics
Introducing Express
Templating with Handlebars
Controllers and View Models
Persisting Data with MongoDB
Creating a RESTful API
Testing Your Code
Deploying with Cloud-Based Services
Single-Page Applications with Popular Frontend Frameworks
Popular Node.js Web Frameworks
Index
Customer Reviews