Skip to content

Alpaca Release 1.1.0

Compare
Choose a tag to compare
@uzquiano uzquiano released this 09 Aug 14:22
· 866 commits to master since this release

The Alpaca project team is pleased to announce the release of Alpaca 1.1.0.

What is Alpaca?

Alpaca is an open-source project that provides an easy way to render web forms using JSON schema. It consists of a jQuery plugin and provides a nice abstraction so that you can change form layouts, validation logic and presentation with simple changes to JSON.

Alpaca provides the web forms engine for Cloud CMS and can be used within your own standalone projects.

Download

To download the latest release of Alpaca, visit http://www.alpacajs.org. We make available distributions with all of the source and examples.

Or you can visit our GitHub project, pull the source and build it yourself:
https://github.com/gitana/alpaca

What's New?

This release introduces several new features and bug fixes.

Improved Validation Handling

Several fixes related to form validation, including fixed map and array key invalidation handling. Timing of validation improved so that checks are performed less frequently and only when needed. Initial data entry no longer causes a flicker as the validation state changes.

User Interface styling

The user interface CSS styling and classes have been improved and in some places extended to allow for more control of the look and feel of forms as fields change states. Markers are now provided for first and last elements in a container list. An effort has been made to remove the amount of excess white space generated for default forms. Some improvements for Bootstrap.

Events, Triggers and Handers

An initial framework has been added for binding events to fields directly (as opposed to the DOM). Each field now has on() and trigger() methods for firing events. Events propagated up the field chain allowing for upward-cascaded listeners. Initial events provided for validation.

Support for JSON Schema References

JSON Schema supports $ref references in both the v3 and v4 versions of its specification. Alpaca now provides support for $ref elements allowing you to create more complex schemas with reusable data elements or nested structures. Circular references are automatically calculated and reported as errors. Examples have been provided for how to use references which we feel is a very powerful feature going forward.

Improved Connectors / Removal of URI loading

Alpaca no longer tries to dynamically load URIs for data elements that start with http, https or path indicators (like ./ or /). New parameters are provided on Alpaca construction (dataSource, schemaSource, optionsSource) to allow for remote loading. Improved connector pattern for asynchronous loading is faster and more reliable.

Object and Array non-required empties

Alpaca now properly leaves fields undefined if they are arrays or objects, have zero child elements and are not required. Previously, Alpaca would populate with an empty array or empty object. Now this only happens if the field is required. This reduces the size of JSON output from Alpaca forms (and results in the correct and expected data).

Fix to logging facility

There was a bug that prevent the log() method from properly providing debug and trace information. This has been sorted. Special thanks to @urba for finding this and submitting a patch.

Updates to documentation and web site

In many places, the documentation has been extended to provide better details on fields and their uses. More examples are provided and the Alpaca JS web site has been cleaned up to provide more information, better organized and with better theming.

Get Involved

We encourage our community to download and try out the 1.1.0 release. For all active projects, we encourage developers to upgrade to the 1.1.0 release for all the latest bug fixes and updates.

For code-level information on what has changed, please check the commit log.

We invite everyone to get involved. Alpaca is a community-led project and benefits greatly from community code fixes, patches, issues and feedback. Want to add a feature? Found a bug? Feel free to fork the code and submit a pull-request. Or submit an issue and ask the community what they think. We're building Alpaca for you and would love to have your contributions.