万本电子书0元读

万本电子书0元读

顶部广告

Learning Node.js for Mobile Application Development电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:Stefan Buttigieg

出  版  社:Packt Publishing

出版时间:2015-10-30

字       数:120.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Make use of Node.js to learn the development of a simple yet scalable cross-platform mobile applicationAbout This BookUse Node.js to satisfy the core backend requirements of modern apps, including user management, security, data access, and real-time data communicationBuild practical real-world mobile applications, which will give you the necessary knowledge to build your very own mobile solutionsStep-by-step development of projects using Ionic Framework as the frontend and Node.js for the backend supported by a MongoDB database Who This Book Is For This book is intended for web developers of all levels of expertise who want to deep dive into cross-platform mobile application development without going through the pains of understanding the languages and native frameworks that form an integral part of developing for different mobile platforms. This book is also for you if you are a developer who wants to capitalize on the MobileFirst strategy and so are going to use JavaScript for your complete stack.What You Will LearnDevelop an API from scratchSet up a MongoDB Database as part of your mobile application backendDeploy a cross-platform mobile application from the command lineIncorporate features within your mobile application that use native phone features such as a gyroscope, GPS, and accelerometerImplement mobile applications that use web-enabled APIsBuild a mobile application with real-time chat messaging featuresDevelop a secure mobile application that is capable of functioning with real-time data In Detail Node.js is a massively popular JavaScript library that lets you use JavaScript to easily program scalable network applications and web services. People approaching Node.js for the first time are often attracted by its efficiency, scalability, and the fact that it's based on JavaScript, the language of the Web, which means that developers can use the same language to write backend code. Also, it’s increasingly being seen as a "modern" replacement for PHP in web development, which relies on fast-paced data exchange. The growing community and the large amount of available modules makes Node.js one of the most attractive development environments. This book takes a step-wise and incremental approach toward developing cross-platform mobile technologies using existing web technologies. This will allow you to truly understand and become proficient in developing cross-platform mobile applications with Node.js, Ionic Framework, and MongoDB. The book starts off by introducing all the necessary requirements and knowledge to build a mobile application with a companion web service. It covers the ability to create an API from scratch and implement a comprehensive user database that will give you the opportunity to offer a mobile application with a personalized experience. Midway through the book, you will learn the basic processes to create a successful mobile application. You will also gain higher-level knowledge, allowing you to develop a functional and secure mobile application to ensure a seamless user experience for end users. Finally, the book ends with more advanced projects, which will bring together all the knowledge and expertise developed in the previous chapters to create a practical and functional mobile-application that has useful real-world features.Style and approach This book is an easy-to-follow guide that takes a step-wise approach in giving expertise and knowledge to help you truly understand what is needed to create a memorable user experience for end users. Each topic is placed in the context of the bigger picture, that is, to create cross-platform mobile applications using existing technologies.
目录展开

Learning Node.js for Mobile Application Development

Table of Contents

Learning Node.js for Mobile Application Development

Credits

About the Authors

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Setting Up Your Workspace

The Node.js backend

Installing Node.js on different systems

Windows

Linux

Ubuntu/Debian

Fedora/RHEL/CentOS

Verifying your installation

Mac OS X

Verifying your installation

Setting up the Ionic framework and Cordova for Mac OS X

Setting up the Ionic framework and Cordova for Windows

Setting up the platform dependencies

Installing Java

Setting up Android Studio for Android, Mac, and Windows

Setting up the Android Software Development Kit

Setting up your physical Android device for development

Enabling Developer options

Enabling USB debugging

Trusting a computer with installed IDE using secure USB debugging (devices with Android 4.4.2)

Setting up the Environment Variables on Windows 7 and higher

Setting up the Environment Variables for iOS on Mac OS X

Installing the iOS SDK

MongoDB

Installation of MongoDB on different Operating System

Windows

Linux

Ubuntu

Fedora/RHEL/CentOS

Starting MongoDB

Mac OS X

Connecting to MongoDB

