Programming4us
         
 
 
Programming

Programming the Mobile Web : JavaScript Mobile - Supported Technologies

12/24/2010 2:40:36 PM
We are going to test JavaScript compatibility in the following pages, but making JavaScript work requires more than just support for the language. There are many technologies (or APIs) that are bundled with JavaScript, but they are optional and will not work on all devices.

1. Document Object Model

DOM is a set of conventions for manipulating, browsing, and editing XML and HTML documents using a set of API conventions that may be implemented in many languages. In fact, although many developers think that DOM is a JavaScript thing, this is wrong. There are DOM APIs for PHP, .NET, Java, and many other languages.

Even if you’ve never heard about DOM, odds are good that you’ve used it. If you’ve used the well-known document.getElementById function, for example, you were using DOM.

Today, DOM is a W3C specification. The most compatible versions for web use are the DOM Level 2 Core specification (DOM2CORE) and the subspecification DOM Level 2 HTML (DOM2HTML) for HTML and XHTML documents.

With DOM, we can browse the XHTML document structure and make changes and additions dynamically from JavaScript without refreshing the page.

A mobile browser can be JavaScript-compatible but without DOM functionality. There are also some browsers that allow us to browse the document tree but not to modify it on the fly.

2. Ajax

Ajax, originally an acronym of Asynchronous JavaScript and XML, is a technique that involves making asynchronous server requests without refreshing the page, interrupting the user’s activity, changing the browser’s history, or losing global state variables.


Note:

Why did I say “originally an acronym”? Today the term Ajax is used in a more general way to define interactive Web 2.0 applications that use asynchronous requests to the server, but may or may not be written in XML. I even hear a lot about Ajax in dynamic websites using the jQuery UI, ExtJS, or other rich control libraries that don’t actually make background requests to the server.


The magic behind Ajax is called XMLHttpRequest; it is a native JavaScript object available in compatible devices that was based on an ActiveX object created by Microsoft in Internet Explorer 5.0.

3. JSON

JavaScript Object Notation (best known as JSON) is a lightweight data interchange format known to be compatible with almost every language in common use. It is sometimes used in JavaScript as a replacement for other transport formats, like XML.

JSON can be used in Ajax requests. We will talk about differences in the mobile browsers’ implementations in a while.

4. HTML 5 APIs

With the upcoming HTML 5 standard, JavaScript will support some new APIs for client scripting and document work. Mobile browsers are already adopting some of these new APIs, even though the standard is still in discussion.

Some of the APIs we are going to discuss in this article are those for:

  • Offline applications

  • Client storage

  • Canvas drawing

  • Workers

  • Geolocation (available as another W3C standard)

5. Platform Extensions

There are other extensions available for web applications on some devices, and many other JavaScript APIs are supported in installed applications . These JavaScript APIs can include support for:

  • Messaging

  • Address book management

  • Geolocation

  • Gallery

  • Camera

  • Calendar

  • Device status information

  • Native menus

Other -----------------
- Security in Cloud Computing (part 4) - Audit and Compliance
- Security in Cloud Computing (part 3)
- Security in Cloud Computing (part 2) - Identity and Access Management
- Security in Cloud Computing (part 1) - Data Security and Storage
- Cloud Security and Privacy : Analyst Predictions
- CSS for Mobile Browsers : WebKit Extensions (part 2) - Border Image
- CSS for Mobile Browsers : WebKit Extensions (part 1) - Text Stroke and Fill
- jQuery 1.3 : Working with numeric form data (part 9) - The finished code
- jQuery 1.3 : Working with numeric form data (part 8) - Editing shipping information
- jQuery 1.3 : Working with numeric form data (part 7) - Deleting items
- jQuery 1.3 : Working with numeric form data (part 6) - Finishing touches
- jQuery 1.3 : Working with numeric form data (part 5)
- jQuery 1.3 : Working with numeric form data (part 4) - Dealing with decimal places
- jQuery 1.3 : Working with numeric form data (part 3) - Parsing and formatting currency
- jQuery 1.3 : Working with numeric form data (part 2)
- jQuery 1.3 : Working with numeric form data (part 1) - Shopping cart table structure
- The Art of SEO : Controlling Content with Cookies and Session IDs
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 5) - The Freehand Tool
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 4) - The Ellipse and Rectangle Tools
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 3) - The Line Tool
 
 
REVIEW
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
VIDEO TUTORIAL
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
Most View
- Exchange 2007: How Do I Modify a Database Size Limit?
- Windows 7 : Enhancing Your Browsing Security (part 1) - Blocking Pop-Up Windows
- Enable the Global Audit Policy by Using the Command Line
- Windows Phone 7 : Updating Your Phone Software
- SOA with .NET and Windows Azure : WCF Discovery (part 1) - Discovery Modes
- Microsoft ASP.NET 3.5 : WCF Services for ASP.NET AJAX Applications
- Securing Windows 7 : Thwarting Snoops and Crackers (part 2) - Locking Your Computer Manually, Automatically
- Windows 7 : Accessing a Shared Printer
- SQL Server 2008 : Data Encryption - SQL Server Key Management
- Windows 7 : Firing Up the Registry Editor