概述

Overview

概述

Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms' native development language. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's sensors, data, and network status.

Apache Cordova是一个开源的移动开发框架。它允许你使用标准的Web技术,如HTML5,CSS3和JavaScript的,跨平台的开发,避免每个移动平台的本地开发语言。应用程序在针对每个平台的包装,并依靠符合标准的API绑定访问各装置的传感器,数据,和网络状态。

Apache Cordova graduated in October 2012 as a top level project within the Apache Software Foundation (ASF). Through the ASF, future Cordova development will ensure open stewardship of the project. It will always remain free and open source under the Apache License, Version 2.0. Visit cordova.apache.org for more information.

Apache Cordova毕业于2012十月在Apache软件基金会的高级项目(ASF)。通过ASF,未来科尔多瓦发展将确保项目的开放式管理。它将永远是自由和开放的Apache许可证下的源代码,版本2。更多信息请访问cordova.apache.org。

Use Apache Cordova if you are:

如果你是使用Apache Cordova:

a mobile developer and want to extend an application across more than one platform, without having to re-implement it with each platform's language and tool set.

一种移动开发者想扩展一个应用在多个平台上,而无需重新执行每个平台的语言和工具集。

a web developer and want to deploy a web app that's packaged for distribution in various app store portals.

Web开发人员和要部署一个web应用程序的打包为各种应用程序商店入口分布。

a mobile developer interested in mixing native application components with a WebView (browser window) that can access device-level APIs, or if you want to develop a plugin interface between native and WebView components.

一个混合的本地应用程序组件与对象感兴趣的移动开发者(窗口),可以访问设备级的原料药,或者如果你想发展本土WebView组件之间的插件接口。

Basic Components

基本成分

Apache Cordova applications rely on a common config.xml file that provides information about the app and specifies parameters affecting how it works, such as whether it responds to orientation shifts. This file adheres to the W3C's Packaged Web App, or widget, specification.

Apache Cordova应用程序依赖于一个共同的config.xml文件提供有关应用程序的信息和指定如何工作参数的影响,如是否响应取向的转变。本文件遵循W3C的Web应用程序或组件,包装,规格。

The application itself is implemented as a web page, named index.html by default, that references whatever CSS, JavaScript, images, media files, or other resources are necessary for it to run. The app executes as a WebView within the native application wrapper, which you distribute to app stores.

应用程序本身是一个网页的默认实现,名为index.html,引用任何CSS,JavaScript,图像,多媒体文件,或其它资源才能运行。应用程序执行在本地应用程序包装WebView,你分配到软件商店。

The Cordova-enabled WebView may provide the application with its entire user interface. On some platforms, it can also be a component within a larger, hybrid application that mixes the WebView with native application components. (See Embedding WebViews for details.)

科尔多瓦启用Web视图可提供整个用户界面中的应用。在某些平台上,它也可以在一个更大的一个组成部分,混合应用,将Web视图与本地应用程序组件。(见嵌入WebViews详情。)

A plugin interface is available for Cordova and native components to communicate with each other. This enables you to invoke native code from JavaScript. As of version 3.0, plugins provide bindings to standard device APIs. Third-party plugins provide additional bindings to features not necessarily available on all platforms. You can find these third-party plugins in the plugin registry and use them in your application. You can also develop your own plugins, as described in the Plugin Development Guide. Plugins may be necessary, for example, to communicate between Cordova and custom native components.

一个插件接口是供科尔多瓦和本地组件互相沟通。这使您能够从JavaScript调用本机代码。在3版本中,插件提供的API绑定标准装置。第三方插件提供额外的绑定不一定在所有平台上可用的功能。你可以在插件注册表找到这些第三方插件和使用他们的应用程序。您也可以开发你自己的插件,在插件开发指南描述。插件可以例如是必要的,以科尔多瓦和自定义,本地组件之间的通信。

Development Paths

发展路径

As of version 3.0, you can use two basic workflows to create a mobile app. While you can often use either workflow to accomplish the same task, they each offer advantages:

在3版本中,你可以使用两个基本的工作流来创建一个移动应用程序。通常你可以使用工作流来完成相同的任务,他们每个人的优点:

Cross-platform workflow: Use this workflow if you want your app to run on as many different mobile operating systems as possible, with little need for platform-specific development. This workflow centers around the cordova utility, otherwise known as the Cordova CLI, that was introduced with Cordova 3.0. The CLI is a high-level tool that allows you to build projects for many platforms at once, abstracting away much of the functionality of lower-level shell scripts. The CLI copies a common set of web assets into subdirectories for each mobile platform, makes any necessary configuration changes for each, runs build scripts to generate application binaries. The CLI also provides a common interface to apply plugins to your app. For more details on the CLI, see The Command-Line Interface. Unless you have a need for the platform-centered workflow, the cross-platform workflow is recommended.

跨平台的工作流:如果你想让你的应用程序运行在不同的手机操作系统可能使用此工作流,很少需要特定于平台的发展。本工作围绕科尔多瓦实用,否则称为科尔多瓦,CLI,介绍了科尔多瓦3。CLI是一个高层次的工具,可以让你一次多平台建设项目,抽象掉许多较低级别的shell脚本的功能。CLI份网络资产共同进入子目录为每个移动平台,使每一个必要的配置的变化,运行构建脚本来生成应用程序的二进制文件。CLI也提供了一个通用的接口应用插件,您的应用程序。在命令行的更多细节,请参阅命令行界面。除非你有一个平台需要为中心的工作流,工作流的跨平台的建议。

Platform-centered workflow: Use this workflow if you want to focus on building an app for a single platform and need to be able to modify it at a lower level. You need to use this approach, for example, if you want your app to mix custom native components with web-based Cordova components, as discussed in Embedding WebViews. As a rule of thumb, use this workflow if you need to modify the project within the SDK. This workflow relies on a set of lower-level shell scripts that are tailored for each supported platform, and a separate Plugman utility that allows you to apply plugins. While you can use this workflow to build cross-platform apps, it is generally more difficult because the lack of a higher-level tool means separate build cycles and plugin modifications for each platform. Still, this workflow allows you greater access to development options provided by each SDK, and is essential for complex hybrid apps. See the various Platform Guides for details on each platform's available shell utilities.

平台为中心的工作流程:如果你想集中在一个单一的平台上建立应用程序,需要能够修改它,在一个较低的水平使用此工作流。你需要使用这个方法,例如,如果你想让你的应用程序和自定义本地组件与基于Web的科尔多瓦组件,如嵌入WebViews讨论。作为一个经验法则,如果你需要修改项目中的SDK使用此工作流。此工作流模型依赖于一组低级别的shell脚本,是专门为每个支持的平台,和一个单独的电源操作工的实用工具,允许你使用的插件。虽然您可以使用这个工作流程建立跨平台的应用程序,它通常是更困难,因为更高一级的工具的缺乏意味着单独的建造周期和插件修改每个平台。不过,这个工作让你更获得发展的选项,每个SDK提供的,是复杂的混合应用必不可少的。看到在每个平台的可用外壳工具细节的各个平台引导。

When first starting out, it may be easiest to use the cross-platform workflow to create an app, as described in The Command-line Interface. You then h

在开始,这可能是最容易使用的跨平台的工作流来创建一个应用程序,在命令行界面描述。你那么H


你可能感兴趣的:(概述)