IBM Worklight v5.0.5 > Develop IBM Worklight applications > Start with Worklight projects, applications, environments, and skins > Anatomy of an IBM Worklight Application

Application resources


Application descriptor

The application descriptor, application-descriptor.xml, contains application metadata. It is located in the root directory of the app. The file is automatically generated by the IBM Worklight Studio when you create an application, and can then be manually edited to add custom properties.


Main file

The main file is an HTML5 file, named after the app, that contains the application skeleton.

This file loads all the web resources (scripts and style sheets) necessary to define the general components of the application, and to hook to required document events. This file is in the /common folder of the app directory and optionally in the optimization and skin folders.

The main file contains a <body> tag. This tag must have the id attribute set to content. If you change the value, the application environment does not initialize correctly.


Style sheets

The app code can include CSS files to define the application view. Style sheets are placed under the /common folder (normally under /common/css) and optionally in the optimization and skin folders.


Scripts

The app code can include JavaScript files that implement interactive user interface components, business logic and back-end query integration, and a message dictionary for globalization purposes. Scripts are placed under the /common folder (normally under /common/js) and optionally in the optimization and skin folders.


Thumbnail image

The thumbnail image provides a graphical identification for the application. It must be a square image, preferably of size 128 by 128 pixels. It is used to identify the app in the IBM Worklight catalog.

IBM Worklight Studio creates a default thumbnail image on creating the app. Override this default image with an image that matches your application. The file is in the /common/images folder of the app.


Splash image

The use of Windows 7 and Vista gadgets and OS X Dashboard widgets is deprecated in Worklight version 5.0.5. Support might be removed in any future version.

The splash image applies for mobile environments, Windows 8 apps, Windows 7 or Vista gadgets, and OS X Dashboard widgets. The splash image is displayed while the application is being initialized. It must be in the exact dimensions of the app.

The IBM Worklight Studio creates a default splash image when you create an application environment. You can override this default image with an image that matches your application. The image is in the following locations:


Application icons

You can use the application icons to start the app in the various environments. The IBM Worklight Studio creates default application icons when you create the app. You can override them with images that match your application. For Android, iPad, and iPhone, put your icons in the location indicated by the Location of overriding icon column in the following table.

The following table summarizes the sizes and location of each application icon.

Environment File name Description Location of default icon Location of overriding icon
Adobe AIR icon16x16.png icon32x32.png icon48x48.png icon128x128.png Application icons of various sizes that are attached to the AIR version of the application. The dimensions of each icon are specified in its name. air/images  
Android icon.png An icon that is displayed on the device springboard. You can provide a different icon for each device density that you want to support. android/native/res/drawable /android/nativeResources/res
BlackBerry 10 icon.png An icon that is displayed on the device. Dimensions are 114 by 114 pixels. blackberry10/native/www blackberry10/nativeResources/www
BlackBerry 6 and 7 icon.png An icon that is displayed on the device. Dimensions are 80 by 80 pixels. blackberry/native  
iPad icon.png An icon that is displayed on the device springboard. Dimensions must be 72 by 72 pixels. ipad/native/resources /ipad/nativeResources/Resources
iPhone icon.png An icon that is displayed on the device springboard. Dimensions are 57 by 57 pixels. For iPhone 4, a high-resolution image of 114 by 114 pixels is preferred. iphone/native/resources /iphone/nativeResources/Resources
OS X Dashboard icon.png An 82 by 82 pixel image that is displayed in the OS X Dashboard. The use of OS X Dashboard widgets is deprecated in Worklight version 5.0.5. Support might be removed in any future version. dashboard/images  
Windows Phone 8 Background.png
ApplicationIcon.png
Both icons are used to identify the application. Background.png is displayed on the device home screen, and must be 300 by 300 pixels. ApplicationIcon.png is displayed in the list of applications, and must be 100 by 100 pixels. windowsphone8/native  
Windows Phone 7 Background.png
ApplicationIcon.png
Both icons are used to identify the application. Background.png is displayed on the device home screen, and must be 173 by 173 pixels. ApplicationIcon.png is displayed in the list of applications, and must be 62 by 62 pixels. windowsphone/native  
Windows 8 storelogo.png
logo.png
smalllogo.png
All icons are used to identify the application. storelogo.png is the image the Windows Store uses when it displays the app listing in search results and with the app description in the listing page. The image must be 50 by 50 pixels. logo.png represents the square tile image of the app in the Start screen. The image must be 150 by 150 pixels. smalllogo.png is displayed with the app display name in search results returned on the Start screen. smalllogo.png is also used in the list of searchable apps and when the Start page is zoomed out. The image must be 30 by 30 pixels. windows8/native/images  
Windows 7 and Vista dock.png
icon.png
Both icons are used to identify the application. dock.png is displayed on the Windows 7 desktop and in the Vista Sidebar when the gadget is docked. The image must be at least 57 pixels high and no more than 130 pixels wide. icon.png is a 64 by 64 pixel image to be displayed in the Windows 7 and Vista gadget library. The use of Windows 7 and Vista gadgets is deprecated in Worklight version 5.0.5. Support might be removed in any future version. vista/images  


Parent Anatomy of an IBM Worklight Application





+

Search Tips   |   Advanced Search