Reputation: 749
I'm a web developer curious about these hybrid (or native?) apps I can build with HTML5 + CSS. So I decided to try building one.
So I'm totally new into this. (And also not comfortable with CLI.)
At first, I searched how to do, and found PhoneGap that can convert the HTML5 + CSS to an mobile app. Seems simply.
Then I needed a framework, and found Mobile Angular JS.
I started to build my app. But problems occurs when the app worked fine in desktop browser but couldn't load templates in ngview on the mobile app. That made me wonder if Mobile Angular JS maybe wasn't the perfect match for PhoneGap.
So I searched for what frameworks is best compatible with PhoneGap and found that Ionic would be that. But when I read about it in their Docs it makes me confused. It seems like Ionic have their own building program that makes my HTML to a working mobile app.
So, why is Ionic perfect with PhoneGap, when you already have the PhoneGap-functionality with Ionic?
I'm confused.
Edit:
After a several hours of further reading and taking in more comments, I think I can be pretty confident establish that PhoneGap isn't needed for Ionic. And Ionic isn't the best framework for testing PhoneGap.
It seems more easy with Framework7. PhoneGap says it's just to clone the Framework7 dist
content into PhoneGap's www
folder. http://phonegap.com/blog/2015/11/30/framework7/
But I'm a little worried, do I have to do that clone every time I want to test?
Perhaps I ends up with jQuery Mobile anyway...
Upvotes: 4
Views: 1375
Reputation: 12683
Ionic uses Cordova to package up HTML, CSS, and JavaScript into multi-platform native apps, but also provides extra features.
Ionic Angular components are designed and tested with mobile in mind.
Extra services like Ionic Cloud that integrate features such as push notification, deployments, native app packaging, user authentication, analytics and a realtime database has been announced.
PhoneGap promote their main features as our command line interface, the PhoneGap Desktop app, the PhoneGap Developer app, and PhoneGap Build
PhoneGap features may work with Ionic, perhaps with tweaking required, whereas Ionic features are built to work together.
Upvotes: 5
Reputation: 3848
I think a better understanding of Ionic, what it is and why to use it will help you understand better the purpose.
I'm attaching two paragraphs from Ionic's documentation:
What is Ionic, and where does it fit? Ionic is an HTML5 mobile app development framework targeted at building hybrid mobile apps. Hybrid apps are essentially small websites running in a browser shell in an app that have access to the native platform layer. Hybrid apps have many benefits over pure native apps, specifically in terms of platform support, speed of development, and access to 3rd party code.
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. Kind of like “Bootstrap for Native,” but with support for a broad range of common native mobile components, slick animations, and beautiful design.
Unlike a responsive framework, Ionic comes with very native-styled mobile UI elements and layouts that you’d get with a native SDK on iOS or Android but didn’t really exist before on the web. Ionic also gives you some opinionated but powerful ways to build mobile applications that eclipse existing HTML5 development frameworks.
Since Ionic is an HTML5 framework, it needs a native wrapper like Cordova or PhoneGap in order to run as a native app. We strongly recommend using Cordova proper for your apps, and the Ionic tools will use Cordova underneath.
Why did we build Ionic? We built Ionic because we strongly believed that HTML5 would rule on mobile over time, exactly as it has on the desktop. Once desktop computers became powerful enough and browser technology had advanced enough, almost everyone was spending their computing time in the browser. And developers were overwhelmingly building web applications. With recent advancements in mobile technology, smartphones and tablets are now capable of running many of those same web applications.
With Ionic, we wanted to build an HTML5 mobile development framework that was focused on native or hybrid apps instead of mobile websites, since we felt there were great tools already for mobile website development. So Ionic apps aren’t meant to be run in a mobile browser app like Chrome or Safari, but rather the low-level browser shell like iOS’s UIWebView or Android’s WebView, which are wrapped by tools like Cordova/PhoneGap.
Please read more here: http://ionicframework.com/docs/guide/preface.html
Upvotes: 1
Reputation: 1323
Ionic just provides basic structure and basic functionalities that you can use for your app to work(it provides css and javascript components like buttons,popups,dialogs,modals and many other stuffs) but to make it a real android ,ios or windows app you need to build it as .apk or .appx or .ipa .That is where phonegap comes in.You just follow the structure of ionic framework and then build it in phonegap,your app is ready after that.
Upvotes: 0