World Library  
Flag as Inappropriate
Email this Article
 

Ample SDK

Ample SDK
Stable release 0.9.4 / December 1, 2012 (2012-12-01)
Development status Active
Written in JavaScript
Type Web application framework
License Dual license: GPL / MIT[1]
Website .com.amplesdkwww

Ample SDK is a lightweight JavaScript library intended to simplify cross-browser web application development. Although the Ample SDK allows you to do client-side scripting in a very similar way as jQuery and many other JavaScript libraries, its main purpose is to enable development of declarative GUI's for Rich Internet applications rather than enhancing HTML pages.

Because its documentation is still sparse and the examples lack clear explanation, the Ample SDK is not suited for the beginning, casual web developer. For the experienced web guru however, it offers many features, listed below.

Contents

  • Features 1
    • Runtime 1.1
      • Scripting APIs 1.1.1
      • XML technologies 1.1.2
      • UI Managers 1.1.3
    • UI Markup Languages 1.2
    • Plugins 1.3
  • Hello Ample! Example 2
  • Standards-based web-development 3
    • User Interface 3.1
    • Logic 3.2
    • Style 3.3
  • Componentization model 4
  • Related links 5
  • Notes 6
  • External links 7

Features

The features of Ample include:

  • Full implementation of the core level of the DOM W3C technologies.
  • Every major web-browser is supported.
  • Cross-browser XUL (supporting a desktop-like UI), the XML user interface markup language developed by the Mozilla project.
  • Styleable HTML5 forms elements.
  • SVG in all supported browsers, including Internet Explorer 5.5-8.0
  • An optional API similar to jQuery.
  • Good run-time performance.
  • Extensible architecture.

Runtime

The runtime is the core module of the Ample SDK framework. It contains implementations for:

Scripting APIs

  • Document Object Model (DOM) Level 3 Core
  • Document Object Model (DOM) Level 3 Events
  • Document Object Model (DOM) Level 3 XPath
  • Selectors API
  • Other APIs: DOMParser, XMLSerializer, XSLTProcessor, XMLHttpRequest, JSON
  • jQuery APIs: As of release 0.9.3 Ample SDK supports most of the jQuery APIs
  • Globalization module

XML technologies

  • XML Inclusions 1.0
  • XML Events 1.0
  • REX 1.0
  • SMIL 3.0
  • XML Schema 1.1 Datatypes

UI Managers

  • Drag & Drop
  • Resize
  • Focus
  • Capture
  • Selection

UI Markup Languages

The UI Markup Languages are implemented in JavaScript independently on each other:

Plugins

There is a jQuery-like plugin system in Ample SDK, some of the plugins coming with version 0.9.3:

  • Forms (unlike jQuery, in Ample SDK this module doesn't belong to the core technologies)
  • Cookie
  • Store
  • XPath
  • XSLT

Hello Ample! Example

The Ample web page is an HTML document with decorations. To use the Ample framework you would include the runtime library in the head section of the HTML document and in additio—languages/xhtml/themes/default/style.css"/>

We also included a CSS style sheet for the XHTML library.

A further note to make is that the document should contain namespace declarations for the GUI languages used, which is most conveniently placed in the HTML tag:

 ... 

If you would like to introduce dynamic behavior, you can include JavaScript functions, in a very similar way as most JavaScript libraries allow you to include behavior: as body of a document ready function:


This script says something like: for every b element in the part of the document that is controlled by Ample, there will be an alert with showing the nodeValue of the firstChild of the element.

On purpose we were talking about part of the document, because you can designate a number of sections within the body of an HTML document to be processed by Ample and the rest of the document will remain untouched:


     Hello, World!

Therefore, if the HTML document would contain more b elements outside the Ample sections, the alert would not occur when you would click on it.

Standards-based web-development

So far, we have shown nothing that could not be done slightly more easily in a JavaScript library like jQuery. The power of declarative GUI development will become clear with the next example, showing a table with a rich interface. You should contrast the source code shown in the example below, with similar functionality in a jQuery plugin, where you probably would see only a
on a page and where you would have to guess what the final appearance of the element would be from looking at the JavaScript code.

User Interface

In the next example we will use XUL as the GUI language. XUL is an XML Markup Language, developed by Mozilla and used for example for the Firefox browser. Ample offers a full implementation of XUL.


Logic

The Application Logic of your client web application is written in JavaScript. For example:


Style

The styling of your application is done in CSS, for example:


From the XUL code it is easy to see what the layout of the table will be. The assumption is that for web-designers it is much easier to look at a declarative page that uses familiar, HTML like tags. The application developers can concentrate on specifying the behavior for the GUI elements. There is also a good separation between layout, styling and processing.

Componentization model

Although there is a set of pre-defined UI Markup Languages (including XUL, XHTML, SVG and HTML5) it is easy to extend the base (to adjust it to certain application needs) and create new languages and UI components. This is done by either prototyping objects in JavaScript and registering them with the framework, or by implementing these components in XBL2. The UI Languages that are currently present in Ample are prototype implementations.

Related links

Notes

  1. ^ "Licensing – Ample SDK". Archived from the original on 28 November 2009. Retrieved 2009-11-26. 

External links

  • Ample SDK homepage
  • "Ample SDK for jQuery users" tutorial
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.