中国开发网: 论坛: 程序员情感CBD: 贴子 718309
looklook: ZT--更新!WebOS-SDK-chapter1(EN-CN)中英文对照-1-090218
更新!WebOS-SDK-chapter1(EN-CN)中英文对照-1-090218

Palm® webOS™ is Palm's next generation operating system. Designed around an in-credibly fast and beautiful user experience and optimized for the multi-tasking user, webOS integrates the power of a window-based operating system with the simplicity of a browser. Applications are built using standard web technologies and languages, but have access to device-based services and data.

Palm® webOS™是Palm公司新一代的操作系统。WebOS将窗口操作系统的强大功能和浏览器应用的简便性融合在一起,提供了非常快速并且华丽的用户界面,而且还为多任务操作进行了优化。可以使用任何标准的web技术和语言撰写WebOS的应用程序,同时这并不会影响到WebOS应用程序对设备底层服务和本地数据的访问。

Palm webOS is designed to run on a variety of hardware with different screen sizes, resolutions and orientations, with or without keyboards and works best with a touch-panel though doesn't require one. Because the user interface and application model are built around a web browser, the range of suitable hardware platforms is quite wide, requiring only a CPU, some memory, a wireless data connection, a display, and a means for interacting with the UI and entering text. 3 D3 i9 q- |5 N( @4 ]% R" Q9 O5 R

+ U7 y: o) V/ t7 { M( x* X4 D# UPalm webOS能够运行在许多设备上,这些设备在屏幕尺寸、分辨率以及用途上各不相同。Palm webOS支持键盘操作,尽管如此,在配备触摸屏的设备上表现更好。因为Palm webOS的用户界面和应用程序都是基于浏览器应用的,所以,只要硬件设备包含一个cpu、一些内存、支持无线数据连接、有显示设备、并且能够进行文本输入和用户界面操作,那么这个设备就能够使用Palm webOS。% a$ {& V# {" U: m, a& N
# E7 ^ ]: c0 U! V6 \& I
You can think of webOS applications as native applications, but built from the same standard HTML, CSS and JavaScript that you'd use to develop web applications. Palm has extended the standard web development environment through a JavaScript frame-work that gives standardized UI widgets, and access to selected device hardware and services.
/ f) |* k+ n; l) m) |$ l* R* Y8 X. X" N# Z# O* k: c
尽管Palm webOS应用程序开发基于标准的HTML, CSS and JavaScript(这些语言都是开发web应用程序必备的---注:web应用程序是web应用程序,WebOS应用程序是WebOS应用程序,不是一码事儿),我们仍然可以认为WebOS应用程序就是本地程序。Palm已经通过一套完成的JavaScript frame-work对标准的web开发环境进行了扩展。这套JavaScript frame-work提供了标准化的用户界面组件,并且支持对设备硬件和服务的访问。) o, B, |4 Y/ d6 P0 n
, K8 \8 ?; p0 M+ W
The user experience is optimized for launching and managing multiple applications at once. WebOS is designed around multi-tasking, and makes it utterly simple to run background applications, to switch between applications in a single step, and to easily handle interruptions and events without losing context. 5 e- O1 V4 G/ O* G: w

