Start Developing Mac Apps Frameworks 框架

Frameworks

An app consists of code you write and frameworks Apple provides. A framework contains a library of methods your app can call. More than one app can access a framework library at the same time.

一个应用程序由你编写的代码和Apple提供的框架组成。 一个框架包含了一个应用程序能调用的一个方法库。 同一时间多个应用程序可以同时访问一个框架库。

image: ../Art/framework_2x.png

Any app that you develop will link to multiple frameworks. You can take advantage of a framework through its application programming interface (API). The API, published in header files, specifies the available classes, data structures, and protocols. Apple writes frameworks that anticipate the basic features you might want to implement. You should use frameworks both to save time and effort and to make sure your code is efficient and secure. The system frameworks are the only way to access the underlying hardware.

任何你开发的应用程序都将链接到多种框架。 你可以通过框架的应用程序接口(API)来利用该框架。 API 在它的头文件里指定了各种可用的类, 数据结构以及各种协议。Apple根据预知你可能想实现的基本功能编写出了各种框架。 你应该使用框架,它能节省时间和尽力,从而确保的你代码高效安全。 系统框架是访问底层硬件(underlying hardware)的唯一途径。

Read This Article NowRead These Articles Now: 

现在开始阅读:

  • Survey the Major Frameworks describes the frameworks that are most commonly used in app development. It also briefly explains some of the differences and similarities between OS X and iOS APIs.

    Survey the Major Frameworks 描述了在应用程序开发中最通用的各种框架。 它同时简要说明了一个OS X 和 iOS APIs 之间的区别和相同点。

  • Integrate Your Code with the Frameworks describes the kinds of methods found in Objective-C frameworks and explains how you can integrate your app’s code with a framework’s code. Although there are differences between OS X and iOS API, the relationship between your app and a framework is generally the same.

    Integrate Your Code with the Frameworks 描述了Objective-C框架里的各种方法, 同时解释了如何整合(integrate)你的应用代码和框架代码。尽管OS X 和 iOS API 之间存在差异,但是你的应用程序跟一个框架之间的关系是基本上一样的。



原文地址:https://www.cnblogs.com/patientAndPersist/p/3134496.html