当前位置: 首页 > news >正文

iOS开发笔记 2、Cocoa简明

历史

NeXSTEP

Many years ago Cocoa was known as NeXTSTEP . NeXT Computer developed and released version 1.0 ofNeXTSTEP in September of 1989, and versions 2.0 and 3.0 followed not far behind (in 1990 and 1992,respectively). In this early phase, NEXTSTEP was more than an application environment; the term referred tothe entire operating system, including the windowing and imaging system (which was based on DisplayPostScript), the Mach kernel, device drivers, and so on.Back then, there was no Foundation framework. Indeed, there were no frameworks; instead, the softwarelibraries (dynamically shared) were known as kits, the most prominent of them being the Application Kit.Much of the role that Foundation nowoccupieswas taken by an assortment of functions, structures, constants,and other types. The Application Kit itself had a much smaller set of classes than it does today. In addition to the Application Kit, the early NeXTSTEP included the Sound Kit and the Music Kit, librariescontaining a rich set of Objective-C classes that provided high-level access to the Display Postscript layer foraudio and music synthesis.

 

OpenStep

In early 1993 NeXTSTEP 3.1 was ported to (and shipped on) Intel, Sparc, and Hewlett-Packard computers.NeXTSTEP 3.3 alsomarked amajor new direction, for it included a preliminary version of Foundation. Aroundthis time (1993), the OpenStep initiative also took form. OpenStep was a collaboration between Sun andNeXT to port the higher levels of NeXTSTEP (particularly the Application Kit and Display PostScript) to Solaris.The “Open” in the name referred to the open API specification that the companies would publish jointly. Theofficial OpenStep API, published in September of 1994, were the first to split the API between Foundationand Application Kit and the first to use the “NS” prefix.

By June 1996 NeXT had ported and shipped versions of OpenStep 4.0 that could run Intel, Sparc, andHewlett-Packard computers as well as an OpenStep runtime that could run on Windows systems. Sun alsofinished their port of OpenStep to Solaris and shipped it as part of their Network Object ComputingEnvironment. OpenStep, however, never became a significant part of Sun’s overall strategy.

Cocoa

When Apple acquired NeXT Software (as it was then called) in 1997 ,OpenStep became the Yellow Box andwas included with Mac OS X Server (also known as Rhapsody) and Windows. Then, with the evolution of theMac OS X strategy, it was finally renamed to “Cocoa.”

Cocoa Framework

框架的组成,包括基础和应用

■ Mac OS X: Foundation and Application Kit

■iOS: Foundation and UIKit

Foundation

The Foundation framework defines a base layer of classes that can be used for any type of Cocoa program.The criterion separating the classes in Foundation from those in the Application Kit is the user interface.

Application Kit (Mac OS X)

The Application Kit (which is sometimes referred to as the AppKit) is a framework containing all the objectsyou need to implement your graphical, event-driven user interface on Mac OS X: windows, dialogs, buttons,menus, scrollers, text fields—the list goes on.

UIKit (iOS)

The UIKit framework on iOS is the sister framework of the Application Kit onMac OS X. Its purpose is essentiallythe same: to provide all the classes that an application needs to construct and manage its user interface.However, there are significant differences in how the frameworks realize this purpose.

Core Data

Core Data is a Cocoa framework that provides an infrastructure formanaging object graphs, including supportfor persistent storage to a variety of file formats. Object-graph management includes features such as undoand redo, validation, and ensuring the integrity of object relationships. Object persistence means that CoreData saves model objects to a persistent store and fetches them when required. The persistent store of aCore Data application—that is, the ultimate form in which object data is archived—can range from XML filesto SQL databases. Core Data is ideally suited for applications that act as front ends for relational databases,but any Cocoa application can take advantage of its capabilities.

Other Frameworks With Cocoa API

除了以上的基础框架以外,还有各种基于Cocoa的其他框架,如:

Sync Services—(Mac OS X only)

Address Book

Preference Panes—(Mac OS X only)

