Welcome, guest ( Login )

» Home (JDC Blog)
» Forums

Page Tags

jotlib; intro

Search Tags:
WikiHome » JotDoc » JotDocDevs » DevIntroduction

DevIntroduction

Version 7, changed by admin. 10/01/2006.   Show version history

JotSpot Developer Documentation

Introduction to JotLib



JotLib is the JotSpot's library that enable collaborative web apps in a JotSpot wiki. JotLib consists of functions like search, table, calendar, and include, control flow statements like if and loop, all bound together using XPath expressions.

Using JotLib and CSS, you can build themes, plugins or complete applications.


What is JotLib?


  • JotLib is a library of functions used to create collaborative web applications in a JotSpot wiki
  • JotLib functions can be accessed in a number of ways:
    1. using an HTML-like tag syntax called JotScript
    2. with the standard programming language Javascript (server-side Javascript that is)
    3. from any HTTP-capable client using REST?
  • JotLib can be added to any JotSpot wiki page by editing the page in script markup or XML mode

What Can You do with JotLib?


  • JotLib gives structure to wiki information. Instead of adding all information to a page as normal text, you can define properties for a page so page information can be entered and edited using a user-friendly web form
  • JotLib can search and sort wiki information. For example, using the <wiki:search> JotLib tag, you can create custom queries to search your entire wiki and display the results on a single page

What Does JotLib Look Like?


Expressions using XPath:

This expression entered on a page:

Hello ${req/user}, the current page is ${page/name} ${concat('and the full path is: ', req/path)}

displays the following when viewing the page:

Hello guest, the current page is DevIntroduction and the full path is: /WikiHome/DevIntroduction


JotScript uses an HTML-like tag syntax:

These tags:

<wiki:search forChildren="MyTasksApp" set="myResultSet" />
<wiki:table contents="myResultSet"/>

Display a table of all pages that are children of a page called MyTasksApp:

WikiPageRevisionUserLast Edited
MyTaskPages.png1jotspot_scott04/08/2005 12:55PM
MyTasks.png1jotspot_scott04/06/2005 04:31PM
clip art, music, videos1guest07/26/2006 10:48AM
watchvideo_small.gif1jotspot_scott04/13/2005 11:55AM

This snippet:

<wiki:if test="${page/revision > 10}">
  <wiki:then>
     *Wow, this page has more than 10 revisions.*
  </wiki:then>
</wiki:if>

Displays the bold message Wow, this page has more than 10 revisions. if that particular page has been edited more than 10 times.



Where's all my app data stored?


In wiki pages! Seriously, in JotSpot everything is wiki page, and pages are just XML. But don't worry about that yet. There's plenty of time to explain exactly how this simplifies your life later.


What You Should Already Know


Basic understanding of the following is very helpful:


Attachments (0)

  File By Size Attached Ver.