6 h; K0 k( C. `用户可以在WebOS上同时启动并且管理多个应用程序,Palm为此对WebOS进行了专门优化。WebOS的设计初衷就是为了更好地支持多任务,因此WebOS能够很容易地运行后台程序、能够在多个程序间一部切换,而且还能够非常轻松地在不丢失当前输入的情况下处理各种中断和系统事件。
0 E0 i3 x1 z, }/ P- R6 Z
4 a9 {& M& v+ e# C8 }1 AYou will build WebOS applications with common web development tools following typical design and implementation practices for Ajax applications. But your webOS applications are installed and run directly on the device, just as you are used to doing with native applications.
3 D% C+ _$ r; T- l2 J6 O3 [1 N, e2 r; ]- r; c( N: _ m9 }9 a% X
开发人员可以很容易地用常见的web开发工具进行开发,开发方式和开发Ajax应用程序一样。不同的是,WebOS应用程序直接安装并且运行在设备上,这一点和以前的palm应用程序没有任何区别。
; P6 u6 p/ X4 C
6 w8 c; ?+ S& M
( {% O0 T8 g/ f6 s' d8 WApplication Model , Z5 I. P0 Y3 G$ _# U
; X- U- ]+ C& j3 k3 D2 h! d& b
As shown in Figure 1, the original Palm OS has a typical native application model, as do many of the popular mobile operating systems. Under this model the application's data, logic and user interface are integrated within an executable installed on the native operating system, with direct access to the operating system's services and data. 6 M" U! k7 c1 s* A5 l0 P) q9 s" V
) n8 H# }2 W0 S; H
如图一所示,最初的PalmOS应用程序和其他流行的移动操作系统一样都是本地程序。在这种情况下,程序的数据、逻辑以及用户界面都被整合在一个可执行应用程序中,然后安装在本地操作系统上,这样能就能够直接访问操作系统服务和数据。- U: y4 q' V9 U9 I! ^

0 `2 t( B# n+ z/ @. kClassic web applications are basic HTML-based applications that submit an HTTP request to a web server after every user action, and wait for a response before displaying an updated HTML page. More common in recent years are Ajax applications, which handle many user interactions directly and make web server requests asynchronously. As a result, Ajax applications are able to deliver a richer and more responsive user experience. Some of the best examples of this richer experience are the map applica-tions, which enable users to pan and zoom while asynchronously retrieving needed tiles from the web server.
典型的web应用程序使用以 HTML为基础的语言进行开发。在每一个用户动作之后,都会向一个web服务器提交HTTP请求,然后等待回应。收到回应之后,以HTML页面的形式对返回结果进行显示。最近几年更常见的是Ajax应用程序。Ajax应用程序能够直接处理用户动作,并且能够以异步的方式向web服务器发出请求。因此,Ajax就能够提供更丰富更快速的用户体验。地图程序就是个好例子。地图程序在持全景以及缩放功能的同时,也能够异步地从web服务器获取所需的数据。

Ajax applications have some significant advantages over embedded applications. They can be more easily deployed and updated through the same search and access techni-ques used for web pages. Developing web applications is far easier too; the simplicity of the languages and tools, particularly for building connected applications, allows de-velopers and designers to be more productive. Connected applications, or applications that leverage dynamic data or web services, are becoming the predominant form for modern applications. : d' ^ D1 K& ?8 ?

Ajax应用程序相比于嵌入式程序有很大的优势。普通网页使用搜索访问技术,用同样的技术就能够很轻松地部署、升级Ajax应用程序。同样,开发web应用程序也极其简单:开发语言和开发工具很简单,这就大大提高了开发设计人员的效率,尤其是开发需要数据连接的程序时。因此,实时数据应用程序(Connected applications,不知道翻译的是否准确)以及支持动态数据和web服务的应用程序就成了主流。5 I1 U( t% T1 o5 ?
; V1 C6 `9 B5 M* b
The webOS application model combines the ease of development and maintenance of a web application with the deep integration available to native applications, signifi-cantly advancing the mobile user experience, while keeping application development simple.
3 ?+ w" @; ^ E4 F, Y! [5 J; G/ f- m
然而,WebOS应用程序,却进一步把web应用程序开发维护的简便性和本地应用程序的整体性结合在一起。极大地改善了移动用户体验,同时又保留了简便易行的开发方式。) z"

Application Framework and OS 应用程序构架和OS

Through Palm's application framework, applications can embed UI widgets with so-phisticated editing, navigation and display features, enabling more sophisticated ap-plication user interfaces. The framework also includes event handling, notification services and a multi-tasking model. Applications can run in the background, managing data, events and services behind the scenes while engaging the user when needed.
: Z9 F1 _' _ U/ t2 o
Palm的应用程序构架在用户界面组件里集成了复杂编辑、导航以及一些显示特性,这样就能够开发出更为复杂的用户界面。这套应用程序构架还包括了事件处理、通知服务、以及多任务支持。应用程序在后台运行的同时能够管理数据、事件以及相关服务,用户需要的时候可以轻易切换到显示界面。& H8 `4 }% D2 G8 E2 P8 y$ K$ b7 c

You can create and manage your own persistent data using HTML5 storage functions, and you can access data from some of webOS's core applications, such as Contacts and Calendar. You also have access to some basic system services, most of which are device-resident, such as Location services and Accelerometer data, along with some cloud services, such as XMPP messaging. ! M2 L% F5 N7 |" @; K; R& E5 V: ~

用户可以使用HTML5的存储函数对需要保存的数据进行管理,用户还能够访问WebOS核心应用程序的数据,比如联系人和日程的数据。用户也能够访问一些基本的系统服务,比如位置服务(应该和gps或者基站定位有关系)和重力感应器数据(这个应该是说WebOS支持重力感应应用,例如IPhone上的《古惑狼赛车》),这些系统服务都是常驻系统的,内嵌于设备的。除此之外,还支持一些晕服务,比如XMPP消息服务。" x: N0 b- A# I; B- c+ O! W
: d5 }( [! S/ [" u$ F$ t0 q
Architecturally, Palm webOS is an embedded Linux operating system that hosts a cus-tom User Interface (UI) System Manager built on standard browser technology. The System Manager provides a full range of system user interface features including: nav-igation, application launching and lifecycle management, event management and no-tifications, system status, local and web searches, and rendering application HTML/ CSS/JavaScript code. 9 k2 _1 ~- s, Y. O! \7 h' u

从整个构架上来说,Palm WebOS是一种嵌入式linux系统。在这个系统上,可以通过标准的浏览器技术构建可定制的用户界面管理器。这套用户界面管理器提供了一整套系统用户界面的特性,包括:导航、应用程序启动和终止、事件管理和消息通知、系统状态、本地以及web搜索、渲染解释应用程序的HTML/ CSS/JavaScript代码。% B Y6 Y: D' f+ M! v" Z6 u8 X
0 ]- P" a B; r4 m% f: k* [
You don't need to build a webOS application to make your web content accessible to webOS devices. Palm webOS has a separate browser application to handle standard web pages, and browser-based web applications. While it's expected that more and more web content and services will be delivered as webOS applications, there are mil-lions of legacy websites and information that will continue to be presented in ways best viewed with a classic web browser. Palm webOS supports traditional web content very competitively.
3 O" R. [; }. m0 ~7 o/ y7 m0 K: k1 P1 V Z' A
用户不需要专门编写一个WebOS应用程序来浏览web内容。Palm WebOS提供了一个单独的浏览器来对web内容和基于浏览器的web应用程序进行处理。尽管我们预计日后会有越来越多的web内容以WebOS应用程序的形式出现,我们仍然需要认识到,网上还有相当多的信息和网站采用老式代码和构架,对这些信息和站点的浏览而言,传统的浏览器仍然是最好的选择。但是,Palm WebOS对传统内容的支持非常有竞争力。
u9 k& Y$ P0 @
* ?' f+ A$ W3 ~4 ]0 N8 _Beyond the operating system, webOS includes a number of core applications: contacts, calendar, tasks, memos, phone, browser, email and messaging. Other applications are included in the initial release, such as a camera, photo viewer, audio/video player and map application, but the full application suite for a given webOS device will vary depending on the model and carrier configuration. + e: E+ X) a( X5 ^" `# \. B0 Y
" ~$ X! \) b2 t$ P( ~3 Q1 Q
除了基础的操作系统,WebOS还包括一整套核心应用程序:联系人、日程表、任务表、记事本、电话功能、浏览器、电子邮件以及短信。在最初发布的版本中,WebOS还会提供额外的应用程序,比如照相机、照片浏览器、音视频播放器以及地图程序。但是,因为具体的硬件配置以及运营商要求不同,特定的WebOS设备包含的应用程序也不尽相同。
$ e, _# @6 D6 w; T' [8 C; x5 l" P! r: r
' j1 O4 }) j# y" h
User Interface 用户界面
9 i. n y+ i' g
8 S1 B3 b. N: _; ? W2 n% gPalm webOS is designed for mobile, battery-operated devices with limited though var-iable screen sizes, and a touch-driven user interface. User interaction is centered on one application at a time, though applications, once launched, continue to run until closed even when moved out of the foreground view. There is a rich notification system ena-bling applications to subtly inform or directly engage the user, at the application's discretion.
% k6 i7 J& I2 S9 D2 `* p% {- V a$ N" S* R* ]
Palm webOS主要应用于手持的、由电池供电的、配备了触摸屏的设备。尽管这些设备的屏幕尺寸不同,但是都有一定限制。每次只能允许一个应用程序显示在屏幕中央,但是其他应用程序一旦启动,就会一直运行(即便没有被显示在屏幕中央位置)直到被关闭。Palm webOS提供了丰富的通知功能,能够使得用户在使用当前程序的同时不会遗漏其他程序的通知。其他程序的通知可能是气泡式的,也能够直接切换到屏幕的中心位置。
& k! B# W3 I+ j
0 {, h- B% S1 ?Navigation 导航
8 u9 A3 v% n. x) M
8 Q& T) J' O6 M' l. ?' [2 a9 h% gNavigation is based upon a few simple gestures with optional extensions that create a rich vocabulary of commands to drive powerful navigation and editing features. To start with though, all you need to know is: ( f& d+ G0 ^6 B, V2 w/ R$ a) f

9 ?8 d3 n2 O5 |. E9 i! P7 P4 r( {一些简单的手势操作就能够完成导航功能。这些手势操作还有一些可选的扩展功能。这样就能够用一套丰富的指令进行导航和编辑。一开始,用户需要掌握下一基本操作:
1 N" @- R# ~' x7 }- r* N
" R" W, d( Y/ r: P8 T0 |3 M; r- }• tap (act on the indicated object). Commonly in a view that contains clusters or lists of items, tapping reveals information contained in an item. This can be thought of as an open function, which changes the nature or context of the view to be about the selected item exclusively. Alternately, a tap will change an object's state such as setting a checkbox or selecting an object. $ o8 q' Q9 {$ _ m6 z: j- ~

; _- n$ u; Y& _$ ^Tap(对图标对象起作用):在包含了一系列图标的界面中使用这个动作,tap可以被用来启动应用程序。另外tap还能够改变当前应用程序的视图,还能够用于选择一个对象或是选中checkbox, |5 W R& n; |8 R; ^
· back (the inverse of open). This feature looks like the opposite of a tap: the item compresses down to its summary in the containing context where it belongs. Typ-ically, it reverses a view transition, as going from a child view to a parent view. ) O3 ?4 X- z0 S/ i* X$ u

# e+ q6 m3 L# Q+ a Back(open的逆操作):实际上是tap的逆操作,被启动的程序会回到任务栏中(这里summary我暂时理解为类似于windows的任务栏),并且整个显示退回到程序启动前的界面。) {. c2 T& `! x! c- H

' A, f3 {" j5 q2 N! C# \1 Y · scroll (flick and quick drags are used to scroll through lists and other views. ; F- K% Q2 Q; `( B' u; m! A

% z: L1 H, J; J Scroll:滚动,用于在不同的列表和视图中进行切换。
9 M$ [. h0 P, H$ V. D5 k! h; v# C4 z
$ f3 S5 P) v7 V8 H+ d' N- \; a$ N3 GBeyond this, you can learn to pan, zoom, drag & drop, switch applications, switch views, search, filter lists and launch applications. But to begin with, only these three gestures are needed to use a webOS device.
/ {6 t* ]. z& n+ |# {& [/ }% \: n会了以上这些手势,用户就能进一步掌握pan(移动以获得全景)、缩放、拖放、切换程序、切换视图、搜索、过滤列表以及启动应用程序。但是一开始,只需要掌握这三个动作就能够使用WebOS设备。
+ P8 a! k( Z7 ~
: O( m+ c. a$ i, E8 QLauncher 启动器
) ]5 h' u+ k7 o# n4 z$ q4 F
# B, H# C9 M; l* h* M7 m5 EWhen you turn on a webOS device, the screen displays the selected wallpaper image with the status bar across the top of the screen and, hovering near the bottom, the Quick Launch bar. The Quick Launch bar is used to start up favorite applications or to bring up the Launcher for access to all applications on the device. From this view, a search can be initiated simply by typing the search string; searches can be performed on contacts, installed applications, or to start a web search. Figure 2 shows both the Quick Launch bar and the Launcher. f) Y r, l1 g* r) X0 k3 \

( j8 t: p. Y6 ^当用户打开一个WebOS设备时,屏幕上会显示壁纸,屏幕顶部会显示状态栏,同时在屏幕底部漂浮着一个Quick Launch bar。Quick Launch bar用来启动最常用的应用程序,也能够切换出胖子们都很熟悉的Launcher界面以便于看到设备上所有的应用程序。在Launcher界面里,单击“ 搜索string”(抱歉,没看到真机,不知道这个search string是什么东西)就能够在联系人以及其他应用程序里进行搜索,还能够用这种方式进行web搜索。图2所示即为Quick Launch bar 和 Launcher。8 P7 f* _0 p3 T- P
$ ~, n5 _7 s8 S% x# _; r. i
The launched application takes over the available screen becoming the foreground ap-plication; the application's view replaces the wallpaper image and the Quick Launch bar is dismissed. The status bar remains and is always visible except for full screen mode, which is available to applications such as the video player, or others that request it. This sequence is fluid and smooth, as you will see with all webOS transitions.
. K1 n0 Q) G; P$ m; n I# p0 b W+ ]9 l E- S
被启动的应用程序接着就会被显示在主要区域;当前应用程序界面替换了壁纸。并且Quick Launch bar也不再显示。除了某些应用程序的全屏显示(比如视频播放器),状态栏一直都位于屏幕顶端。整个过程非常流畅平滑,所有的webOS界面切换都是这样的。4 R" n, k, p) s: a' X3 E0 a3 y2 A
1 Q% A2 A$ F% z' Z
Card View 卡片式界面
u( U" J% t5 o2 H
+ l! I. q; D7 v8 r: e( ]Figure 3 shows an application's main view, in this case the email application's folder view. The application view includes UI elements that make up the basic email appli-cation, in this case the inbox view displays specific folders, which when selected will open a new card with a detail view of the messages contained within the selected folder. At the bottom, the floating icons that you see are menu items. A tap to the menu icons will typically reveal another view associated with the menu action, a sub-menu or a dialog. % U2 ^$ Q0 n$ e- i
5 r. ~8 K( G E9 L
图3显示了邮件程序的主界面。在这个界面里,一些UI组件构成了这个基本的电子邮件程序。其中,收件箱界面显示特定的文件夹,选定这个文件夹时,就会切换到一个新界面,这个界面显示的是当前文件夹里邮件的一些详细内容。这时,在底部漂浮的图标就是菜单按钮。点击这种漂浮图标将会打开菜单、显示子菜单或者打开对话框。7 h7 F) j% t# D- x3 w+ P/ W
But running one application at a time, or performing one activity at a time, can be terribly restrictive, and inefficient. Palm webOS was designed to make it easy to work on more than one thing at a time. Simply pressing the Center button brings up a new view, the Card view , an example of which is shown in Figure 4. From the Card view, you can switch to another activity simply by scrolling to and tapping the card repre-senting the activity. Alternately, you can launch another application from the Quick Launch bar. c( n7 O/ B m

" p+ Y2 Q7 {/ ~, d0 q但是,一次运行一个程序,或者执行一个任务,显然无法发挥WebOS的能力。WebOS设计的初衷就是能够同时运行多个程序,并在这些程序间切换,协调这些程序之间的合作。只需要按一下 Center button(中键?)整个界面就会变成卡片式界面,如图四所示。在卡片式界面里,用户可以使用tapping和scrolling手势轻松地切换应用程序和显示界面。或者,也可以直接从Quick Launch bar里启动新的应用程序。$ h/ z( P7 H7 q8 J

: ~2 n1 m2 w$ KThe Card view was inspired by the way one handles a deck of cards. Cards can be fanned out to see what card is where. Within a deck of cards, any single card can be selected or removed with a simple gesture, or moved to a new location by slipping it between adjacent cards. The webOS Card view can be manipulated in similar ways by scrolling through the cards, selecting and flicking cards off the top to remove them or selecting and dragging a card to a new location. 2 A* i% v. x! L
& D+ ^8 r% D' H+ _
我们从平时玩纸牌的动作中获得灵感,由此开发了卡片式界面。用户可以摊开卡片,以便于看到哪张卡片在哪里。现实生活中,一副卡片里,用户可以通过简单的动作对卡片进行选择或者移动,也可以把一张卡片放在两个相邻卡片之间。WebOS的卡片界面操作方式与此类似,用户可以在卡片间scrolling、选择并且单击卡片以便于移开、或者选择并且拖拽卡片到一个新的位置。
! b/ `4 ^ u+ }( q) ]6 ^% d) }& S% m9 q/ f, e2 J% f
We've introduced the term activity, which needs further explanation. Often by design, you will work on one activity at a time with many applications, but with some appli-cations it is more natural to work on several activities in parallel. A common email activity is writing a new email, but in the middle of writing that email, you may want to return to the inbox to look up some information in another email or perhaps read an urgent mail that has just arrived.
: m: ^2 A" V0 l6 ?) E
# }7 |# B1 Y7 h6 F尽管前面已经提到activity这个概念,这里仍然有必要对这个概念做进一步的解释。通常,用户能够同时运行很多程序,但是每次只能够执行一个activity,但是在某些情况下,同时进行多个activity更加自然合理。举个例子,一个常见的邮件activity就是写一封新的电子邮件,但是在写这封邮件的时候,用户也许需要返回到收件箱查看其它邮件里的信息,或者正写着当前邮件,又来了一封紧急邮件。
* @2 P3 b6 d! t+ Z: U+ m2 ]5 m2 v/ n. J( `5 Y; H
With a webOS device, the draft email has its own card separate from the email inbox card. In fact, you can have as many draft emails, each in their own card, as you need; each is considered a separate activity and independently accessible. Switching between emails is as simple as switching between applications and your data is safe, as it is always saved. Figure 5 shows the Card view with the Email application's inbox card and a draft email compose card.
, _( Q" m$ H8 Y4 F" a p. Y# a2 R5 P9 y* S. O5 I6 D5 i
在webOS设备上,邮件程序有独立的草稿卡片。事实上,只要用户需要,就可以同时撰写多个邮件草稿,每个邮件草稿都对应一个卡片。每个卡片都被看作是分别的独立的activity,并且能够分别查看并编辑不同的卡片。在不同的邮件间进行切换与在不同的应用程序间进行切换一样简单。用户不用担心自己的数据会丢失(到底还是有一些palm的精髓----不需要“保存”,就像我以前写过的,“palm就像是一堆用不完的白纸”)。图5显示的就是电子邮件程序的卡片界面。
3 c. B( ?8 b6 }& s2 B' @6 W6 _% b# S% l. e1 @0 }
***************************
5 y1 w: Q: _1 p3 g: f
, n O3 x, x8 l3 n! s; i) S `- k今天先到这里,明天继续更新。谢谢关注。6 N! f. i4 w8 Q \( s$ ~7 c
# `) B4 Y8 B' m R
[ 本帖最后由 CyberVsQ 于 2009-4-2 01:41 编辑 ]
附件

pic-001.jpg (22.65 KB)

2009-2-18 18:22

图一

pic-001.jpg

pic-002.jpg (16.62 KB)

2009-2-18 18:22

图二

pic-002.jpg

pic-003.jpg (14.25 KB)

2009-2-18 18:22

图三

pic-003.jpg

pic-004.jpg (18.84 KB)

2009-2-18 18:22

图四

pic-004.jpg

pic-005.jpg (18.66 KB)

2009-2-18 18:22

图五

pic-005.jpg

pic-006.jpg (15.05 KB)

2009-2-19 17:40

图六

pic-006.jpg

pic-007.jpg (14.25 KB)

2009-2-19 17:40

图七

pic-007.jpg

pic-008.jpg (19.19 KB)

2009-2-19 17:40

图八

pic-008.jpg
不知道想啥

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录