Screen Saver—(Mac OS X only)

iAd—(iOS only)

Map Kit—(iOS only)

知道了这些基本概念后,可以熟悉一下“Cocoa Fundamentals Guide”文档

然后参考一些相关的文档和例子就可以熟悉整个的框架情况

Cocoa Fundamentals Guide

■ Cocoa Fundamentals Guide

introduces the basic concepts, terminology, architectures, and design patternsof the Cocoa frameworks and development environment.

http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaFundamentals.pdf

这个官方文档包含了很多信息

特别4,5章描述了Cocoa中使用到的设计模式和对象之间的通讯形式,非常重要,否则使用这些类时,如果对设计模式等不熟悉的话,估计会一头雾水

转载于:https://www.cnblogs.com/greywolf/archive/2012/12/13/2815578.html

相关文章:

  • 烟花散尽漫说无(參考资料)
  • 我也谈谈《驳“永远不要对一个外行聊你的专业”【十全十美】》
  • iOS 界面 之 EALayout 无需反复编译,可视化实时界面,告别Storyboard AutoLayout Xib等等烦人的工具...
  • windows 7 启用虚拟Wifi 热点网络只需3步搞定
  • hibernate将enum映射成int或varchar类型
  • 如果一个按钮被覆盖如何响应?
  • SEO优化的黑帽手法是否值得使用?
  • json.net处理复杂json
  • 各种***批处理
  • 链表 UVA 11988 Broken Keyboard (a.k.a. Beiju Text)
  • 综合力矩分解算法
  • cocos2dx3.2升级Android5的坑
  • 进程与线程的区别
  • ubuntu14.04 qq安装
  • LDAP Account Manager 4.0 发布
  • 深入了解以太坊
  • Angular数据绑定机制
  • CSS盒模型深入
  • ES6 ...操作符
  • jdbc就是这么简单
  • mysql innodb 索引使用指南
  • mysql 数据库四种事务隔离级别
  • Redash本地开发环境搭建
  • Service Worker
  • SpringBoot 实战 (三) | 配置文件详解
  • 阿里云前端周刊 - 第 26 期
  • 第三十一到第三十三天:我是精明的小卖家(一)
  • 给第三方使用接口的 URL 签名实现
  • 工程优化暨babel升级小记
  • 关于Flux,Vuex,Redux的思考
  • 十年未变!安全,谁之责?(下)
  • 使用 Xcode 的 Target 区分开发和生产环境
  • 小程序button引导用户授权
  • 阿里云重庆大学大数据训练营落地分享
  • ​520就是要宠粉,你的心头书我买单
  • ​ssh-keyscan命令--Linux命令应用大词典729个命令解读
  • # 再次尝试 连接失败_无线WiFi无法连接到网络怎么办【解决方法】
  • #我与Java虚拟机的故事#连载17:我的Java技术水平有了一个本质的提升
  • (1/2) 为了理解 UWP 的启动流程,我从零开始创建了一个 UWP 程序
  • (145)光线追踪距离场柔和阴影
  • (超详细)2-YOLOV5改进-添加SimAM注意力机制
  • (二)linux使用docker容器运行mysql
  • (附源码)基于ssm的模具配件账单管理系统 毕业设计 081848
  • (转)Linux整合apache和tomcat构建Web服务器
  • *上位机的定义
  • @EnableWebMvc介绍和使用详细demo
  • @Transactional 详解
  • [ vulhub漏洞复现篇 ] Hadoop-yarn-RPC 未授权访问漏洞复现
  • [20171102]视图v$session中process字段含义
  • [AIGC] Nacos:一个简单 yet powerful 的配置中心和服务注册中心
  • [C/C++] -- 二叉树
  • [ERROR] 不再支持目标选项 5。请使用 7 或更高版本
  • [HackMyVM]靶场 Quick3
  • [LeetCode]Balanced Binary Tree
  • [LeetCode]-Integer to Roman 阿拉伯数字转罗马数字