JS Service Basics

What is a webOS JavaScript Service?

JavaScript services (JS service) on webOS provide way for applications to do work, even when the application isn't running. They also provide access to platform features that aren't normally available to web applications.

  • Written in JavaScript
  • They are created using Node.js
  • Run in the background
  • Run on webOS
  • They have additional access to low-level networking, file system access and binary data processing
  • They can perform tasks for one or more apps

Use Cases for webOS JavaScript Services 

Typically you will use a service to either perform tasks that a webOS application can't do, or to do work by service. Some examples of how services have been used in webOS applications in the past would include:

  • Downloading attachments in the background for an email reader
  • Uploading images to a picture-sharing website from an application
  • Performing a long-running computation or file operation

About Node.js

Node.js was originally created as a framework for server-side JavaScript applications. Services in webOS are not quite like web application servers (in particular, because they don't stay running all of the time), but the basic framework of an asynchronous I/O and network stack makes a lot of sense as an extension of the webOS app environment.

 

You can find out more about Node.js at the Node.js website.

 

Navigation