"Preliminary ionic" will not native to develop the app?

Source: Internet
Author: User

Objective

Hybrid technology has been popular for some time, the landlord's focus has been around the mobile side around the hybrid-related deployment, Hybrid has greatly improved the development efficiency of the development method, but still need at least one iOS and andriod, So can you just use H5-related knowledge to make an app? The answer is yes.

What is Cordova?

Cordova is a mobile development framework that allows us to focus only on front-end code and then build an installable app from a development framework, because the features of the front-end code, so this app is cross-platform, can maximize development efficiency, because only the front-end personnel, Its cost savings are also not to be ignored!

PS: Many times some friends will also talk about PhoneGap, in fact PhoneGap refers to Cordova

In fact, Cordova and hybrid are consistent, but hybrid in the iOS and Andriod webview containers are developed by our native colleagues, and Cordova Packaging WebView container is the company developed, here so-called cross-platform, In fact, there is a company to make this kind of platform products to support.

Another question arises here, which is good?

It is better to look at the application scenario, this and whether to use the third party outside the front-end UI plug-in is consistent, the outside of the plug-chatty, but the performance may be almost, do it yourself, customization needs or performance aspects may be more, in the current situation, A little bit of strength of the company will be by their own native team to do hybrid WebView container shell, some start-up team or the beginning of the mobile team will use Cordova test water.

Ps:cordova most suitable for the scene is the front-end outsourcing!!!

The entire architecture will still not jump out of this diagram, the basic application using H5 development, native provide interface, interaction with a phone gap bridge layer.

IONIC

Ionic is a Cordova-based mobile development framework, one of his main advantage is to provide a lot of UI, so for developers to worry about, followed by ionic use of ANGULARJS as a supporting framework (strong dependence), so for the front end is a very good experience.

Of course, ionic in some andriod machine performance is not very good, because is embedded resources, as the app loading speed is not OK, but the same set of code if you want to use H5 site, the size of ANGULARJS is a big constraint.

We have done a brief introduction here, and we are simply practicing one and experiencing his power.

More Learning Tutorials: http://www.runoob.com/ionic/ionic-tutorial.html

Simple Practice Installation Ionic

We're going to git. Download source file (release): Https://github.com/driftyco/ionic/tree/master/release

We created a new demo folder under the catalogue and added index.html:

1 <!DOCTYPE HTML>2 <HTMLNg-app= "Ionicapp">3 <Head>4     <MetaCharSet= "UTF-8">5     <title>Ionic Demo</title>6     <Linkhref=".. /css/ionic.min.css "rel= "stylesheet"type= "Text/css" />7     <Scriptsrc=".. /js/ionic.bundle.min.js "type= "Text/javascript"></Script>8     <Scripttype= "Text/javascript">9 Angular.module ('Ionicapp', ['Ionic']). Controller ('Myctrl', function($scope) {Ten         }); One     </Script> A </Head> - <BodyNg-controller= "Myctrl"> -     <Ion-header-barclass= "Bar-positive"> the     <H1class= "title">Hello world!</H1> -     </Ion-header-bar> -     <ion-content> -         <P>My first Ionic app.</P> +     </ion-content> - </Body> + </HTML>

From here can be seen ionic several characteristics:

① strong dependence on ANGULARJS (previously said)

The ②body part relies on Iscroll, and as for the advantages and disadvantages of iscroll, we discussed earlier:

Http://www.cnblogs.com/yexiaochai/p/3762338.html

Http://www.cnblogs.com/yexiaochai/p/3764503.html

③ has its own set of UI systems

The first eye feeling is:

① the frame is more perfect, the development efficiency must be very high

② Not sure whether it is suitable for client products, because JS and CSS size are very large

③ visual style comparison fixed, if a company has its own specifications may not be suitable for

④ because of the inherent characteristics of angular and iscroll, the application made out may not be too good to experience

Ionic installation

We have a simple experience with the next ionic in the browser, then we need to put it on the mobile device to run, the first step here is the environment installation.

Before you do this, make sure that your computer has a node environment and then execute the command line:

NPM install-g Cordova Ionic

Then we randomly look for a directory to create our first project, MyApp:

Ionic Start myApp Tabs

You need to install the Andriod development environment here, otherwise, the following commands will be error, if there is a andriod environment, you can successfully run:

$ cd myapp$ Ionic platform add android$ Ionic build android$ Ionic emulate Android

If normal, the skill pop-up simulator:

If you want to do ionic applications, the IOS&ANDRIOD environment needs to be installed, may also need to use eclipse, here you look at the document, there is not much to say.

Conclusion

Because I want to do a more in-depth understanding of hybrid, so today took the time to simply understand the next ionic, but also just very simple to understand, if you really want to produce applications you can go to the above Web site seriously study it, to my experience, there are angular the basis of the words, Learning cycle in a week or so can be into the PIT development!!!

Later we will be more in-depth study of the major companies hybrid some implementations, interested friends can continue to pay attention.

The text is only a personal point of view, if you are wrong, please correct me, not enough to ask you.

"Preliminary ionic" will not native to develop the app?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.