Book Image

SignalR: Real-time Application Development - Second Edition

By : Einar Ingerbrigsten
Book Image

SignalR: Real-time Application Development - Second Edition

By: Einar Ingerbrigsten

Overview of this book

Table of Contents (19 chapters)
SignalR – Real-time Application Development Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
11
Hosting a Server Using Self-hosted OWIN
Index

Separation


One of the benefits we can already see with decoupling is that I changed the controller without it affecting the view in any way, nor did I have to do anything special, other than what was already going on. It's also easier to change it as the code is more focused on its part of the system, logic for the frontend, rather than focusing on other concerns. Typically, with a more classic jQuery approach to the problem, you would be querying the DOM for objects to get the data back and forth between view and logic. The queries are in the format of CSS selectors, and you would typically either query the elements by their name or by a CSS construct, leading to the entire system being coupled together with changes done in CSS or the DOM to change the JavaScript code. This is in the long run, and surprisingly maybe not even that long, hard to maintain, and leads to stale solutions that are so hard to change that you simply don't do it because it's too expensive.

Next, we'll see even more...