Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Learning Node.js for Mobile Application Development
Learning Node.js for Mobile Application Development

Learning Node.js for Mobile Application Development: Make use of Node.js to learn the development of a simple yet scalable cross-platform mobile application

eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Learning Node.js for Mobile Application Development

Chapter 1. Setting Up Your Workspace

The overarching goal of this book is to give you the tools and know-how needed to efficiently construct modern, cross-platform solutions for your users. In this chapter, we will focus on the tools themselves, showing you how to bootstrap your development environment to tackle the challenges that we have in store for you in the remainder of the book. We will also give you a brief introduction to each tool in order to give you an idea about why they fit into your toolchain. If any such detail seems unclear at this point, do not worry. We will delve into everything you need to know about each tool in the relevant parts of the book.

After reading this chapter, you will know how to install, configure, and use the fundamental software components that we will use throughout this book. You will also have a good understanding of why these tools are appropriate for the development of modern apps.

The Node.js backend

Modern apps have several requirements, which cannot be provided by the app itself, such as central data storage, communication routing, and user management. In order to provide such services, apps rely on an external software component known as the backend. The backend will be executed on one or more remote servers, listen to network requests from the devices that run the app, and provide them with the services that requests require.

The backend that we will use in this book is Node.js, a powerful but strange beast in its category. Node.js, at the time of writing this book, is the only major backend that is written almost entirely in JavaScript, which in reality is a frontend scripting language. The creators of Node.js wanted a backend that could be integrated with the apps written in JavaScript as seamlessly as possible, and you cannot get much closer to that than Node.js. Beyond this, Node.js is known for being both reliable and high-performing.

In terms of architecture, Node.js is highly modularized and designed from the ground up to be extendable through plugins or packages. Node.js comes with its own package management system, Node Package Manager (NPM), through which you can easily install, remove, and manage packages for your project. You will see how to use NPM in order to install other necessary components later in this chapter.

Installing Node.js on different systems

Node.js is delivered as a set of JavaScript libraries, executing on a C/C++ runtime built around the Google V8 JavaScript Engine. The two come bundled together for most major operating systems (OS), and we will look at the specifics of installing it in the following sections.

Note

Google V8 JavaScript Engine is the same JavaScript engine that is used in the Chrome browser, which is built for speed and efficiency.

Windows

For Windows, there is a dedicated MSI wizard to install Node.js, which can be downloaded from the project's official website. To do so, go to the main page, navigate to Downloads, and then select Windows Installer. After it has downloaded, run the MSI wizard, follow the steps to select the installation options, and conclude the install. Keep in mind that you will need to restart your system in order to make the changes effective.

Linux

Most major Linux distributions provide convenient installs of Node.js through their own package management systems. However, it is important to keep in mind that for many of them, Node Package Manager (NPM) will not come bundled with the main Node.js package. Rather, it is provided as a separate package. We will show how to install both in the following section.

Ubuntu/Debian

Open a terminal and issue sudo apt-get update to make sure that you have the latest package listings. After this, issue apt-get install nodejsnpm in order to install both Node.js and NPM in one swoop.

Fedora/RHEL/CentOS

On Fedora 18 or later, open a terminal and issue sudo yum install nodejsnpm. The system will do the full setup for you.

If you are running RHEL or CentOS, you need to enable the optional EPEL repository. This can be done in conjunction with the install process, so that you do not need to do it again while upgrading the repository, by issuing the sudo yum install nodejsnpm --enablerepo=epel command.

Verifying your installation

Now that we have finished the install, let's do a sanity check and make sure that everything works as expected. To do so, we can use the Node.js shell, which is an interactive runtime environment for the execution of JavaScript code. To open it, first open a terminal, and then issue the following to it:

node

This will start the interpreter, which will appear as a shell, with the input line starting with the > sign. Once you are in it, type the following:

