Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Model-View-Controller and Sharing Code

Chapter 6. Model-View-Controller and Sharing Code

One of the great things about Node is that it can take advantage of the lessons of all the web development frameworks that came before it. Modern architectures tend to follow the Model-View-Controller pattern to decouple the pieces of an application and make working with the code easier. To affect meaningful separation of concerns, however, the views created in MVC on the web must be completely dumb, without the ability to manage even their presentational logic. The alternative is the duplication of some code between the server and client, which can become difficult to maintain. Since Node’s client-side code can also run on the server (and vice versa) we can take interesting steps toward improving architectures and reusing code.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial