Publishing Zamples-Powered DocumentsThis section is for publishers and authors. Zamples delegates responsibility via roles. Administrative roles are Moderator, Author, Publisher, Sysadmin and Developer. Each knowledge bases has a Publisher who is responsible for defining documents and assigning authors. Authors create content and assign Moderators. Moderators assist users by managing User postings. Users must be registered and logged in before they can post to knowledge bases. Zamples works by providing a 'sandbox' on the server for each User. Sysadmins configure the sandboxes so they can be used by Authors, Moderators and Users. The compiler and runtime libraries for the language(s) that are to be supported must be available in the sandbox, as well as any dependencies, such as data files. Authors can display a highly focused discussion along with every code example, if the code example is stored in a database. This is particularly useful when writing an structured online document, such as a book, or publishing Javadoc for an API. Discussions can also be disabled, if desired, on a document-by-document basis. When writing an online book, authors can specify where live code examples and/or discussions are to appear. Discussions can be created for some or all code examples, and they can immediately follow the code examples, or can be placed elsewhere. In the document, simply place a server-side include with a unique id, which identifies the code example. Here is an example document with discussions. Anyone can create a new code example from Create Sample submenu near the bottom of the the Solutions left-hand menu. If you do so, you will notice that The Zamplizer page is initialized with a short sample program for the language that you selected. Each of the Create Sample menu items contain a parameter which allows you to specify the language that you want to write your code example in. For example, below is a link that sets up the Zamplizer for a new HTML/JSP code fragment. If you were to examine the HTML source for the menu, you would notice that the target is is tomcatMain - for historical reasons, this is the target for The Zamplizer. Examine the menu to learn the other values of the format parameter.
|
|||
|