console.log("Hello world!);

Then press Enter. The Hello world! phrase should appear on the next line. Congratulations, your system is now set up for the running of Node.js!

Mac OS X

For OS X, you can find a ready-to-install PKG file by going to www.nodejs.org, navigating to Downloads, and selecting the Mac OS X Installer option. Otherwise, you can click on Install, and your package file will automatically be downloaded:

Mac OS X

Once you have downloaded the file, run it and follow the instructions on the screen. It is recommended that you keep all the default settings offered unless there are compelling reasons for you to change something with regard to your specific machine.

Verifying your installation

After the install finishes, open a terminal and start the Node.js shell by issuing the following command:

node

This will start the interactive node shell, where you can execute JavaScript code. To make sure that everything works, try issuing the following command to the interpreter:

console.log("hello world!");

After pressing the Enter key, the hello world! phrase will appear on your screen. Congratulations, Node.js is all set up and good to go!

Setting up the Ionic framework and Cordova for Mac OS X

After installing Node.js on your Mac, proceed to open your command-line application and input the following command:

$ sudonpm install -g ionic

After inputting this command, you will be prompted to input your password as shown in the following screenshot:

Setting up the Ionic framework and Cordova for Mac OS X

If you have already set up the permissions for npm on OS X, you can install Ionic with the following command:

$ npm install -g ionic

The preceding command line should result in the following output:

Setting up the Ionic framework and Cordova for Mac OS X

Installing Cordova on OS X is very similar to installing Ionic. You can run the following command to install Cordova:

$ sudonpm install -g cordova

Setting up the Ionic framework and Cordova for Windows

Once you have installed Node.js, install Ionic on your Windows machine. The rest should be straightforward.

Open the command prompt and check whether you have npm installed by running the following command:

npm

Once you have ensured that you have successfully installed npm, you can go ahead and run the following command:

npm install -g ionic

This step should result in an output, which shows that you have successfully installed Ionic.

In order to install Cordova, you can also use npm and run the following command:

npm install -g cordova

Once you receive a successful output, you can go ahead and start setting up the platform dependencies.

Note

An experimental setup for Windows:

In Windows, you will have the opportunity to set up a Vagrant package, which is a one-stop-shop for the installation of Ionic on your Windows machine. This is accessible at https://github.com/driftyco/ionic- box.

Setting up the platform dependencies

To set up the platform dependencies, you need to install Java, which is explained in the following section.

Installing Java

If you do not have Java installed or if your version is below 6.0, install the Java JDK by heading over to http://j.mp/javadevkit-download, a customized and shortened link, and choosing the version that applies to you.

The main recommendation for these projects is that you install a version of JDK 6.0 or higher.

Select the JDK for your OS. On an Intel-based Mac, you can use the following useful table to check whether your Mac is a 32- or 64-bit OS.

You can check for Processor Name by clicking on the Apple logo in the top-left corner of your screen, followed by About my Mac:

Processor Name

32- or 64-bit

Intel Core Solo

32 bit

Intel Core Duo

32 bit

Intel Core 2 Duo

64 bit

Intel Quad-Core Xeon

64 bit

Dual-Core Intel Xeon

64 bit

Quad-Core Intel Xeon

64 bit

Core i3

64 bit

Core i5

64 bit

Core i7

64 bit

In the case of Windows, if you have a machine that was purchased in the last few years, you should go for the x64 (64-bit) version.

Setting up Android Studio for Android, Mac, and Windows

To set up Android Studio for Android, Mac, and Windows, follow these steps:

  1. Go to the Android Developers site by visiting http://developer.android.com.
  2. Click on Android Studio, where you will be directed to the landing page. Your operating system's version will be detected automatically:
    Setting up Android Studio for Android, Mac, and Windows
  3. Accept the terms and conditions of the Software Use Agreement and click on Download:
    Setting up Android Studio for Android, Mac, and Windows
  4. For Mac, double-click on the downloaded file, follow the prompts, and then drag the Android Studio icon into your Applications folder:
    Setting up Android Studio for Android, Mac, and Windows
  5. For Windows, open the downloaded file, and then go through the Android Studio Setup Wizard to complete the install.

Setting up the Android Software Development Kit

The process of setting up the Android Software Development Kit (SDK) has improved vastly with the introduction of Android Studio, as a number of software packages come pre-installed with the Android Studio install package. As a part of the preparation for getting started with our Android projects, it will be very helpful to understand how one can install (or even uninstall) SDKs within Android Studio.

There are a number of ways of accessing the SDK Manager. This can be done from the main toolbar of Android Studio:

Setting up the Android Software Development Kit

Otherwise, it can be accessed from the Start menu by navigating to ConfigureSDK Manager:

Setting up the Android Software Development Kit

This is what the SDK Manager looks like. If you need to install a package, you need to check the mark of that particular package, click on Install packages, and then finally accept the licenses:

Setting up the Android Software Development Kit

Setting up your physical Android device for development

The following are the three main steps that need to be taken in order to enable your Android Device for development:

  1. Enable Developer options on your specific Android device
  2. Enable USB debugging
  3. Provide your computer with the necessary trust credentials with the installed IDE via secure USB debugging. (devices with Android 4.4.2)

Enabling Developer options

Depending on your device, this might vary slightly, but as from Android 4.2 and higher, the Developer options screen is hidden by default.

To enable it, navigate to Settings | About phone and click on the Build number seven times. You will find Developer options enabled when you return to the previous screen.

Enabling USB debugging

USB debugging enables the IDE to communicate with the device via the USB port. This can be activated after enabling Developer options and is done by checking the USB debugging using the following this path:

SettingsDeveloper OptionsDebuggingUSB debugging

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

You have to accept the RSA key on your phone or tablet before anything can flow between the device via the Android Debug Bridge (ADB). This is done by connecting the device to the computer via USB, which triggers a notification entitled Enable USB Debugging?

Check off Always allow from this Computer and click on OK.

Setting up the Environment Variables on Windows 7 and higher

Using Ionic and Cordova to build an Android app might require a modification to the PATH environment on Windows. This can be done with the following steps:

  1. Right-click on My Computer and then click on Properties.
  2. Click on Advanced System Settings in the column to the left.
  3. In the resulting dialog box, select Environment Variables.
  4. Select the PATH variable and click on Edit.
  5. Append the following to the PATH based on where you installed the SDK:
    ;C:\Development\adt-bundle\sdk\platform-tools;C:\Deve
    lopment\adt-bundle\sdk\tools
    

Setting up the Environment Variables for iOS on Mac OS X

Developing for iOS requires you to develop from a machine that runs on Mac OS X. At this point in time, it's not possible to develop iOS applications from Windows. In the following steps, we will outline how to get started with developing Ionic apps for iOS.

Installing the iOS SDK

The following are two ways that can be used to download Xcode:

  • From the App Store, search for Xcode in the App Store application
  • It is available at Apple Developer Downloads, which requires you to register as an Apple Developer.

Command-line tools are integrated within Xcode. Previously, this was installed separately. Once you've downloaded and installed Xcode, you are prepared to handle iOS projects from a machine that has Mac OS X enabled.

MongoDB

In order to store data related to your app and users, your server will need a database—a piece of software that is dedicated solely to data storage and retrieval.

Databases come in many variants. In this book, our focus is NoSQL databases, which are so named because they don't use the traditional table-oriented SQL data access architecture that is used by the more well-known relational databases, such as Oracle, MySQL, and PostgreSQL. NoSQL databases are very novel in their design and features and excellent for the tackling of the challenges that one may face in modern app development.

The NoSQL database that we will use throughout this book is MongoDB (it is often abbreviated as MDB or simply Mongo). MongoDB is a document-oriented database that which stores data in documents, which are data structures that are almost identical to the standard JSON format.

Let's have a look at how to install and get MongoDB running. If you have used a more traditional DB system, you may be surprised at how easy it is.

Installation of MongoDB on different Operating System

MongoDB comes in the form of a package for most major OS and versions.

Windows

MongoDB ships with a complete MSI for installation on Windows systems. To download it, go to the project's official website, www.mongodb.org, navigate to Downloads, and select the Windows tab. You will be offered the following three choices to download:

  • Windows 64-bit R2+: Use this if you are running Windows Server 2008, Windows 7 64-bit, or a newer version of Windows
  • Windows 32-bit: Use this if you have a 32-bit Windows installation that is newer than Windows Vista
  • Windows 64-bit legacy: Use this if you are using Windows Vista 64-bit, Windows Server 2003, or Windows Server 2008.

Note

MongoDB does not run on Windows XP at all.

After you have downloaded the MSI, run it with administrator privileges in order to perform the installation. The installation wizard will give you a default location where MongoDB will be installed—C:/mongodb/. You can change this if you desire, but it is recommended that you keep it as we will assume that this is the location where MongoDB resides for the remainder of the book.

After the installation has finished, the next step is to configure a data directory where MongoDB can store the data that we will feed it with. The default location for this directory is /data/db. We will need to make sure that this directory exists and is writeable before we start our MongoDB instance for the first time. So, fire up the command prompt with administrator privileges and issue the md/data/dbcommand. After doing so, we are good to start the database server itself. To do so, stay in the command prompt and issue the following command:

C:/mongodb/bin/mongodb.exe

You should receive a confirmation that MongoDB is now running and listening for connections. All is set!

Linux

On Linux, you will find MongoDB ready-packaged on most major distributions. However, we strongly recommend that you use the project's own repositories in order to make sure that you always have access to the most current security and stability updates.

Ubuntu

First off, you will need to enable the official MongoDB repository. To do so, open a terminal and first import the project's public GNU Privacy Guard (GPG) key as follows:

sudo apt-key adv --keyserverhkp://keyserver.ubuntu.com:80 --recv7F0CEB10

Once this is done, create a listing for the repository itself by issuing the following command:

echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

Your repository listing is now active. Let's make Advanced Package Tool (APT) aware of it in order to install MongoDB, as follows:

sudo apt-get update

Finally, issue the following command to install MongoDB:

sudo apt-get install mongodb-org

Fedora/RHEL/CentOS

Our first order of business here is to enable the official MongoDB repository. To do so, first make sure that you have the nano text editor installed by opening a terminal and issuing the following command:

sudo yum install nano

After this is done, add the repository by issuing the following command:

sudonano /etc/yum.repos.d/mongodb.repo

Nano will open a new, blank text file. Copy and paste the following into the file:

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

Save and close the file by pressing Ctrl+O, followed by the Enter key. This is followed by Ctrl+X.

Finally, carry out the installation by issuing the following command:

sudo yum install mongodb-org

Starting MongoDB

After the installation of MongoDB, you will need to start MongoDB as a service in order to get it running. To do so (on all the distros that were previously mentioned), open a terminal and run the following command:

sudo service mongodb start

It is important that if you have SELinux running, you must make sure that it allows MongoDB to access its default port. To do so, issue the following before you issue the preceding command:

sudosemanage port -a -t mongod_port_t -p tcp 27017

Mac OS X

The easiest way to both install and stay up to date with MongoDB on OS X is by using the Homebrew package manager. Even if we just use it to install MongoDB here, you will most likely find it useful later for the installation of other software packages that you may need for your own projects after you finish this book.

Installing Homebrew is simple; just open a terminal and issue the following command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

When this finishes, make sure that the Homebrew package database is up to date, as follows:

brew update

Finally, install MongoDB by simply issuing the following command:

brew install mongodb

When the install has finished, we will need to define a data directory in order to give a location for MongoDB to store its data. By default, this directory will be at /data/db. So, unless you specify something else, you will need to make sure that this directory exists and is both writeable and readable by the user running your MongoDB instance. For example, if the user running MongoDB on your system is john, you will have to issue the following commands:

sudomkdir -p /data/db
sudochmod 0755 /data/dbsudochownmongod:mongod /data/db

Now that this is done, it is time to start up MongoDB. To do so, make sure that you are logged in as john, open a terminal, and simply issue the following command:

mongodb

That's it! You should receive a notification that MongoDB has started and is listening for a connection. Your instance is ready to go!

Connecting to MongoDB

In order to read and write from the MongoDB instance, we will first need to connect to it. In fact, MongoDB acts as a server in its own right. It exposes its functionality via a network port on which clients can then connect either through the local machine, or even over the Internet.

Note

Since this functionality is disabled by default due to it being a shoddy security practice, it will require a special configuration of the operating system that MongoDB is running on. We will not discuss this functionality as it falls outside the scope of this book, but we will refer to the MongoDB documentation for several helpful examples of how to achieve it for a variety of OS.

To connect to a MongoDB instance, you will need at least the following information:

  • The IP address of the instance: If you are accessing an instance on your local machine, this will be local host by default.
  • The port on which MongoDB is listening: Unless you configure a custom value, this will always default to port 27017.
  • The database that you are trying to connect to: Don't confuse this with the MongoDB instance itself. Each MongoDB instance can contain any number of databases, with each belonging to different users. The instance simply manages access to them.

Alternatively, you may also need the following:

  • A username and its associated password to grant you access to the instance and any databases therein that you are authorized to interact with.

A very easy way to try out this connectivity yourself and verify that MongoDB works as expected is by using the MongoDB shell, a tool that comes installed with MongoDB itself using the methods that we have described previously. How you access the shell varies depending on your OS. I will show each method in the following section and then give an example of how to use the shell itself since this will be the same on all platforms.

Windows

First, make sure that MongoDB is running by following the process that was outlined previously. After this, issue the following command in your command prompt:

C:\mongodb\bin\mongo.exe

Linux and OS X

First, make sure that MongoDB is running. Then, open a terminal and issue the following command:

mongo

Now that our shell is running, let's verify that everything works by creating a database and adding some data to it.

To create a database, issue the following command to the shell:

use Fruits

This will create a database named Fruits, to which we can immediately start adding data. (What, you were expecting more overhead? Not in MongoDB!)

We will not add a collection to our database. A collection is simply a basket of data entries, which are grouped based on some logical characteristic. For example, let's suppose that we want a collection of chewy fruits. We then issue the following command:

db.createCollection("Chewy")

The shell should respond with the { "ok" : 1 } JSON response that tells us that everything went well. Now, let's add some chewy fruits to our collection, as follows:

db.Chewy.insert({"name" : "pear"});
db.Chewy.insert({"name" : "apple"});

Even if the naming makes it intuitively clear what is going on in the preceding code, don't worry if you do not understand all the details yet. We will get to this in due course.

Finally, let's make MongoDB show us the chewy fruits that we stored. Issue the following command:

db.Chewy.find();

The shell will respond with something like the following:

{ "_id" : ObjectId("54eb3e6043adbad374577df9"), "name" : "apple" }
{ "_id" : ObjectId("54eb4036cdc928dc6a32f686"), "name" : "pear" }

The _id numbers will be different on your system, but you will find that the names are the same. All the fruits are where we want them to be.

Congratulations, you now have a fully working MongoDB setup ready for action!

Summary

By now, you may have perhaps noted the red thread running through all the components that we picked for our toolchain; they are all based on JavaScript. This gives us the ability to write all our logic from top to bottom in one single language rather than using different ones for different components (Objective-C or Java for the client, PHP for the server, SQL for the database, or some other unholy combination). As you will see throughout the remainder of the book, this will make it much easier for us to write concise, focused, and comprehensible code.

Once you go through all the preceding steps, I can safely assume that you have the necessary toolkit and you are ready to tackle the upcoming chapters, where we will have an opportunity to create our very first Ionic app and make it work on both Android and iOS devices.

Once you finish setting up your workspace, I recommend that you spend some time reading the Apache Cordova documentation, especially the documentation related to the different platform dependencies.

In the next chapter, we will perform further preparations and configure persistence with MongoDB as part of our preparations for our very own backend for our Ionic app.

Left arrow icon Right arrow icon

Description

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.

Who is this book 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.

What you will learn

  • Develop an API from scratch
  • Set up a MongoDB Database as part of your mobile application backend
  • Deploy a crossplatform mobile application from the command line
  • Incorporate features within your mobile application that use native phone features such as a gyroscope, GPS, and accelerometer
  • Implement mobile applications that use webenabled APIs
  • Build a mobile application with realtime chat messaging features
  • Develop a secure mobile application that is capable of functioning with realtime data
Estimated delivery fee Deliver to Latvia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 30, 2015
Length: 248 pages
Edition : 1st
Language : English
ISBN-13 : 9781785280498
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Latvia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Oct 30, 2015
Length: 248 pages
Edition : 1st
Language : English
ISBN-13 : 9781785280498
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 116.97
Learning Node.js for Mobile Application Development
€41.99
Web Development with MongoDB and NodeJS Second edition
€32.99
Node.js Design Patterns
€41.99
Total 116.97 Stars icon
Banner background image

Table of Contents

15 Chapters
1. Setting Up Your Workspace Chevron down icon Chevron up icon
2. Configuring Persistence with MongoDB Chevron down icon Chevron up icon
3. Creating an API Chevron down icon Chevron up icon
4. Securing Your Backend Chevron down icon Chevron up icon
5. Real-Time Data and WebSockets Chevron down icon Chevron up icon
6. Introducing Ionic Chevron down icon Chevron up icon
7. Building User Interfaces Chevron down icon Chevron up icon
8. Making Our App Interactive Chevron down icon Chevron up icon
9. Accessing Native Phone Features Chevron down icon Chevron up icon
10. Working with APIs Chevron down icon Chevron up icon
11. Working with Security Chevron down icon Chevron up icon
12. Working with Real-Time Data Chevron down icon Chevron up icon
13. Building an Advanced Chat App Chevron down icon Chevron up icon
14. Creating an E-Commerce Application Using the Ionic Framework Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(12 Ratings)
5 star 58.3%
4 star 25%
3 star 0%
2 star 0%
1 star 16.7%
Filter icon Filter
Top Reviews

Filter reviews by




Alexander Frenkel Dec 08, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been Node.js developer since v0.9 and seen it have evolved over time is fascinating. There is always something new to learn.Learning Node.js for Mobile Application Development is one of the most complete book you can find out there to get started with developing hybrid applications. This book introduces you to the ionic framework and it's use of angular 1.x. It guides you from the beginning of setting up environment then building UI with Ionic, angular , securing and building back-end API and using native phone features.Learning Node.js for Mobile Application Development is really easy to understand and follow (as most Packt books are). This book is a fantastic resource for a quick start in developing both iOS and Android Mobile applications.
Amazon Verified review Amazon
Helmuth Saatkamp Dec 04, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Anyone looking for a start in the android world using modern web technology should give this book a try.
Amazon Verified review Amazon
Giuseppe Rodriguez Dec 04, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Learning Node.js for Mobile Appication Development is by far the most complete book you can find out there to get started with developing hybrid apps.I've been a Node.js developer since v0.10 and seeing JavaScript take over the world little by little is by far a great feeling. This book introduces you to the ionic framework and it's use of angular 1.x to start developing mobile apps, all with the notion that you know nothing about ionic or angular. I highly recommend this book for those JavaScript developers looking into stepping up their game in the mobile app development world.
Amazon Verified review Amazon
Alistair Meney Dec 07, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Learning Node.js for Mobile Appication Development is a fantastic resource for a quick start in developing both iOS and Android Mobile apps. Realtime with Web sockets, Ionic framework, Cordova, all covered with excellent examples available to download. Highly recommended.
Amazon Verified review Amazon
Young Hwan Lee Sep 05, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
best beginner node book I have ever read.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela