ShowTable of Contents
Mobile Portal Accelerator (MPA) builds upon WebSphere Application Server and WebSphere Portal to help service providers adapt, manage, transform, and scale existing applications, Web and legacy. It can then be converted into mobile applications. MPA, with device-independent content development tools, is designed to enable mobile content providers to develop and deploy Web-based applications to virtually any mobile device quickly and cost-effectively. WebSphere Everyplace Mobile Portal includes the Multi-Channel Server (MCS), Everyplace Mobile Portal Extensions, and the toolkit for Mobile Portal.
MCS is the runtime component that transforms XML-based Device Independent Markup Extensions (XDIME) markup into native markup languages for individual devices. Media Access Proxy (MAP) is an optional component of MPA that is used to perform internal transcoding and transformation operations on image files. It converts images to different formats for different device types using predefined transcoding rules.
The MAP sample portlet demonstrates the following features of MAP:
- Image Conversion
- Image Cropping
- Image Scaling
It can also be used to verify the installation of MAP. The portlet employs XDIME 2 and the image resources are accessed using the object element. It would require the MAP runtime installed along with WebSphere Portal as a prerequisite.
The following image formats and resolutions will be used to test for conversion to the preferred device specific format:
- VGA – 640 x 480
- QVGA – 240 x 320
- 16thVGA – 120 x 160
The image will be transcoded from the following sources:
- Device dependant mime type
- Convertible image component
An image is cropped by specifying the upper left corner and bottom right corner of the area that is to be preserved.
Upper left corner: v.top.y, v.left.x
Bottom right corner: v.bottom.y, v.right.x
Values are specified under the following rule:
0<=v.top.y<=v.bottom.y<=1 and 0<=v.left.x<=v.right.x<=1
The aspect ratio of the image is preserved during scaling. The input parameters for specifying scaling are v.width and v.height. These refer to the output image width and height in pixels respectively. The transcoder does not scale images larger that the source by default. However, this can be overridden through the use of the v.scaleLarger URL parameter.
A watermark can be embedded by setting the watermarkURL attribute on the watermark element. If the device can display the image without transcoding, the image is sent directly to the target device with no watermarking applied.
The MAP sample portlet supports the following configuration parameters:
useImgPolicy - specifies whether to use an image component or a mime type
OnRemoteServer - defines whether the source images reside on a remote web server
serverDirectoryName - specifies the name of the directory containing the source images
The parameters can be modified by entering the configure mode of the portlet. These can also be configured by a portal administrator using the WebSphere Portal Administration Portlet Management > Portlets configuration option.
This article contains a video demonstration of the above features simulated on a real device.