To my wife Andrea and my daughters Olivia and Erica
Developing mobile apps is an interesting yet challenging task. Different mobile platforms have their own ecosystems. If you want to start building your own mobile apps, you have to learn new programming languages, frameworks, libraries, and tools. Building complicated mobile apps or games requires a lot of experience. These kinds of apps may not be suitable for beginners. But not all mobile apps are complicated. There are still many mobile apps that are content-centric. This kind of apps focuses on content presentations and doesn’t use many native features. For these kinds of apps, PhoneGap and its successor Apache Cordova offer a different way to build them.
Mobile platforms usually have a component called WebView to render web pages. Cordova uses this component to create a wrapper for running web pages inside of native apps. Cordova provides different wrappers for different platforms. The web pages become the mobile apps to develop. After using Cordova, developers can use front-end skills to create cross-platform mobile apps. This empowers front-end developers to create good enough content-centric mobile apps. Many other frameworks build on top of Cordova to provide out-of-box components to make building mobile apps much easier.
This book focuses on the latest version 4 of the popular Ionic framework. The best way to learn a new framework is using it in real-world product development. This book is not a manual for Ionic 4, but a field guide of how to use it. We’ll build a Hacker News client app using Ionic 4 and use this as the example to demonstrate different aspects of Ionic 4. This book not only covers the implementation of the Hacker News client app, but also the whole development life cycle, including development, unit tests, end-to-end tests, continuous integration, and app publish. After reading this book, you should get a whole picture of building mobile apps using Ionic 4.
Most of the nontrivial mobile apps need back-end services to work with them. Using mobile apps back-end services is a new trend that eliminates the heavy burden to write extra code and maintain the back-end infrastructure. Google Firebase is a popular choice of mobile apps back-end services. The Hacker News client app uses Firebase to handle user authentication and storage of user favorites data. After reading this book, you should be able to integrate Firebase in your own apps.
Understanding Web Components and Stencil
Ionic 4 list component with infinite scrolling and pull-to-refresh
State management with NgRx
Routing with Angular Router
User management and third-party service logins with Firebase
Data persistence with Firebase Cloud Firestore
Unit testing with Karma and end-to-end testing with Protractor
App publishing
Features provided by Ionic Pro, including Ionic Deploy and Monitor
Angular - 6.1.10
RxJS - 6.3.3
NgRx - 6.1.0
Firebase - 5.5.4
AngularFire2 - 5.0.2
Jasmine - 3.2.0
Karma - 3.0.0
Protractor - 5.4.1
This book is NOT an Ionic 4 manual. Although this book covers many Ionic components, it doesn’t include details about these components. If you want to know more about Ionic components, you should refer to the official documentation.
This book is NOT a Firebase manual. The official Firebase documentation should be the place to look for more information about Firebase.
This book is NOT a guide of building Angular web applications. Even though this book uses Angular as the framework binding for Ionic 4, it focuses on building mobile apps, not web applications. However, some practice used in the sample app can be applied to other Angular applications.
Individual developers. This book is a perfect match for individual developers. No matter if you want to build mobile apps for a living or as side projects, as an individual developer, you’re responsible for the whole development life cycle. This book covers all the necessary phases in the development life cycle.
Team members in a small team. If you are on a small team, it’s likely that you may need to touch different aspects of product development. This book can help you to understand the development life cycle to easily shift between different roles.
Development team members in a large team. If you are on a large team, you may only be responsible for some pages or components. This book covers some advanced topics related to web development, including routing, state management with NgRx, and advanced usage of RxJS, which can be useful in development.
Depending on your skill level, you can choose to skip some of these chapters. If you are an experienced Angular developer, you can skip the first four chapters.
Ionic 4 is framework agnostic, and this book uses Ionic Angular as the framework binding. Basic knowledge of Angular and TypeScript is required to understand the code in this book. This book provides the basic introduction to Angular and TypeScript, but it’s still recommended to refer to other materials for more details.
To build Ionic 4 apps running on iOS platform, macOS is required to run the emulator and Xcode. You may also need real physical iOS or Android devices to test the apps.
This book would not have been possible without the help and support of many others. Thank you to my editors, Aaron Black, Jessica Vakili, and James Markham; and the rest of the Apress team, for bringing this book into the world. Thank you to my technical reviewer Felipe Laso Marsetti for your time and insightful feedback.
Many thanks to my whole family for the support during the writing of this book.
is a full-stack software developer living in Auckland, New Zealand, with rich experience in applying best practices in real product development and strong problem-solving skills. He is the author of the book Exploring Java 9: Build Modularized Applications in Java (Apress, 2018), which covers the new features of Java SE 9 and provides a deep dive of Java platform core features. He is also a regular contributor to IBM developerWorks China and InfoQ China, with more than 50 published technical articles covering various technical topics.
is a Senior Systems Engineer working at Lextech Global Services . He’s also an aspiring game designer/programmer. You can follow him on Twitter as @iFeliLM or on his blog .
52.15.112.69