What is a good development setup for Ionicframework - ionic-framework

I’m using Ionic with Angular to write an iOS and Android app.
But most of the development I use ionic serve with Chrome, it’s fast and simple.
But now I realized that it’s getting harder when I have to use the native HTTP API to do fundamental things like talking to a rest api on my server. The native HTTP api is working for the iOS/Android app in production, but not in the web app mode I’m using for development.
I know that I there are options like live reload for iOS and Android but they are still lazy in my point of view.
So I’m asking you:
Do you prefer developing directly with iOS/Android emulator/devices or are you also using the web app and found a way around the troubles above?

there is no way you can test native HTTP on the browser. you have to use an emulator or a native device. BUT, for testing UI you can run the command ionic serve --lab instead of ionic serve. do it and see the difference.
to test HTTP on the browser you must use HttpClient.

Related

Iconic's ability to support complex web applications

Ionic was built with mobile in mind - creating a good mobile experience using web technologies. You start out with a web app, so there is the possibility to use it for all 3 platforms. However I’ve never seen anything that resembles a complex web application that uses iconic for both the web and mobile. Will it support the ability to use 3rd party controls such as complex grid controls that may only be used on the web and not in the mobile apps. I’m trying to decide if we use ionic just for mobile and have a completely separate code base for our web application. Any invites would be greatly appreciated!
Basically everything that works on the web also works on mobile devices built with Ionic.
Ionic creates a WebView where javascript code runs. you can use capacitor or cordova to manage native functionality.
So if you have web developers you can do anything you could do as "Mobile Web" but in an app.
Now you can also choose whether to use react, angular or vue.
For example using Ionic with react you can use the VirtualDom and develop exactly as if you were using react on the web.
Instead, using for example React Native you will be forced to use a set of react components (or write new ones) but you will not have the VirtualDom available.
However you can also integrate native code, which Ionic doesn't support.
There are a lot of articles online that cover the subject by comparing competitors:
From Ionic
So yes, you can use all javascript libraries!

How to share ionic app to clients?

What is the best way to share an ionic app to clients in our time?
I was using diawi service. It works great for me but it is not easy for clients. I should explain every time what should they do to run APK file for example.
Ionic provides Ionic View for iOS & Android
https://ionicframework.com/pro/view
You can push your source code to their server and it is built automatically, and gives you a code to hand out to clients.

Difference between react and ionic framework

I have read some docs and i do not really understand what are the differences between react and ionic frameworks.
Is one of them made from the other ?
I have to store local data. I suppose one of them is just web and javascript so data is only stored on server ? Or is it possible to do local storage with both of them.
Is it possible to host the app on a web server without having a "real" app ?
Thanks
Hi I think that you are a little bit confused. I hope this clarify your doubts:
Ionic framework is a set of tools for create Hybrid apps using html/css and javascript, It is build using apache cordova and Angular 1. In the other hand you have React a library for build rich UX(User experience) web apps.
Ionic is not build on react. They are different purpose tools but you can use that together (Using IONIC 2).
In both cases you can use local storage, but if you want to store data in servers you have to build your own backend to provide data to the app They are front end oriented frameworks(no server side)
You can put Ionic code on a server it is simple JavaScript and HTML but this is not the purpose of the framework and if you do it, you loose the native apis of the device. In the case of React it is just a library and you can use it in an existing project using HTML and Javascript or build your app entirely with it.
You have a long road ahead, hope this help you.
Ionic is an HTML5 mobile app development framework targeted at building hybrid mobile apps. They are essentially small websites running in a browser shell in an app that have access to the native platform layer.
React Native is the next generation of React – a JavaScript code library developed by Facebook and Instagram, which was released on Github in 2013. React Native lets you build mobile apps using only JavaScript.
They have their own way of functioning, below are few points on their differences:
Ionic is a regular web app, written using HTML, CSS, and JavaScript, but it runs in a webview embedded in a native app instead of in a stand-alone mobile browser
React Native has a completely different architecture: instead of writing your UI using web technologies, it uses the React component model to render to native views.
Ionic is a Cordova based app that wrap current web app into a mobile application. It uses the android existing web view to render the app so the file size is quite small
Meanwhile react native create bridge between JavaScript and native component.
When it comes to memory usage, Ionic framework uses more than react native apps
The Ionic app is slower at loading videos because it needs to download from other server, while in react native, it caches the tiles so it loads faster.
When it comes to integration, react native can use every client based JavaScript modules from npm (node package manager) whereas Ionic uses only the Cordova-based code.
Ionic is a framework that creates an idea of writing code only once
React native is not a write once and run anywhere framework, but is popularly touted as a “learn once, write anywhere” framework
Ionic Framework app needs to use device features and APIs through Apache Cordova plugins.
With react native you can access any device component or API
Based on the points above, you can see the difference in their functionalities, so if you want to go for something that creates performant iOS and Android apps that feel at home on their respective platforms ten you can opt for React Native.
And, if you are targeted at building hybrid mobile apps, Ionic is the best choice!

