Learning Single:page Web Application Development
上QQ阅读APP看书,第一时间看更新

What this book covers

Chapter 1, Understanding Single Page Application, discusses the main concepts of the MVC pattern applied by different JavaScript libraries as MVC/MVVM/MV*. This chapter gives you an overview of the available tools and the peculiarities of the traditional web application and SPA. Also, we give some tips to choose the best framework for our project.

Chapter 2, Taking a Deep Dive into Node.js and MongoDB, dives into JavaScript on the server side and explains how to run a Node.js server. This chapter then presents the basic concepts such as the event loop, middleware, and Node Package Manager (NPM). We will see how to interact with MongoDB, which is one of the most popular NoSQL databases, using Mongoose ODM (Object Data Modeling) for Node applications.

Chapter 3, API with MongoDB and Node.js, explains how the RESTful API works and the six constraints to consider when creating an API RESTful architecture. We then get our hands dirty with the Express framework, coding the trivial CRUD (Create, Read, Update, Delete) operations for the baseline API.

Chapter 4, Creating a Conference Web Application, shows how to refactor the API using the Yeoman code generator and how to deal with user authentication using the Passport module and some template engines for Node.js to render HTML on the server.

Chapter 5, Starting with AngularJS, covers the core concepts about AngularJS, which is one of the most popular MV* framework, and explains how the framework deals with the MVC pattern, concepts such as two-way data binding, directives, and project organization to prepare the application to scale.

Chapter 6, Understanding Angular Views and Models, unleashes all the power of a generator to build the application scaffold. We will carefully examine the structure of SPA module-wise and rebuild our API using the help of the MEAN.JS generator, which is a powerful tool for creating applications with the MEAN (such as MongoDB, Express, AngularJS, Node.js) stack. We will use the RESTful interface of the WebStorm IDE to test the API.

Chapter 7, Testing Angular SPA with Karma and Protractor, details the basic concepts of tests and implements them using unit testing and e2e testing on SPA, with the help of testing frameworks such as Jasmine, Karma, and Protractor, using WebDriver and Selenium.

Chapter 8, Deploying the Application to the Cloud, takes a look at some important points involving the deploy process of all web applications, such as version control, deployment in the cloud and continuous deployment, and placement of the sample application in production.