Book Image

Node.js Web Development - Third Edition

By : David Herron
Book Image

Node.js Web Development - Third Edition

By: David Herron

Overview of this book

Node.js is a server-side JavaScript platform using an event driven, non-blocking I/O model allowing users to build fast and scalable data-intensive applications running in real time. Node.js Web Development shows JavaScript is not just for browser-side applications. It can be used for server-side web application development, real-time applications, microservices, and much more. This book gives you an excellent starting point, bringing you straight to the heart of developing web applications with Node.js. You will progress from a rudimentary knowledge of JavaScript and server-side development to being able to create and maintain your own Node.js application. With this book you'll learn how to use the HTTP Server and Client objects, data storage with both SQL and MongoDB databases, real-time applications with Socket.IO, mobile-first theming with Bootstrap, microservice deployment with Docker, authenticating against third-party services using OAuth, and much more.
Table of Contents (18 chapters)
Node.js Web Development Third Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Chapter 6. Implementing the Mobile-First Paradigm

Now that we have a useful first Express application, we must do what's the mantra of this age of software development: make it mobile-friendly from the outset. Mobile devices, be it smart phones, tablet computers, automobile dashboards, refrigerator doors, or bathroom mirrors, are taking over the world. In 30 or 40 years, we may be fighting a war with robots who want equal rights, if The Matrix movies have any predictive value. In the meantime, we have gizmos to build and software to write.

Overwhelmingly, that software needs to display on a mobile device. Thankfully, modern mobile devices have real web browsers that use modern technology such as HTML5 and CSS3, and they have fast JavaScript engines.

The primary considerations in designing for mobiles are the small screen sizes, the touch-oriented interaction, that there's no mouse, and the somewhat different user interface expectations. With the Notes application, our user interface needs...