iphone 框架体系结构

 用iphone开发了一段时间的程序了,突然想iphone的框架体系结构是什么样的呢?还一下子把自己给问倒了,到iphone developer center找了下,东西还不少。

不过都是英文的。

先贴上一段吧

The kernel in iOS is based on a variant of the same basic Mach kernel that is found in Mac OS X. On top of this kernel are the layers of services that are used to implement applications on the platform. Figure 1-1 shows a high-level overview of these layers.

Figure 1-1  iOS technology layers

This layering gives you choices when it comes to implementing your code. For example, the Core OS and Core Services layers contain the fundamental interfaces for iOS, including those used for accessing files, low-level data types, Bonjour services, network sockets, and so on. These interfaces are mostly C-based and include technologies such as Core Foundation, CFNetwork, SQLite, and access to POSIX threads and UNIX sockets among others.

As you move into the upper layers, you find more advanced technologies that use interfaces based on a mixture of C and Objective-C. For example, the Media layer contains the fundamental technologies used to support 2D and 3D drawing, audio, and video. This layer includes the C-based technologies OpenGL ES, Quartz, and Core Audio. It also contains Core Animation, which is an advanced Objective-C based animation engine.

In the Cocoa Touch layer, most of the technologies use Objective-C. The frameworks at these layers provide the fundamental infrastructure used by your application. For example, the Foundation framework provides object-oriented support for collections, file management, network operations, and more. The UIKit framework provides the visual infrastructure for your application, including classes for windows, views, controls, and the controllers that manage those objects. Other frameworks at this level give you access to the user’s contact and photo information and to the accelerometers and other hardware features of the device.

The starting point for any new project is the Cocoa Touch layer, and the UIKit framework in particular. When deciding what additional technologies to use, you should start with frameworks in the higher-level layers. The higher-level frameworks make it easy to support standard system behaviors with the least amount of effort on your part. You should fall back to the lower-level frameworks only if you want to implement custom behavior that is not provided at a higher level.

For a more detailed overview of the technologies in iOS, see iOS Technology Overview. 

 下面是别人的一段,帮助理解吧

 iPhone的软件栈分成好几层。应用程序位于最高的抽象层,而系统核心服务则是位于最底层。从高到低,iPhone的软件栈可以归纳成如下几层:

应用程序。

Cocoa Touch--开发基于触摸屏的应用程序的框架。包括UI元素、事件分发、应用程序生命周期管理等,还包括了基本数据类型如字符串、集合类型的对象包装。

媒体--图形、动画、声音、视频。

核心服务--集合类型、字符串、定位意识、SQLite数据库、地址簿、网络等。

核心操作系统层--UNIX服务、标准I/O、线程、BSD socket、电源管理等。

在开发中,主要打交道的部分是GUI框架和Cocoa Touch层提供的面向对象抽象。而Cocoa Touch层也是我们在本书中主要讨论的内容(当然,在某些特定的主题中,我们会根据需要来研究更深入的内容)。大多数Cocoa Touch的类是被设计用来直接调用的;可以子类化他们来增加功能,只是你会发现,跟别的语言相比较,在Cocoa Touch中很少需要这么做。

原文地址:https://www.cnblogs.com/likwo/p/2025413.html