jidesoft / jidejs

Modern Javascript and HTML5 based UI control toolkit.
MIT License
58 stars 8 forks source link

jide.js

jide.js is an open source, MIT licensed, Javascript toolkit for developing rich, modern web applications. It features various powerful UI controls.

It is built around the concept of properties and data binding and enables highly efficient programming.

jide.js uses the AMD format and can be used with any AMD compatible loader such as require.js.

Getting started

Installation

Since jide.js uses the AMD format, you must start by including an AMD loader in your HTML file. Since there are a lot of choices we can only handle the most obvious one: require.js.

For the purpose of this tutorial, we assume that your project has the following directory layout:

Now place the following content in your index.html file:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://github.com/jidesoft/jidejs/blob/master/jidejs/default.css">
</head>
<body>
<!-- your HTML content, nothing for now -->
<script src="https://github.com/jidesoft/jidejs/raw/master/require.js" data-main="app.js"></script>
</body>
</html>

This is a minimal HTML file that loads require.js as well as the default jide.js theme and your application.

Now create your app.js and place something along the following lines in it:

// and start your application
require([
'jidejs/ui/control/Button'
], function(Button) {
// use strict mode, or not - up to you
"use strict";
// create a new Button
var myButton = new Button({
text: 'Say hello!',
on: {
    click: function() {
        alert("Hello World, I'm a jide.js programmer now!");
    }
}
});
// add the Button to the DOM
document.body.appendChild(myButton.element);
});

Congratulations! You've successfully created your first fully functional jide.js application!

What next?

jide.js comes bundled with plenty of documentation that you can directly access from this page.