Are you interested in coding mobile apps but don’t have the specialized knowledge or experience in programming and developing iOS and Android apps? Well, let me introduce you to the Ionic framework, which lets you write an app once and publish it to any mobile platform.
So, What Is Ionic?
Simply put, Ionic is a free-to-use framework that allows you to build mobile apps for iOS, Android and Windows Phone, all from one codebase. In other words, Ionic is a tool for cross-platform mobile development.
Ionic was founded in 2012 by a tech start-up called Drifty Co, and it’s now the world’s top open-source framework for building cross-platform (hybrid) mobile apps.
How Ionic Works
Apart from these components that provide the styling and “look and feel” for mobile apps, Ionic also provides the appropriate behaviors like navigation and gestures—for example, swiping, rotation, and pinch events, to name but a few. Ionic also includes a collection of icons called Ionicons. All these components are elements that you use in building your Ionic apps, along with Cordova and PhoneGap plugins, which we’ll touch on shortly.
How Hard Is It to Get Started?
It’s really not difficult to get started using Ionic. Ionic comes with tools to help you set up, build and run your Ionic project—this is the Ionic Command-Line Interface (CLI). All the front-end libraries and the CLI are open-source projects, so you can use them for free when developing your apps.
Why Use Ionic?
It is difficult to develop native apps. Developing Android apps alone requires you to learn how to use Android Studio’s IDE (Integrated Development Environment) and know the Java or Kotlin programming language. You’ll also need to understand Android-specific concepts like activities and intents, and you’ll create your app UIs with a custom XML syntax.
For iOS, you’d need to use the Xcode IDE (which is only available for Mac), as well as Apple’s Objective-C or Swift programming languages. Not to mention all the many Mac-specific SDKs and concepts! And on top of that, if you also decide to build for Windows Phone then you will also need to learn how to use Visual Studio’s IDE, as well as writing code in C# or Visual Basic and so on…
So, if you want to ship your app to multiple platforms, you would have to rewrite the same functionality in three different languages! Developing apps this way not only requires learning a lot of different languages and tools, it also means you end up re-coding the same logic for two or three different programming languages and mobile platforms. And the same duplication of effort is required when you need to make any changes. Developing apps natively takes a lot of time, money, and skill. So wouldn’t it be great to have a single code base that works for all three platforms?
That’s where Ionic comes in!
Ionic uses the Apache Cordova project to build and run your apps as native apps.
Ionic and Cordova
If you simply write a web app in the same way you would write a website and just package it as a mobile app with Cordova, the end result will be an app that looks like a website. Users will notice the style and user interaction are different from a “normal” mobile application.
Cordova also provides over 200 plugins available as add-ons that you can use within your Ionic projects, which enable you to access native device APIs like the phone’s camera, geolocation, gyroscope, and so on. You can use these to enhance your app’s features and functionality.
Ionic and Angular
A quick diagram to illustrate the above looks something like this:
For anyone out there looking to get into the world of developing mobile apps, I strongly recommend and encourage you to try out Ionic, as it offers you the opportunity to develop cross-platform mobile apps, all from a single code base.
The framework is well supported and has continued to develop and grow over the years, and it continues to get better and better.