The Magic of Ionic Framework

Hello, probably many of you reading this article are wondering: What Ionic is? Why Ionic? What are its strengths and weaknesses? How to program Ionic?

These inquiries will be discussed within the scope of this article. However, before going into the main topic, we would like to introduce a bit about “Mobile App”, “Web app” and let you know why Ionic was born.

 

As you know, since the smartphones appeared, the term “Mobile App” was formed to refer to software that works for them. Upon arrival, Mobile App only came in natively, which means apps are developed specifically for an operating system (OS) such as iOS, Android, and Windows Mobile in the respective programming language ​​on each OS. For example, you must use Objective C or Swift to develop an app running on iOS, Java on Android, or C# on Windows Mobile. Each native app can only run on one platform and cannot be transformed to another platform. This means that when you develop an iOS app, it cannot run on Android Phone or Windows Phone and vice versa. The biggest advantage of native apps is that they allow users to access all the native features easily and they produce the highest performance. In addition, since native apps offer the greatest and the most complete experience, they still account for a vast majority of applications nowadays.

Web apps are the ones developed in HTML/CSS/JavaScript platform. A web app can run on both desktop and mobile devices, as long as these devices have browsers and the Internet connection. The most popular browsers are Chrome, Safari, Edge, IE, Firefox, etc. The strength of web app is that it does not require installation, does not take a lot of space, and is easy to develop with the current HTML/CSS/JavaScript platform, which is strongly supported by the community. The weakness of web app is the need for the Internet connection and a server to host the app, It is not able to save much information offline, and the saved information is not well secured.

 

So What is Hybrid App?

Unlike native app, hybrid app is the type of application designed to run on multiple different OS-es. Why is hybrid app so amazing? The nature of the hybrid solution is that the interface is developed purely in HTML, CSS, and JavaScript languages, but it allows to interact with the operating system by calling its pre-built APIs (file reading, camera, Bluetooth, etc.) The advantage of the hybrid is that it exploits both strength of Web app and the ability to manipulate the system of Native app. However, for applications that require complex interactions and extensive system tuning, hybrid will be a very difficult technical problem for developers. Hybrid also has many limitations once developers want to develop their app to a higher and more sophisticated level.

 

So, does the above introduction has anything to do with our Ionic? The answer is yes, because Ionic is the framework for building hybrid applications. Ionic is built on top of the Cordova platform, and we can understand simply as follows: Ionic plays the role of handling part of the user interface, it will have to work with Angular, which will handle the logic of the application.

Cordova is a multi-platform framework that compiles the application into a form that can be installed and run within the mobile web view. So, what are the reasons for choosing Ionic? You can see in the specification of hybrid app that it is possible to build an application that run on all platforms, and the application still behaves like a native application with pre-built native plugins provided by Cordova. Is it still not great?

Up till now, Ionic has come out to the third version. However, as a matter of fact, you can only see a significant difference between Ionic first and second versions. Any of the later versions are just upgrades from Ionic second version so far.

 

In Ionic 1, developers can only build hybrid applications. However, with Ionic 2, everything becomes more robust, where Ionic 2 can be used to support modern web applications or Electron applications. More specifically, we can now build not only Ionic applications running inside Cordova environment but also web applications that provide the same experience as the user application. With Electron, this is the foundation for building multi-platform desktop applications using HTML, CSS and JavaScript. Electron is similar to Cordova, but it is used for desktop operating systems such as OS X, Windows or Ubuntu.

Ionic 2 comes along with Angular 2 to build the logic for the application, we will not yet discuss the strengths that Angular 2 brings compared to Angular 1, but one basic thing we need to be aware is that Angular 2 uses Typescript. In short, Typescript is like an enhanced version of JavaScript language, which means we can still use pure JavaScript syntax to build Ionic 2 applications. But of course, Typescript has its own strengths, such as ES6 and ES7 syntax, static-typing, smart code undo feature, etc. Hence, there is no reason for developers not to upgrade to this new version.

What is the future of Ionic?

 

The scope of this article will not be big enough to cover all the new and good things that Ionic 1 or Ionic 2 brings to us. We can say that updating Ionic from version 1 to version 2 is a big revolution for Ionic. With those who have good background in Web, using Ionic to expand their career path is a smart choice. For the large community, with all the benefits including the ability to operate well on two major mobile operating systems (iOS, Android), specific documentation, variety of examples, intensive care from developers, we think this framework is the future for Client-oriented programmers.

Hopefully with this article, you can get the sharp picture about mobile development. With the strength that Ionic brings, developers just need to grasp the knowledge base in HTML, CSS and JavaScript and they can totally conquer the challenging and extremely diverse path of Front End development.


Related articles