Hosted by Three Crickets

Packaging and Bootstrapping
For the JVM

Please note that Sincerity is still under development and that this documentation is incomplete.

Sincerity logo: jackrabbit and flowers



See link.

The Sincerity JavaScript Library

Sincerity relies on JavaScript for bootstrapping and plugins, and while JavaScript does not have a standard library, you do have access to the entire JVM standard library.
Still, this isn't quite good enough: using JVM libraries works, but they do involve using paradigms that have not been optimized for JavaScript.
For Sincerity, we decided that we can do better, and so we present you with a collection of useful code called the Sincerity JavaScript Library. We should point out from the start that this is not a general-purpose JavaScript library: it relies on the JVM libraries, and only works in the JVM. Included are also optimizations specific to the Nashorn and Rhino JVM JavaScript engines.
What follows is a general introduction to the library. See the API documentation for full details. Also make sure to check out Sincerity's JsDoc plugin which makes it easy for you to generate similar documentation for your own JavaScript codebase.
Note that the Sincerity Foundation Library is used by at least two other JavaScript frameworks: the Prudence JavaScript Library, and the Diligence Framework, which builds on the Prudence JavaScript Library.
Enhanced support for standard JavaScript types: strings, arrays, dicts and dates. This library monkey-patches the standard types with many useful methods. See the Sincerity.Objects API documentation.
This straightforward-but-powerful library lets you use the object-oriented programming (OOP) paradigm in JavaScript. It lets you define classes with public and private members, inherit classes, and even provides a mechanism for generation of constructors. Generally, the Sincerity JavaScript Library does not use OOP indiscriminately: classes are used only when they make sense and add elegance. See the Sincerity.Classes API documentation.
Iterators let you write coherent code that can efficiently comprehend and operate on sequences of any size. Its design borrows stylistically from functional programming languages. See the Sincerity.Iterators API documentation.
Low-level access to the filesystem, including high-performance reading and writing of files using memory-mapped files. See the Sincerity.Files API documentation.
Straightforward and flexible string interpolation. See the Sincerity.Templates API documentation. Example:
println('Hello, {user}'.cast({user: 'Sincerity'})
High-performance JSON parsing and rendering using the JSON JVM library, which is written in Java. See the Sincerity.JSON API documentation.
High-performance XML parsing and rendering using the standard JVM libraries. See the Sincerity.Objects API documentationSincerity.XML API documentation.
Enhancements to JavaScript's standard Date type. See the Sincerity.Calendar API documentation.
Easy access to the JVM's localization libraries, including formatting for dates, times and currencies. See the Sincerity.Localization API documentation.
Easy access to the JVM's cryptography libraries, including shortcuts for common hashing, encryption and decryption tasks. Sincerity.Cryptography API documentation
Easy conversions between JVM and JavaScript types, and also access to a few operating system services. Sincerity.Localization API documentationSincerity.JVM API documentation
A general-purpose user input validation library for commonly used types, such as numbers and email addresses. Sincerity.Validation API documentation
Easy access to JavaMail, including sending of mixed-media plain-text/HTML emails. Uses the templates library to let you easily create email templates. Sincerity.Mail API documentation
Easy access to the Lucene search engine. Supports the iterators library, so you can easily index very large collections of documents. Sincerity.Lucene API documentation
Access to features of the Nashorn and Rhino JavaScript engines, such as the call stack and exception details. Sincerity.Platform API documentation

The Sincerity Manual is provided for you under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. The complete manual is available for download as a PDF.

Download manual as PDF Creative Commons License