« Home « Kết quả tìm kiếm

PalmOS Web Application Developer's Guide


Tóm tắt Xem thử

- Palm OS.
- this book.The ability to harness the power of the Internet with the simplicity of the Palm is a key skill you will learn from reading Palm OS Web Application Developers Guide: Including PQA and Web Clipping..
- From the Start menu, select the Install Tool application from the Palm Desktop program group.The Install Tool dialog box appears, as shown in Figure 1.3..
- Figure 1.3 The Install Tool Dialog Box.
- After downloading and unpacking the POSE archive, you will notice that POSE does not contain ROM image files.The ROM image files are copies of the Palm OS that permanently reside on a device.
- Additionally, Palm.Net employees evaluate and rate Web clipping applications submitted to the site.The applications that receive a five-star rating comply with the standards Palm, Inc.
- A: Aside from the differing speeds of the wireless networks used, no.The same version of Clipper exists on all three types of solutions, and the end-user’s experience is the same..
- has provided a utility called the Web Clipping Application Builder (WCA Builder).The WCA Builder parses and compresses static Hypertext Markup Language (HTML) and graphics into a format readable by Clipper, Palm Inc.’s limited Web browser..
- These tools are also provided as part of the Palm OS Software Development Kit (SDK), which you may already have if you do custom Palm OS program- ming.The WCA Builder does not come with an installer application.
- To build a Web clipping application, the WCA Builder needs to know the index file in your application.The index file refers to the first HTML file that the Web clipping application will execute and display upon launch.
- From the file chooser dialog box, find the index.html file created ear- lier, select it, and click OK.The display should now look like Figure 2.2, showing the name of the file you just selected..
- option.The application presents the Build PQA dialog box..
- When the Build PQA dialog box was displayed, notice that the default icons were provided for the icon displayed in the Application Launcher.The default icons were used to build the example because no custom icons were specified..
- Make a copy of the previous example, edit hello.html, and create a link to the popular Yahoo! search engine (these files are also provided on the CD in the “hello world build 4” example).The change is listed boldface in the following code below:.
- Rebuild the PQA with this change, install it on your device or POSE, and launch it.The link to Yahoo! is presented at the bottom of the document, similar to Figure 2.11..
- Two different versions of the Builder utility exist for building Web clipping appli- cations.The applications in this chapter have been built with Version 1.5 of the WCA Builder.Version 1.5 is the current release available as of this writing, avail- able as part of the Palm OS SDK,Version 4.0..
- Version 1.0 of the Builder utility is named the Palm Query Application Builder (PQA Builder).The acronym PQA reflects the marketing name first used for Web clipping applications (see the sidebar earlier in this chapter).
- Aside from missing features that apply to the Palm OS 4.0 SDK, the use of the PQA Builder is identical to the WCA Builder.The index file is still estab- lished by the Open Index dialog box.
- The Product List application—shown in Figure 2.14—is a Web clipping application that identifies the widget product line.The entire product list can be browsed or filtered down to the widget’s shape and size..
- and <TR>—commonly found in standard Web applications..
- Index… menu option from the File menu and identify the index file of the Web application to build.The WCA Builder searches the index file and subsequent files for nonchanging documents and graphics to include in the Web clipping application..
- has two different versions of the builder application.The PQA Builder Version 1.0 was the first Web clipping application creation utility supplied with the release of the Palm VII.
- It is recommended for building applications tar- geted exclusively for the Palm OS 3.5 and earlier versions.The WCA Builder Version 1.5 is the version released with the Palm OS 4.0 SDK.
- Keep the length of this text short.The maximum length of the title extends to the middle of the screen.
- Some META tags with special Palm-specific names are honored, including the PalmComputingPlatform tag.This META tag tells the Palm.Net proxy that the page was designed specifically for the Clipper browser.The presence of this tag implies that the speed and availability of wireless networks and the screen size of the Palm OS device were taken into account for the page length and its images..
- Body tags define the content and page presentation of a Web document.The most common body tags available in the HTML 3.2 specification are available in the Web clipping HTML definition..
- In the following example code, provided in the build_01 example on the CD, four paragraphs are defined from the sentence provided using the different para- graph attributes.The results are illustrated in Figure 3.4..
- Headline text that identifies and separates major sections of content by using a large, boldface font are defined with the tags <H1>, <H2>, and <H3>.These header tags also support the align attribute with the values left, right, and center..
- This example, provided in the build_02 example on the CD, illustrates the rendering of these headline tags compared to paragraph text.The final rendering is shown in Figure 3.5..
- draws a horizontal line across the screen.The.
- Most attributes of the image tag <IMG>are supported in Clipper.The.
- For the first image example (provided in the build_04 example on the CD and shown in Figure 3.9), an image named palm.gif, of 108 pixels in length and 108 pixels in height, is displayed in the Clipper window.The code is as follows:.
- (Chapter 4 contains more discussion on creating good images for a Palm OS device.) The code is as follows:.
- Start for the starting number in the list.The default starting number is 1..
- tag.The end of an ordered list is defined with the </LI>.
- The following example lists the different families of Palm OS devices as an ordered list.The following code is provided in the build_07 example on the CD and the results are shown in Figure 3.12..
- Align for the horizontal alignment of the table.Values are left, center, and right.The default is left..
- Percentage widths are not supported.The default is the entire length of the browser window..
- Cellpadding for the spacing between cells in pixels.The default is two pixels..
- Cellspacing for the spacing within cells in pixels.The default is two pixels..
- tag indicates the start of a new row in a table and defines proper- ties for the row.The <TR>.
- Align for the horizontal alignment of the row in the table.Values are left, center, and right.The default is left..
- tag defines a cell inside a table row called a data cell.The <TD>.
- Align for the horizontal alignment of elements in the cell.Values are left, center, and right.The default is left..
- Rowspan for the number of rows spanned by the cell.The default is one row..
- Colspan for the number of columns spanned by the cell.The default is one column..
- Physical markup tags specifically change the display of textual information inside a block.The <B>.
- is underlined.The code is provided in the build_10 example on the CD and the results are shown in Figure 3.15..
- meaning in bold.The <EM>.
- The opening page of the Unwired Widgets example from Chapter 2 is expanded here to demonstrate both text- and button-based hyperlinks using the anchor tag.The code is provided in the build_12 example on the CD and the changes are shown in Figure 3.17..
- Notice the smaller spacing in the break tag.The results are shown in Figure 3.18..
- companies.</p>.
- For example, Unwired Widgets might provide a link to the Web clipping application file for their edge distributor Edge Resources, named edge.pqa, also installed on the device.The link to the Edge Resources PQA would be the following:.
- The following example is the revised HTML code for the application index, provided in the Unwired Widgets example for Chapter 3 on the CD.The ren- dering of the HTML is shown in Figure 3.21..
- The PalmComputingPlatform META tag tells the Palm.Net proxy that the page was designed specifically for the Clipper browser.The.
- it can be developed and built with documents and images in the same directory or located in subdirectories.The directory.
- tag.The main ones of interest in this example are the height and width attributes.
- Figure 4.8 The Same Image Converted to Grayscale and Adjusted.
- all images were reduced to 2-bit grayscale during the build process.The Palm OS 4.0 SDK ships with an updated PIC 1.5 that adds the capability to preview your images in different bit depths.
- Note that these settings apply only to local images stored in the WCA.The Palm.Net proxy will still intercede and downshift remote graphics to the appro- priate bit depth for the requesting device.
- Figure 4.13 shows how this page would look on a color Palm device (see the color image on the CD that accompanies this book).The orange backgrounds of the independent graphics merge to give the impression of one large image with floating red text..
- Notice a few things here.The <BODY>.
- prod_menu.html we constructed in Figure 4.14.The modified HTML is shown in Figure 4.16, which is also available on the companion CD..
- syntax.The other change we made was reducing the height of the central <TD>.
- Banner ads offer special challenges on the Palm OS device.The severely lim- ited screen real estate means that you have to carefully choose where these are placed.
- A wide variety of user interface elements/controls can be represented, from text boxes to multiple selection lists.The <FORM>.
- For the GET method, form data is used as a list of attributes to the speci- fied retrieval action.The resulting action URL is of the form:.
- tag and its associated attributes are a subset of the HTML 3.2 standard for forms.The following tags associated with forms are supported:.
- It can even maintain data that is never seen by a user.The general syntax of the <INPUT>.
- tag.The type attribute defines the capabilities of the <INPUT>.
- tag, allowing it to act in a multitude of ways.The valid values for the type attribute are as follows (each is discussed in greater detail in the following section):.
- tag so that it can be distinguished from other tags.This is especially important when sending data to a server.The server needs to be able to determine which data came from which <INPUT>.
- However, note that the specific meaning of the name attribute is dependent on the contents of the type attribute.The following.
- However, note that the specific meaning of the value attribute is dependent on the contents of the type attribute.The following sections discuss the meaning of the value attribute as it pertains to the various types of <INPUT>.
- Note that the numeric data in a text field is stored as an ASCII string.The syntax of text-type <INPUT>.
- “text”).The <INPUT>.
- tag is typically used to capture security code informa- tion, although it can be used to capture any information that is not to be directly displayed.The password type indicates that the corresponding <INPUT>.
- For password-type <INPUT>, the name attribute is used to identify data to a server so that the server will know from which field the data originated.The name should be lowercase and short to minimize the bandwidth required to send data to the server..
- could be used for the overnight selection, and another could be used for the insured selec- tion.The user can tap anywhere on the box or descriptive text to toggle the value of the checkbox.The syntax of checkbox-type <INPUT>.
- is the appropriate tag.The syntax of radio-type <INPUT>.
- “radio”).The <INPUT>.
- As you can see in the screen shots, this isn’t the case.
- It also servers as a placeholder for sending back ZIP Code and device ID information from the Pocket PC.The syntax of hidden-type <INPUT>.
- is shown in Figure 5.13.The type attribute indi- cates that the <INPUT>.
- For hidden-type <INPUT>, the name attribute is used to identify data to a server so that the server will know from which field the data originated.The name should be lowercase and short to minimize the bandwidth required to send data to the server..
- tag is a button.The button is used to initiate communication with the server named in the.
- tag’s attributes.The syntax of submit-type <INPUT>.
- limiting criteria are system memory and the user’s tolerance for scrolling through a long list of choices.The syntax is as shown in Figure 5.21..
- An optional attribute not shown in Figure 5.21 is multiple.The multiple attribute is available, as in <SELECT … MULTIPLE>, to indicate that the cor- responding <SELECT>/<OPTION>.
- <OPTION … VALUE=”myvalue”>.This is not necessary, however.The.
- tag is to allow users to provide feedback about your WCA.The syntax of the <TEXTAREA>.
- A reasonable value for cols is twenty or less.The Palm OS device display can accommodate up to 28 columns, but more than 20 is visually cumbersome..
- Note that the value attribute can be used to set the time to be displayed.The syntax of timepicker-type <INPUT>.
- Note that the value attribute can be used to set the date to be displayed.The syntax of datepicker-type <INPUT>.
- If value is not specified, the current date is displayed.The format of the value attribute is.
- “Placing A Widget Order.”The most flexible of the supported tags is <INPUT>, as it supports all of the following types:.
- Fortunately, Palm anticipated this need and pro- vided us with a very useful tag: <SMALLSCREENIGNORE>.This tag tells the Palm.Net proxy to throw away all markup (that is, HTML tags) within this tag set.You can use this to “mask” markup that you don’t want to appear on a Palm OS device, such as large graphics or banners.
- The next problem is that the real content of the page—the product listing—is within a sub-table that’s set at 550 pixels wide.
- column with <SMALLSCREENIGNORE>.This effectively removes this whole left-side column from the page when viewed on the Palm OS device.
- Because what we’re really interested in is the product listing, let’s surround everything except this with <SMALLSCREENIGNORE>.We probably want to maintain the introduction text, so leave this.We also need to change some of the table width settings, because the Palm.Net proxy will happily obey these and give us a 550-pixel-wide table

Xem thử không khả dụng, vui lòng xem tại trang nguồn
hoặc xem Tóm tắt