Mac应用编程指南之一——关于OS X应用设计

来源:互联网 发布:米多大数据引擎 编辑:程序博客网 时间:2024/05/21 10:26
About OS X App Design
关于OS X 应用设计
This document is the starting point for learning how to create Mac apps. It contains fundamental information about the OS X environment and how your apps interact with that environment. It also contains important information about the architecture of Mac apps and tips for designing key parts of your app.
这篇文章是学习创建Mac应用的起点。它包含OS X环境的基础信息,以及应用如何与该环境进行交互。它还包括Mac应用结构的重要信息和设计应用关键部分的提示。


At a Glance
纵览
Cocoa is the application environment that unlocks the full power of OS X. Cocoa provides APIs, libraries, and runtimes that help you create fast, exciting apps that automatically inherit the beautiful look and feel of OS X, as well as standard behaviors users expect.
Cocoa是解锁了OS X强大性能的应用设计环境。Cocoa提供了API、库、运行环境,帮助你快速创建激动人心的应用。这些应用可以自动继承OS X的漂亮外观和体验,以及用户期待的基础行为。

Cocoa Helps You Create Great Apps for OS X
Cocoa帮助你创建伟大的OS X应用
You write apps for OS X using Cocoa, which provides a significant amount of infrastructure for your program. Fundamental design patterns are used throughout Cocoa to enable your app to interface seamlessly with subsystem frameworks, and core application objects provide key behaviors to support simplicity and extensibility in app architecture. Key parts of the Cocoa environment are designed particularly to support ease of use, one of the most important aspects of successful Mac apps. Many apps should adopt iCloud to provide a more coherent user experience by eliminating the need to synchronize data explicitly between devices.
使用Cocoa来写OS X应用程序,它提供了丰富的基础架构。基础设计模式贯穿始终,允许你的应用与子系统框架无缝连接。核心应用对象提供关键功能,来支持应用结构的简单和可扩展性。Cocoa环境的关键部分进行了特别设计,确保了应用的易用性,这是一个成功的Mac应用程序最重要的方面之一。应用可以适配iCloud,不需要复杂操作就可以完成设备之间的数据同步,为用户提供连续一致的体验。
Relevant Chapters: The Mac Application EnvironmentThe Core App Design, and Integrating iCloud Support Into Your App

Common Behaviors Make Apps Complete
通用功能使应用更完整
During the design phase of creating your app, you need to think about how to implement certain features that users expect in well-formed Mac apps. Integrating these features into your app architecture can have an impact on the user experience: accessibility, preferences, Spotlight, services, resolution independence, fast user switching, and the Dock. Enabling your app to assume full-screen mode, taking over the entire screen, provides users with a more immersive, cinematic experience and enables them to concentrate fully on their content without distractions.
在创建应用的各个设计阶段,你需要考虑如何实现用户需要的特定功能,并保证应用的苗条。把下列功能集成到你的应用结构中,有助于提升用户体验:辅助功能、偏好、Spotlight、服务、独立分辨率、快速用户切换、Dock。允许你的应用使用全屏模式,占据整个屏幕,为用户提供沉浸式、影院式体验,使他们全神贯注,不被打扰。
Relevant Chapters: Supporting Common App Behaviors and Implementing the Full-Screen Experience

Get It Right: Meet System and App Store Requirements
正确配置:满足系统和App Store需求
Configuring your app properly is an important part of the development process. Mac apps use a structured directory called a bundle to manage their code and resource files. And although most of the files are custom and exist to support your app, some are required by the system or the App Store and must be configured properly. The application bundle also contains the resources you need to provide to internationalize your app to support multiple languages.
正确配置应用是开发过程的一个重要环节。Mac应用使用一个结构化的目录——“bundle(包)”,来管理代码和资源文件。尽管大多数文件都是自定义、用于支撑你的应用的,但有一部分是系统和App Store要求的,必须正确配置。应用包还包含应用所需的国际化资源,用于支持多语言。
Relevant Chapter: Build-Time Configuration Details

Finish Your App with Performance Tuning
性能调试,完成应用
As you develop your app and your project code stabilizes, you can begin performance tuning. Of course, you want your app to launch and respond to the user’s commands as quickly as possible. A responsive app fits easily into the user’s workflow and gives an impression of being well crafted. You can improve the performance of your app by speeding up launch time and decreasing your app’s code footprint.
待到开发完成、代码成型之后,就可以开始性能调试了。你肯定希望你的应用能尽可能快地启动、尽可能快地响应用户命令。一个反应迅速的应用能使用户工作顺手,并留下制作精良的的好印象。可以采取加速启动、优化代码等方式改进你的应用体验。
Relevant Chapter: Tuning for Performance and Responsiveness

How to Use This Document
如何使用这篇文档
This guide introduces you to the most important technologies that go into writing an app. In this guide you will see the whole landscape of what's needed to write one. That is, this guide shows you all the "pieces" you need and how they fit together. There are important aspects of app design that this guide does not cover, such as user interface design. However, this guide includes many links to other documents that provide details about the technologies it introduces, as well as links to tutorials that provide a hands-on approach.
这篇指南旨在介绍编写一个OS X应用最重要的技术。在这里你将看到完成应用所需要的完整知识。它将展示所有的知识“碎片”,以及将这些“碎片”组合到一起的方法。还有一些重要的方面这里没有涉及,比如用户界面设计。不过,这里包含了指向它所介绍技术细节的文档链接,同时还有实践教程的链接。
In addition, this guide emphasizes certain technologies introduced in OS X v10.7, which provide essential capabilities that set your app apart from older ones and give it remarkable ease of use, bringing some of the best features from iOS to OS X.
另外,这篇指南着重介绍了OS X v10.7引入的特定技术,这些从iOS引入OS X的优秀特性,可以提供必要的能力,使你的应用与老版本脱离,并显著增强易用性。

See Also
还可参考
The following documents provide additional information about designing Mac apps, as well as more details about topics covered in this document:
下列文档提供设计Mac应用的额外信息,以及本篇文档所涉及话题的更多细节:
  • To work through a tutorial showing you how to create a Cocoa app, see Start Developing Mac Apps Today.
  • 通过一个教程向您展示如何创建Cocoa应用程序,参考 Start Developing Mac Apps Today.
  • For information about user interface design enabling you to create effective apps using OS X, see macOS Human Interface Guidelines.
  • 获取用户界面设计信息,以便使用OS X创建有效的应用程序,参考macOS Human Interface Guidelines.
  • To understand how to create an explicit app ID, create provisioning profiles, and enable the correct entitlements for your application, so you can sell your application through the Mac App Store or use iCloud storage, see App Distribution Guide.
  • 理解如何创建app ID、创建描述文件、为应用配置权限,从而通过Mac App Store销售应用、使用iCloud存储,参考App Distribution Guide.
  • For a general survey of OS X technologies, see Mac Technology Overview.
  • 通览OS X技术,参考 Mac Technology Overview.
  • To understand how to implement a document-based app, see Document-Based App Programming Guide for Mac.
  • 理解如何实现基于文档的应用,参考 Document-Based App Programming Guide for Mac.

原文摘自苹果官网,译文为原创,请勿转载。
水平有限,译文有错误、疏漏之处,敬请指正。
知识有价,感谢您支持原创,微信扫码赞助

邮箱:johnbob2014@icloud.com
微信公众号CocoaLover,扫码关注:

0 0
原创粉丝点击