Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Websocket Essentials: Building apps with HTML5 websockets

You're reading from  Websocket Essentials: Building apps with HTML5 websockets

Product type Book
Published in May 2015
Publisher
ISBN-13 9781784396756
Pages 110 pages
Edition 1st Edition
Languages
Author (1):
Varun Chopra Varun Chopra
Profile icon Varun Chopra

Restructure the application


Now that we know about frameworks, let's restructure our application using the AngularJS framework. Let's see what we can restructure here; we will divide everything into model, view, controller, and service layers. Let's see what these terms are and where they fit in our application.

Model

In our application, we have not seen the need to store data, but if we want to extend our application and add more features, then there will be a need for a Model. As we have seen in some scenarios where we have a list of users and drawings, we need the Model to store the data on the client side so that it is easily accessible for use. AngularJS provides good features to store the data and the binding helps in showing the list data very easily in the UI.

View

An application is normally divided into different views, but in our application we just have one view. As we have seen in the scenarios, we need a login screen for users. In that scenario, we need a different view to be set...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}