Page Development

Developing pages that use Synthesis is easy, and can be done by anyone able to create a web page. You paste the appropriate HTML <object> tags into the page, and set a few <param> tags indicating how you want things to behave. The tags you add are proper HTML, so you can continue to use your favorite tools as you like.

Overview

Synthesis provides drag-and-drop functions through the use of HTML <object> tags. The objects that handle the drop actions are called Generators, and represented as the Processing Folders ().

There are two parts to embedding a Generator into a web page: you need to define the appropriate Java object to execute the drop, and you need to identify the targets, or location, within the web page that the Generator will act on. Both steps are simple, and are discussed below.

Objects can nest, and this nesting provides a simple programming language for creating more complex updates. Dropping a file into a Processing Folder results in the file also being dropped into any nested Processing Folders.

Java Objects in HTML

Embedding the Synthesis objects into HTML pages is done using the following markup:

<object declare classid="HTMLDropOps" title="Folder Name">
  <param name="Parameter Name" value="Parameter Value">
  ...
</object>

This <object> declaration would be displayed within Synthesis as:

The required <object> attributes are:

declare - required
Indicates that the browser shouldn't try to create and execute the object. Synthesis will do this during the drop.
classid - required
Identifies the Java class of the object that should be created. The documentation for the particular Generator action will indicate what this value should be.
title - required
Provides the title that will label the Generator folder. This should be descriptive enough that the correct Generator can be selected from it.
id - optional
The HTML id that uniquely identifies this Generator. This is used by the folder Generator.

Targets in HTML

Creating the targets within the web pages can be done two ways: IDs and tags.

ID
The ID attribute is the general mechanism within HTML to uniquely identify a element. In almost every case, with the exception of the <body> tag below, this will be how you identify the source or destination location within a document.
<tags>
HTML tags are the normal markup that is used to display web pages. To be useful, the tag must be unique within the web page. While this generally isn't the case the <body> is unique and is frequently used as the source of the dropped information. Any other tag may be used, however.

Nesting

Objects can be nested, and will produce nested Processing folders. These nested folders can respond directly to drops, or automatically to redrops from drops into the containing folders. The nested <objects> look exactly like the others.

For example, the following nested <object> declarations:

<object declare classid="HTMLDropOps" title="Folder Name">
  <param name="Parameter Name" value="Parameter Value">
  <object declare classid="HTMLDropOps" title="Subfolder Name">
    <param name="Parameter Name" value="Parameter Value">
  </object>
</object>

This <object> declaration would be displayed within Synthesis as:

Both the Folder Name and Subfolder Name folders can respond to drops and/or redrops if they are defined as specified below.

Drop

Before you can drop content into a generator, you must specify the drop parameter within the Generator object. This parameter, besides indicating that the object should respond to drop actions, identifies the method to invoke. For example, the following <object> definition:

<object declare classid="HTMLDropOps" title="Folder Name">
  <param name="drop" value="replace">
  ...
</object>

indicates that the the replace method of an HTMLDropOps object should be executed. (In Java, we would say that this invokes the HTMLDropOps.replace() method. You won't be tested on this.) The value for the drop <param> will be given in the documentation for the operation.

Note: you can define both drop and redrop parameters within the same object.

Redrop

Redrops occur when this folder is contained within a folder that is dropped into. To put this the other way, when we drop content into a folder, it is redropped into all of the subfolders that have defined redrops. As with drops, we need to define a redrop parameter indicating that the object should respond to redrop actions, and identifying the method to invoke.

For example the following <object> definition:

<object declare classid="HTMLDropOps" title="Folder Name">
  <param name="redrop" value="insert">
  ...
</object>

indicates that the insert method of an HTMLDropOps object should be executed when something is dropped in a containing folder.

Note: you can define both drop and redrop parameters within the same object.

Reset

Resets occur when the user does a Reset from the Generator's popup menu. Unlike the drop and redrop parameters, the reset parameter does not need to be defined for a reset action to take place. If you explicitly define the reset parameter, it is done exactly like the drop and redrop parameters. For example, the following <object> definition:

<object declare classid="HTMLDropOps" title="Folder Name>
  <param name="reset" value="resetInsert">
</object>

indicates that the resetInsert method of an HTMLDropOps object should be executed during a reset. If the reset parameter is not given explicitly, Synthesis will automatically invoke a default reset operation based on the drop or redrop operation. So, if the drop action is foo, the default reset action will be resetFoo. If there isn't a drop action, the redrop action will be used instead.

For example, the following <object> definition:

<object declare classid="HTMLDropOps" title="Folder Name">
  <param name="drop" value="append"
  <param name="reset" value="resetAppend">
</object>

is the same as:

<object declare classid="HTMLDropOps" title="Folder Name">
  <param name="drop" value="append"
</object>

HTMLDropOps

HTMLDropOps is a Java Object that provides a basic set of page maintenance tools. Simple and flexible, they'll cover the bulk of your page layout needs.

Anchor / Reset
Set the anchor to point to the new page.

Append / Reset
Append a portion of the source into the front of the specified section of the target.

Insert / Reset
Insert a portion of the source into the front of the specified section of the target.

Replace / Reset
Replace a portion of the target with a portion of the source.

Reset No-Op
This is a no-op for disabling automated Generator resets.

Shuffle / Reset
Insert a portion of the source into the specified position in the target. The other sections of the target will be shifted to make room for the new portion.

Timestamp / Reset
Insert a timestamp into the specified position in the target.

Title / Reset
Set the generator's title.