Windows

Linux and OS X

Summary

2. Configuring Persistence with MongoDB

Learning outcomes of MongoDB

An introduction to MongoDB

Documents

Collections

Databases

An example – a product order database

Connecting to MongoDB

Linux and Mac OS X

Windows

Creating a database

Creating our collections

Creating relations between documents

Querying MongoDB

Searching by ID

Searching by property value

Advanced queries

Connecting MongoDB and Node.js

Setting up a basic project

Connecting to MongoDB

Summary

3. Creating an API

Learning outcomes of the RESTful API

RESTing easy

It's all hypermedia

GET

GET all

GET by ID

POST

PUT

DELETE

Building a RESTful API with Node.js

Setting up the RESTful API

The HTTP module

Dissecting the HTTP server

Returning JSON

Implementing our GET handlers

Implementing a router

Implementing our POST handlers

Implementing the DELETE and PUT handlers

Testing the API

Moving forward

Summary

4. Securing Your Backend

Understanding the outcomes of token-based authentication

The theoretical bit

A small token of trust

Playing your role

Putting it all together

Implementation

Adding the new collections

Adding an authentication module

Creating functions to register and help users log in

Registering users

Enabling users to log in

Extending our API

OAuth

Time-stamped access tokens

Hashing passwords

Summary

5. Real-Time Data and WebSockets

Polling

WebSockets

Using WebSockets in Node.js

Setting up our project

Installing socket.io

Creating a chat interface

A basic file server

An alternate chat

The efficient serving of static files

Summary

6. Introducing Ionic

Setting up your Ionic web account

Creating your first Ionic application

Checking out your Ionic applications with Ionic View

Installing Ionic View on Android

Installing Ionic View on iOS

Testing your application on the iOS Ionic View App

Testing your application on Android

Sharing your application with collaborators

Going further

Summary

7. Building User Interfaces

The structure of an Ionic project

Introducing AngularJS

The structure of an Angular app

Modules

Modules within modules within modules

Services, controllers, and other beasts

The Angular MVC pattern

The view

The controller

The model

Putting it all together

Modifying an Ionic project

Modifying the header

Modifying the tab colour, icons, and names

Modifying our pages

Adding a new tab

Creating a new controller

Creating a view

Adding a state for the new tab

Testing the newly created tab

Going further

Summary

8. Making Our App Interactive

Creating a new project

Creating a basic MVC project

Creating the view

Creating the list view

Creating the controller

Connecting the view and controller

Testing the connection

Creating the model

Services

Creating services

Creating a factory

Accessing the device data

Accessing native services

ngCordova

Adding Cordova contacts to our factory

Building for native devices

Android

Emulator

A physical device

The list view revisited

Summary

9. Accessing Native Phone Features

Creating the project

Creating the basic app structure

Integrating Google Maps into the app

Angular directives

Creating directives

Restricting directives

Scope isolation

DOM manipulation

Putting it all together

Adding geolocation via GPS

Summary

10. Working with APIs

Setting up Parse

Setting up the Ionic project

Connecting Parse to our project

Defining app states

Creating controllers and templates

Testing our application

Summary

11. Working with Security

An overview of client-side security

Client-side security is a convenience

The basic components of client-side security

Building a secure app

Starting off

A basic authentication service

The login function

The isAuthenticated function

The getCurrent function

Implementing route authentication

Summary

12. Working with Real-Time Data

A refresher – WebSockets

Getting the lay of the land

What we will need

Creating the server

Building the chat app

Setting up the basic app structure

The input section

The message view

The ChatService function

Adding WebSockets to the mix

Updating the chat view

Going further

Summary

13. Building an Advanced Chat App

We need some room!

Namespaces

Creating a multiroom chat application

Configuring the basic layout

Building the server

Summary

14. Creating an E-Commerce Application Using the Ionic Framework

Designing our application

Creating an Ionic project

Implementing our designs

Setting up the product API

Connecting the product API to our Ionic app

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部