What makes nativescript better than ionic

im new to mobile development and i see ionic framework has very big community BUT
i know that ionic uses webview while nativescript generates native components
my question now what nativescript can do ionic cannot do?
in other words what is the powerful points in nativescript that does not exists in ionic
thanks in advance.
Ionic is hybrid, running inside webview which has problem with performance at particular things like even simpler animation, not fully accessible API of native part
Nativescript runs as native app, controlled by JS code but can be used even with native code or even as addon to native app and full access to API of native code

Building app, mobile web app and desktop web app using Ionic

We will develop an app that we would like to distribute in through the following channels:
Android and iOS apps through Google Play and iTunes (the app will
use notifications extensively and presence in Google Play and App store is required)
Web app to run in web browsers on mobile devices
Web app to run in web browsers on laptop and desktop computers. We would like to support Chrome, Internet Explorer (starting from IE9),
Firefox and Safari browsers.
Our understanding is that Ionic is developed targeting primarily 1. and that the web apps in 2. and 3. above are not really what Ionic is intended for. We have looked around to try to understand if Ionic likely works for 2. and 3. and also made some quick tests ourselves.
From one of the links at the end: "Your webapp will run in desktop browsers yes, as it is made of html, css and javascript. The phonegap specific javascript calls (accelerometer, compass, file, etc) won't. Basically, if you stick to standard yes you will be able to port relatively easily your app to most browser, the job at this point being mostly a work of theming."
From another one: "I do know that FireFox is simply not supported. I don't know how well Ionic works in IE X."
To try it out we have built a limited version of our app in Ionic. From what we can see the app works for 1, 2 and 3. For example, it runs without issues on FireFox that is mentioned as not supported in the quote above. This means that to us it looks like the first quote saying that the web app will work in desktop browsers is correct.
I understand that this is a fairly generic question and might be hard to answer, but since we have found contradicting information when looking we are trying to understand more before making a decision.
Any feedback would be appreciated.
Thanks,
Markus
Is it a good idea to use ionic to build mobile web version of a website?
Can Ionic Framework run in desktop web browser like Chrome, Mozilla, IE9+?
http://forum.ionicframework.com/t/ionic-components-on-ie/1826
Phonegap web app in regular desktop browsers
http://ionicframework.com/docs/overview/#css-sass
Ionic is tested for mobile only. Internet Explorer for example is not tested and does not properly handle a number of features in Ionic. Desktop browsers act differently than mobile browsers.
Ionic is focused on building native/hybrid mobile apps rather than
mobile websites.
As such, our browser support tends to be whatever Web View API is
available to native apps on a given platform. For Ionic 1.1.0
"xenon-xerus", that means UIWebView for iOS 7+, and Android 4.1 and
up. Windows Phone and FirefoxOS support is on our roadmap.
If it's cheaper for you to test everything on all different desktop browsers than to develop a version for it sharing the same controllers and services --- go ahead but it won't come "out of the box".
Also, I recommend looking at Electron to build desktop apps from webapps.
ionic is targting mobile apps only , but you can develop your desktop app using node webkit and angular material for example and share some code between your apps