Complete Ionic Glossary
We built this article as a guide of concepts related to Ionic Framework. We want this to be like a dictionary for the core concepts of Ionic and also a place where you can find lots of references to expand your expertise about Ionic Framework. We will be updating this article often so stay in the loop!
What is Ionic Framework?
Ionic Framework offers the best web and native app components for building highly interactive native and progressive web apps.
It is the only mobile app stack which allows developers to design apps for all app stores and the mobile web, using an unique code base. Moreover, Ionic’s Platform Continuity guarantees your app will look superb on every single device.
It's completely free and open source which means you can use Ionic in personal or commercial projects for free.
It offers a complete mobile toolkit built for web developers plus everything you need to start creating fully functional mobile apps in just a few minutes.
You can think of Ionic as the front-end UI framework that handles all of the look and feel and UI interactions your app needs in order to be compelling. It’s like a kind of “Bootstrap for Native” but with all the support for a broad range of common native mobile components, slick animations, and incredible design.
Without further introduction let's get started!
Angular is the underlying framework that powers Ionic. It is responsible for the component API that is the building block of Ionic.
If you want to learn more about Angular you can use this free and complete tutorial Learn Angular from scratch step by step.
Sass is a stylesheet language that compiles to CSS and is used by Ionic. Sass is like CSS, but with extra features such as variables, mixins, and for loops.
CLI stands for Command Line Interface and is text-based interface for interacting with a program.
The common command-line app for a Mac user is the Terminal app, and Windows users often use Command Prompt.
Ionic's CLI can be used for many things, such as creating a new app, building the app for android or ios plarforms and adding plugins.
The Android SDK is a Software Development Kit for developers building apps for Google's Android Platform. It includes tools for building, testing, and debugging Android applications. You can install these tools through Android Studio.
Xcode is the Apple IDE used to developr software on Apple operating systems. In Ionic apps, we will use Xcode to build the app for iOS devices.
Typically when you start your new ionic app you will run on your console:
npm install in order to install all the dependencies of your app.
Normally when a user opens a page, the entire page’s contents are downloaded and rendered in a single go. While this allows the browser or app to cache the content, there’s no guarantee that the user will actually view all of the downloaded content.
So, that's where Lazy Loading plays an important role, instead of bulk loading all the content at once, it can be loaded when the user accesses a part of the page that requires it. With lazy loading, pages are created with placeholder content which is only replaced with actual content when the user needs it.
Lazy loading sounds like a complicated process, but actually is very straight forward. Conceptually, we’re taking one segment of code, a chunk, and loading it on demand as the app requests it. This is a very framework agnostic take on things, and the finer details here come in the form of NgModules for Ionic apps. NgModules are the way we can organize our app’s pages, and separate them out into different chunks.
Ionic 4 Concepts
After more than a year of work, the Ionic Framework team has released version 4.0.0-beta.0. This new version offers significant changes in performance, compatibility with multiple frameworks (not only with Angular as previous versions), a new documentation and many other improvements that we will analyze in this article.
In Ionic 4 vs Ionic 3 — What you need to know about Ionic 4, I explained the main differences between Ionic 4 and Ionic 3, as well as the new concepts of this brand new version. We will see practical examples of how to use the new Ionic CLI, and the new Router. Then at the end I will guide you on how to migrate your applications from Ionic 3 to Ionic 4.
The Web Components are a set of web platform APIs that allow you to create custom, reusable, encapsulated HTML tags to use in web apps and web pages. Their functionality is encapsulated away from the rest of your code and you can utilize them in your web apps.
One way to explain what Web Components are, is to imagine them as reusable user interface widgets that are created using open web technologies. As they are part of the browser, don't need any external library or framework.
Web Components are based on 4 specifications:
- Custom Elements. They define the bases and fundamentals to design and use new types of DOM elements.
- Shadow DOM. It defines how to use encapsulated styles and markup within a web component. We will learn more about Shadow DOM below.
- HTML imports. It defines how to include and reuse a HTML document in another HTML document.
- HTML Template. It defines how to declare code fragments that will not be used while the page is loading, but could be later instantiated at runtime.
An important aspect of Web Components is encapsulation — being able to keep the markup structure, style, and behavior hidden and separate from other code on the page so that different parts do not clash, and the code can be kept nice and clean. The Shadow DOM API is a key part of this, providing a way to attach a hidden separate DOM to each element.
Shadow DOM is an API which is part of the Web Component model. It helps isolating component internals, protecting users from breaking changes and global CSS. It is built based on two simple ideas: isolation and location.
What is the DOM?
The Document Object Model (DOM) is a tree-like structure of connected nodes that represents the different elements and strings of text appearing in a markup document (usually an HTML document in the case of web documents). The DOM represents the document as nodes and objects. That way, programming languages can connect to the page.
So, Shadow DOM allows hidden DOM trees to be attached to elements in the regular DOM tree. Then, this new shadow DOM tree starts with a shadow root, underneath which can then be attached to any elements, in the same way as the normal DOM.
Shadow DOM terminology:
- Shadow host: it is the regular DOM node that the shadow DOM is attached to.
- Shadow tree: it is the DOM tree inside the shadow DOM.
- Shadow boundary: it is the place where the shadow DOM ends and where the regular DOM begins.
- Shadow root: it is the root node of the shadow tree.
You can find more info about Shadow DOM in Shadow DOM in Ionic (and Why it’s Awesome)
CSS 4 Variables
CSS variables are entities defined by CSS authors that contain specific values to be reused throughout a document. In fact, CSS variables are one of the main reasons CSS preprocessors exist at all. The ability to set a variable for something like a background-color, use that variable throughout the CSS you write, and know that it will be consistent, DRY, and easy to change is super useful.
Because each component of Ionic 4 will be a web component, they created and open sourced a tool called Stencil. Stencil is a web component compiler for building fast, reusable UI components and Progressive Web Apps.
Capacitor is a cross-platform app runtime that makes it easy to build web apps that run natively on iOS, Android, and the web. These apps are called "Native Progressive Web Apps".
This tool is a spiritual successor to Apache Cordova and Adobe PhoneGap. Capacitor has backwards-compatible support for many existing Cordova plugins.
Getting started with Capacitor should be easy! Follow the Getting Started guide to get add Capacitator to your app.
Ionic Framework apps are made of high-level building blocks that are named Components. These components allow you to quickly build an interface for your app. Ionic comes with lots of components such as lists, tabs, modals, and cards. Check out the definitions below to see what is each component.
Lists are commonly used to display rows with information, such as a user list, a playlist, a list of interests or even a menu with options.
Ionic Framework offers different types of lists from very basic ones to more complex designs with sliding functionality and multiple components. Let's explore the available options:
- Basic Lists
- Inset List
- List Dividers
- List Headers
- Icon List
- Avatar List
- Multi-line List
- Sliding List
- Thumbnail List
These are just some possible ready-made arrangements you can use, however, possibilities are endless and you are free to build the kind of list that best works for your mobile app. Some mobile design inspirations can be found in Lists Design Inspiration.
Buttons are an essential component of mobile apps, because they provide a way to interact with and navigate through the app. When it comes to UI design principles for designing buttons, the most important thing to focus on is the button’s purpose. Buttons should clearly communicate what will happen after the user clicks them.
In Ionic Framework buttons can consist of text and an icon, and can be enhanced with a large variety of attributes such as borders, sizes, icons and positions. These are different out of the box styles that you can find within the Ionic Framework styles.
- Default Style
- Outline Style
- Clear Style
- Round Buttons
- Block Buttons
- Full Buttons
- Button Sizes
- Icon Buttons
- Buttons In Components
Forms are usually one of the major interaction points between an app and the user, allowing them to send data to the application Inputs are super important for data collection. They should follow styling and interaction guidelines for each platform, so that they look intuitive and secure for users.
Inputs usually live inside a Form. Developing good forms requires design and user experience skills, as well as a framework with support for forms, change tracking, validation, and error handling such as Angular. As you may know, Ionic is built on top of Angular and uses Angular forms library. If you didn’t know that you should consider reading Ionic Framework introduction and key components.
Because Forms are the pillar of any business applications is that we build a complete tutorial for mastering Forms and Validations in Ionic Framework.
There are some attributes that can be used to style forms and their various input fields in Ionic Framework and are listed below.
Ionic comes with a range of more than 700 beautiful and free icons that you can use through your apps.
Using the ionicons is as easy as putting the name attribute on the
Icons can be used on their own, or inside of lots of the Ionic components. For a full list of available icons, check out the Ionicons docs.
A great and important thing about Ionicons is that icons can change slightly depending on the platform the app is running. For example, by setting the icon name of person, on iOS the icon will automatically apply ios-person, and on Material Design it will automatically apply md-person. This allows the developer to write the markup once while Ionic applies the appropriate icon based on the mode.
The grid system of Ionic Framework is based on flexbox. Flexbox is a new layout mode in CSS3 supported by all devices that Ionic supports.
The ionic grid is heavily influenced by Bootstrap's grid system. It is a mobile-first system made up of any number of rows and columns and is extremely responsive.
This is how the Ionic grid works:
- The grid is composed of three units: a grid, rows and columns.
- The grid act as a container for all its rows and columns.
- Columns will expand to fill their row, and will resize to fit additional columns.
- Rows are horizontal groups of columns that line the columns up properly.
- Content should be only placed within columns, and only columns may be immediate children of rows.
- It is based on a 12 column layout with different breakpoints based on the screen size.
- The number of columns and breakpoints can be fully customized using Sass.
- The components that make up the grid can be written as an element (
<ion-grid>) or added as an attribute to any element (
The Ionic grid is super flexible so make sure to check the complete docuementation to learn everything you can do with it.
Ionic Native is a TypeScript wrapper for Cordova or PhoneGap plugins that allows to add any native functionality to your Ionic app super easy.
You can check all the existing Ionic Native wrappers in the framework documentation.
We have the following Ionic Framework tutorials that will guide you through the step by step of adding the following native features into your Ionic App:
- Show ads in your Ionic App with AdMob
- Camera Access and Image Cropping in Ionic Framework
- Social Sharing and Deep Linking in Ionic Framework
- Add Google Maps, Google Places, and Geolocation to your Ionic App
- Setting up a Database for an Ionic App with Firebase.
- Upload an image to Firebase from an Ionic app
- Add Firebase authentication to your Ionic v.1 App
Backend for Ionic Apps
As you may know, when it comes to data handling and backend for mobile apps there are some different options available.
It's important to clarify that Ionic Framework does not integrate directly with your backend, it just communicates with it. So, if we want to enable Ionic to integrate with a backend, your backend will need to implement some kind of API that the Ionic application can make HTTP requests to.
Backend as a Service (BaaS)
If you don’t want to have to deal with your own infrastructure and backend implementation, then there are a few backend as a service options. We have an Ionic Tutorial where we explain how to use Firebase as an authentication provider for your Ionic Apps.
Wordpress is a well known CMS and in same cases you could use it as the backend of your Ionic app. That's why we created a tutorial where we explain how to integrate Wordpress to your Ionic app using Wordpress REST API.
Your own API implementation
Basically, you can integrate any backend into your Ionic app. Remember that Ionic Framework just handles the frontend part, so it is agnostic to the backend. In order to integrate any backend you need to create an API that is able to accept HTTP requests. Then, to CRUD (create, read, update or delete) data to your backend, send an HTTP request from your Ionic app to the API.
Progressive Web Apps (PWAs)
PWAs are web applications that are regular websites or web pages, but can look to the user like traditional native mobile applications. Progressive web apps attempt to combine features offered by most modern browsers with the benefits of a mobile experience.
They are a new way to offer incredible mobile app experiences that are highly optimized, reliable, and accessible completely on the web.
Benefits of Progressive Web Apps
There are lots of benefits from usign PWAs such as:
- Escaping from the App Stores monopoly.
- Getting easily discovered through a simple web search.
- PWAs work offline and perform well on low quality networks.
- PWAs are fast! They load in seconds, with smooth interactions inside the app.
- Super accessible as they run on desktop and mobile and anywhere you have a browser.
- Small bundles. PWAs have a fraction of the size of a traditional mobile app.
Large and small brands are jumping on Progressive Web Apps to create better user experiences.
Learn everything about Progressive Web Apps in Ionic Framework and jump in this new and promising world.
Keep learning Ionic Framework
As mentioned before, this Ionic dictionary will be in continuous growth, we will be adding new concepts regularly. If you want us to add information about any topic related to Ionic Framework please feel free to leave a comment below.
If you need an introductory tutorial to learn Ionic Framework with a real world example app just check Building a complete mobile app with Ionic 3.
Enjoyed reading this Ionic Tutorial?
Subscribe to keep learning Ionic! You will receive offers, new ionic tutorials and free code examples from IonicThemes.