Shayton Equilibrium Kitchen Utensil 2003 User Manual

Page of 194
 
Programming MediaRich for SharePoint
 
 
7
 
 
 
• 
• 
• 
 
The Application Programming Framework
 
MediaRich image processing is controlled by MediaScript, which provides a simple 
framework that makes writing new scripts easy. The framework provides several distinct 
benefits: 
 
 
A clear API for interacting with the rest of the system 
 
 
Ability to develop individual scripts that can be focused on the processing required 
 
 
The same scripts can be used for both Export and the MediaCart 
 
Working with MediaScript 
 
MediaScript is an ECMAScript compliant language like JavaScript or JScript. Similar to 
those other implementations of ECMAScript, MediaScript makes available additional host 
objects relevant to the task at hand. This document assumes some familiarity with 
MediaScript. For more information about working with MediaScript, see Chapter 2, 
“Using MediaScript,” and Chapter 
3, “MediaScript Objects and Methods.”
The most important new object in MediaScript is the Media object, which implements the 
many image processing features provided by MediaRich. A typical script creates one or 
more Media objects by either loading image data from a file or using the Media drawing 
methods. The script then performs additional image processing operations based on 
arguments and parameters in the request. Finally, the script generates a response by saving 
a Media object to the desired output file format.
This scripting framework provides a few key services:
 
 
Loads the image that will be passed to a 
 
processImage
 
 function
 
 
Calls the 
 
processImage
 
 function
 
 
Saves the image returned from the 
 
processImage
 
 function
Additional steps are performed depending on whether the context is Export or the 
MediaCart. 
Because this framework is provided as MediaScript, it is readily modifiable. However this 
requires advanced understanding of MediaScript. Before modifying the framework you 
should have some real experience writing MediaScript, read and understand the 
information about using MediaScript in general and in particular the sections on Media 
object, the Request object, the response object, and the TextResponse object. 
There are separate scripts used to provide the framework for Export and the MediaCart:
 
For Export
 
[MediaRich Root]\Shared\Originals\Scripts\SharePoint\exportCrop.ms
 
For the MediaCart
 
[MediaRich Root]\Shared\Originals\Scripts\SharePoint\MRBatch.ms
 
NOTE: 
 
These scripts are critical for users to be able to use the Document Export and MediaRich 
MediaCart site with SharePoint Products and Technologies. It is highly suggested that you ensure 
that there are back-up copies of these files before you modify either of them.