Here are some of the advantages of using WAP CSS style sheets on mobile Internet sites:
Because of the coming out of WAP 2.0 (XHTML MP / WAP CSS), web programming and WAP programming converges. Learning WAP programming does not require much effort if you have already known how to program the web. Web developers can continue to use their familiar web authoring tools and PC web browsers for building mobile Internet sites. This is one major advantage of XHTML MP/WCSS over WML.
Using WAP CSS has the advantage that the content and the presentation can be separated. This means you can:
Match the layout and style of the same content to the characteristics of different wireless devices easily. For example, if you want the layout of your mobile Internet site to be different on mobile phones of different screen sizes, you can design several versions of WAP CSS style sheets and each version is for a particular screen size. The content files do not need to be modified.
Match the layout and style of the same content for different user agents easily. For example, if you want the layout of your mobile Internet site to be different on a PC, PDA and mobile phone, you can design several versions of WAP CSS style sheets and each version is for a particular client type. The content files do not need to be modified.
Minimize the effort to maintain a WAP site. When new mobile phone models come onto the market, you can write new WCSS style sheets to optimize the layout of your WAP site on these new mobile phones. The content files do not need to be modified.
Apply a single WAP CSS style sheet to multiple WAP pages. Later if you want to change the look and feel of the whole WAP site, you just need to modify the WAP CSS style sheet.
Reuse the style code in multiple projects.
Promote division of work. For example, one of your team members can focus on the look and feel of the WAP site and the others can focus on the content. By separation of duties, it becomes easier to keep the look and feel consistent across the whole site.
You have greater control on the appearance of WAP pages with WCSS than with WML. For example, you can specify the colors, fonts, backgrounds, borders, margins and padding of various elements with WCSS.
If you apply a single cascading style sheet to the whole mobile Internet site, a mobile device will download the cascading style sheet only once at the first time the mobile Internet site is visited. The cascading style sheet will then be stored in the cache and it can be accessed later without connecting to the server.
The file sizes of the XHTML MP documents can become smaller if the layout and formatting information is moved to an external WAP CSS style sheet. A smaller file size has the advantage of a shorter download time. (However, this is not applicable to the first WAP page visited by a user since the external style sheet has to be downloaded with a separate HTTP request, which means the total download time may not be shortened as now two round trips are involved).
Here are some of the disadvantages of using WAP CSS style sheets on mobile Internet sites:
Different WAP browsers have varied levels of support for WCSS. One property that is supported on one WAP browser may not be available on another WAP browser.
An external WAP CSS style sheet can increase the time required for a page to be completely loaded at the first time the WAP site is visited because of the following reasons:
The external WAP CSS style sheet does not exist in the cache of the mobile phone at the first visit, which means the mobile phone has to download it from the server.
An XHTML MP document and its external WAP CSS style sheet have to be downloaded in separate requests, that is the mobile phone first downloads the XHTML MP document, then it parses the XHTML MP document, extracts the URL to the WAP CSS style sheet, and establishes another request to the server to download it. As a result, the number of round trips to the server increases.
If you make use of a single WAP CSS file to specify all the presentation information about your mobile Internet site, the file size of the WAP CSS file can be quite large.
The WAP browser needs to parse the cascading style sheet in addition to the XHTML MP document.
|Page 2 of 39
- 1. WCSS (WAP CSS) Introduction
- 2. Wireless CSS and Wireless Profile CSS
- 3. Advantages of Using WAP CSS Style Sheets on Mobile Internet Sites
- 4. Disadvantages of Using WAP CSS Style Sheets on Mobile Internet Sites
- 5. Syntax Rules of WCSS
- 6. Comments in WCSS
- 7. How to Apply WCSS Styles to an XHTML MP Document
- 8. Different Types of Selectors
- 9. Div and Span Element of XHTML MP
- 10. Cascading Rules for Handling Multiple Groups of WCSS Styles Applied to the Same Element
- 11. Common Types of Property Value
- 12. WCSS Font and Text Properties
- 13. WCSS List Properties
- 14. WCSS Color Properties
- 15. WCSS Border Properties
- 16. WAP Specific Extensions to CSS
- 17. WCSS Access Key Extension
- 18. WCSS Input Extension
- 19. WCSS Marquee Extension
- 20. Matching WCSS Cascading Style Sheets to Different User Agents