Catch a Glimpse

Videos

More videos ›


Hot Off the Press!

The advent of HTML Living Standard, previously known as HTML5, has revolutionized the traditional web scene (and sense). In this book, I will simply call it HTML. In particular, HTML mandatory support for incorporating the ever-increasing number of APIs into browsers has enable web pages to function more and more like desktop applications. This empowerment has brought about new possibilities and opportunities for the next generation of web applications that are more autonomous and can work offline, on multi-platforms, free of third party plug-ins and less reliant on server-side scripting. In the foreseeable future, it is not unimaginable that the web browser will replace our traditional metaphor of desktops on our computers, that of a web-based desktop.

Wow, the future of web landscape looks excitingly promising. However, reaching this stage is not without its challenges. For one thing, the supports of the current browsers must be improved and streamlined. For another, the awareness and education on HTML APIs among the web communities must be stepped up. Some would have argued about “the chicken or the egg” causality dilemma. I would argue that both can proceed in parallel.

Over the years, HTML specification has added a bag full of APIs that cover a wide spectrum of functionality and features that power the future web browsers and mobile devices. In this book, you will dip into the HTML APIs grab bag and draw out eight of them for discussion and exploration peppered with plenty of hands-on exercises —

  • Geolocation for finding and navigating your way on Earth;
  • Drag and Drop for dragging and dropping UI elements on HTML pages;
  • Server-Sent Events for delivering server push updates from servers;
  • Web Sockets for establishing full-duplex bi-directional communication between clients and servers;
  • Web Workers for spawning JavaScript on background threads;
  • Web Storage for inserting, updating, retrieving, and deletion of data in your browsers;
  • File API for turning your browser into a web-based file explorer where you can read and save files on your computer’s local file system; and
  • Canvas for drawing and animating multimedia resources on HTML pages.

Apart from the the many learning exercises, you also get to create interesting web applications including live stock quotes, real-time web chat, a web-based file explorer, and a clever hack to save web data from your HTML page to your computer’s file system.

If you wish to receive a copy of the source code, please contact me via the email address inside the book with proof of purchase.

What are you waiting for? Get your hands on the paperback now!

Also available as eBooks @


Recent Publication

More books at the store ›


Articles

HTML Geolocation

Best Web Development Article of May 2017 (First Prize) by Code Project

This is also one of the chapters from my publication “Hands-on with HTML APIs“.

Every one of us occupies a location on Earth. This location is specified by a geographic coordinate system of latitude, longitude, and altitude. With the proliferation of location-aware hardware and software, finding one’s location on the Earth has never been easier. There are many techniques available to identify the location of a user. A computer browser generally uses WIFI or IP based positioning techniques whereas a mobile browser may use cell triangulation that based on your relative proximity to the different cellular towers operated by the telcos, GPS, A-GPS, or WIFI. Today, location awareness is an ever-growing trend that finds its way into many applications like:

  • Showing one’s location on a map especially when you are in an unfamiliar area.
  • Providing turn-by-turn navigation while driving on unfamiliar journey.
  • Find out the points of interest in one’s vicinity.
  • Getting the latest weather or news of one’s area.
  • Tagging the location of picture.
  • Location tracking of a fleet of delivery trucks.

Thanks to HTML Geolocation API, you can now look up your own location on Earth using a browser, say Firefox. It is as easy as a piece of cake. Doing is believing. Let get your hands dirty… Continue reading ›

Getting Started with SQLite on Android

Best Mobile Article of January 2017 (First Prize) by Code Project

Every app involves data. Most data are supplied by users through the various input controls, such as text field, check box, radio group, spinner, and button. While some data is transient, most will require to stay or persist even after the app has stopped running. Android provides many ingenious technologies for storing persistent data locally. In this article, you will learn to perform CRUD, i.e. Create, Read, Update, and Delete, on data using a SQLite Database on Android.

On your favorite Android IDE, start a new Android app project. Let’s give it an application name of “AndroidSQLite” and a domain name of “peterleowblog.com”. The resulting package name of your project will be “com.peterleowblog.androidsqlite“.

In the project, create an Android activity called “MainActivity”. As shown in Figure 1, the user interface (UI) of this “MainActivity” comprises the following controls: Continue reading ›

The Three R’s of Responsive Web Design

Websites today serve not only traditional desktop monitors, but also televisions and handheld mobile devices like tablets and smartphones. Notwithstanding the myriad screen sizes, consumers, constantly connected and switching between devices anywhere anytime, expect the same degree of usability they experience across these devices. How can websites provide for such an enormous range of screens and keep up with new screens of the future? The answer lies in Responsive Web Design. In this article, I am introducing the three key methods of designing for responsible web. They are Retile, Replace, and Resize, which I aptly coin the “Three R’s of Responsible Web Design“. First, let’s grasp the realities and challenges of the new multi-screen world. Continue reading ›

More articles ›


Code Challenge


Q&A

Find out more ›


In Perspective

Find out more ›