Javascript frameworks

From WebOS101

Jump to: navigation, search

Contents

Introduction

Javascript has a number of frameworks that make developing applications easy. In fact, the Prototype Framework is (currently) included with webOS.

Frameworks

Framework webOS OK? Notes
Prototype Yes General framework with many DOM utilities. Included with webOS.
MooTools No Lightweight framework
Dojo Yes Full-featured framework with animations, drag-and-drop, Ajax and more. Not all features tested with webOS
jQuery Yes Full-featured framework with large user-contributed add-ons
script.aculo.us Yes Full-featured Prototype Add-on framework with animations, drag-and-drop, Ajax and more. Not all features tested with webOS (effects and drag confirmed to work)
YUI  ? Yahoo framework

Using other Frameworks

Some frameworks (such as jQuery) should be loaded in compatibility mode to avoid conflicts with the built-in Prototype framework. There are two ways to include a framework in webOS.

  • load the framework from the index.html file
<script src="lib/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
</script>
  • include it from the sources.json file:
{"source": "app\/lib\/dojo.js"},

Useful Links

Personal tools