Saturday, February 9, 2013

Introducing WebKit for Android Web Development

The WebKit browser engine stems from an open source project that can be traced
back to the K Desktop Environment (KDE). WebKit made its significant mobile debut
when the iPhone was released, and since then WebKit has been adopted by Android
and other mobile platforms.
Prior to the adoption of WebKit, early mobile web solutions ranged from laughable,
to mediocre, to tolerable, though always limited. These early mobile web offerings
were often so constrained that they required content providers to generate a
mobile-specific stream in addition to the normal desktop version of their material. In
some cases, a server-side component would perform on-the-fly distillation of the
HTML into a format more readily digested by the mobile browser. Regardless of the
implementation, any requirement for content providers to generate multiple copies
of their material severely constrained the volume of content the early mobile devices
could readily consume. The early mobile web was virtually nonexistent because browsers
were not capable of rendering full pages and sites made for mobile were rare.
 
Fortunately, WebKit has changed the game thanks to its impressive rendering capabilities
and its envelope-pushing feature set. You can expect the WebKit engine to render
any web page on a par with your desktop browser. This means that virtually the
entire web is open and accessible to an Android user! The pages of your favorite website
will render on your Android device’s browser, though you’ll likely need to scroll
the page due to the small screen dimensions, and certain navigation systems that rely
on hovering aren’t accessible. Despite these drawbacks, the capabilities of WebKit
open the broad range of the web to mobile users. In this chapter, we demonstrate how
to scale your web applications to accommodate for smaller browser windows in a manner
that retains desktop browsing compatibility, all without the necessity of creating
and managing multiple sites.
WebKit powers the browser on the Android device, but it’s also available as an
embedded control or widget, permitting SDK-based applications to render HTML
directly within a compiled application. This embeddable browser control is highly customizable
and thereby empowers the Android developer to exercise a tremendous
amount of control over the user experience.
Web programming for Android is a broad and versatile topic. In the next section
we examine the approaches to using web technologies for Android application
development.

No comments:

Post a Comment