IBM Worklight Foundation V6.2, Mobile Application Development v7.0

Page:    1 / 5   
Total 74 questions Expand All

An application developer has created an SQL adapter for a hybrid application.
Which artifacts were automatically generated when the application developer created the
SQL adapter?

  • A. {Adapter_Name}.xml and {Adapter_Name}-impl.js
  • B. {Adapter_Name}.xml, {Adapter_Name}.-impl.js, and filtered.xsl
  • C. {Adapter_Name}.xml, {Adapter_Name}.-impl.js, and {Adapter_Name}.adapter
  • D. {Adapter_Name}.xml, {Adapter_Name}.-impl.js, filtered.xsl, and {Adapter_Name}.adapter

Answer : C

Worklight adapters are developed by using XML, JavaScript, and XSL. Each adapter must have the following elements:
-> Exactly one XML file, describing the connectivity to the back-end system to which the adapter connects, andlisting the procedures that are exposed by the adapter to other adapters and to applications.
-> Exactly one JavaScript file, containing the implementation of the procedures declared in the XML file.

Note : -impl.js -
The adapter logic is implemented in adapters/LocationAdapter/LocationAdapter-impl.js.
-> Zero or more XSL files, each containing a transformation from the raw XML data retrieved by the adapter toJSON returned by adapter procedures. No .xls file is created for a SQL Adapter.
The files are packaged in a compressed file with a .adapter suffix (such as myadapter.adapter).
References: evref/ c_overview_of_ibm_worklight_adap.html?lang=en

An application developer has built a hybrid application using Worklight Studio and has added an Android environment to the application. The application developer has now built and deployed the Android environment to the Worklight Server.
In the application developer has correctly set up and configured their Android development environment, which of the following steps would they need to complete in order to the run the application on the Android emulator?

Choose Run As -> Preview -

  • A. Right-click the apps/{Application_Name}/android folderChoose Run As -> Android Application
  • B. Right-click the apps/{Application_Name}/android folderChoose Run As -> Preview
  • C. Right-click the automatically generated Android Project ({Project_Name}{App_Name}Android Folder)Choose Run As -> Android Application
  • D. Right-click the automatically generated Android Project ({Project_Name}{App_Name}Android Folder)

Answer : C

After you have your source code ready to deploy, simply right-click on your Android application and select Run as... > Build All and Deploy. A new folder should appear in your workspace with the title of your application: Name of our AppAndroid.
Next, right-click that project and select Run as.. > Android Application. If you have an actual Android phone connected via USB with developer mode enabled in the settings, the application will automatically run there, otherwise it will run in the existing AVD (Android
Virtual Device). This will launch the emulator.
References: worklight-1/

An application developer is developing a hybrid application and has added an Android environment. The developer implemented a native page in order to obtain information from the device and now needs to return the control and information into a new web view to continue with the application flow.
To do this, the native page should be implemented as an Java Activity and declared on a mapping file in the Worklight project.
What is the name of the file where the application developer must declare the Java

  • A. Server.xml
  • B. build-settings.xml
  • C. AndroidManifest.xml
  • D. application-descriptor.xml

Answer : C

AndroidManifest.xml file contains a reference to the Activity to be launched when application is started.
Not A: If, for example, you want to activate trace logging in Liberty, add a trace element to the server.xml file. Not B: The build-settings.xml file contains configuration options for minification and concatenation. By using minification on specific web resources, it is possible to reduce the size of JavaScript and CSS files in the application. In addition, concatenation of the web resources can be used to improve the start time of the application.
Not D: The application descriptor is a metadata file that is used to define various aspects of the application. It is in the application root directory and has the name application- descriptor.xml.

An application developer has an adapter deployed to the Worklight Server that is no longer needed. What must the application developer do to get rid of the adapter?

  • A. Click Delete to the right of the application name in the Worklight Console
  • B. Click Remove to the right of the application name in the Worklight Console
  • C. Right click the adapter and Choose Run-As->Uninstall in Worklight Studio
  • D. Right click the adapter and Choose Run-As->Undeploy in Worklight Studio

Answer : A

To delete an app in the Workling console:
Click Delete to the right of the app name.
Note: The delete adapter command removes (undeploys) an adapter from a runtime.
Syntax: delete adapter [runtime-name] adapter-name
References: devref/ t_deleting_apps.html n.doc/admin/ r_wladm_program_adapter_commands.html

An application developer is attempting to implement device single sign-on (SSO) as specified in the following example:
<mobileSecurityTest name=FormTest>
<testDeviceID provisioningType=none/>
<testUser realm=SampleAppRealm/>
<realm name=SampleAppRealm loginModule=MyLoginModule>
<loginModule name=MyLoginModule
Upon testing the configuration, the developer finds unexpected results, such as the
Worklight project failing to start.
What does the application developer need to do to bring the SSO configuration to a consistent state?

  • A. Set the sso.cleanup.taskFrequencyInSeconds server property.
  • B. Specify <testUser realm=”SampleAppRealm” sso=”true”/> in the mobile security test.
  • C. Add the following line to the mobile security test <test realm=”MySSO” isInternalUserID=:true”/>
  • D. Add the following line to the WMAppManifest.xml file: <Capability Name='ID_CAP_IDENTITY_DEVICE' />

Answer : B

Single sign-on is a property of a login module. You can enable single sign-on from a mobileSecurityTest element or from a loginModule element of authenticationConfig.xml.
Enabling single sign-on for a custom security test is done on the loginModule element.
Enabling single sign-on for a mobile security test is done on the testUser realm of the mobileSecurityTest element.
When configuring mobileSecurityTest elements, enable single sign-on from the securityTest element by setting the value of the sso attribute to true. Note that you can enable SSO for user realms only. If the sso attribute is not specified, it is assumed to be set to false. For example:
<mobileSecurityTest name="mst">
<testDeviceId provisioningType="none"/>
<testUser realm="myUserRealm" sso="true"/>
References: devref/ t_configuring_device_SSO.html

An application developer is attempting to update specific portions of a hybrid application by utilizing the direct update feature.
Which components can the application developer update using the direct update feature without having to rebuild and deploy a new binary of the application?

  • A. HTML, CSS, JavaScript
  • B. HTML, CSS, JavaScript, Java
  • C. HTML, CSS, JavaScript, Objective C
  • D. HTML, CSS, JavaScript, Version number

Answer : A

When you want to deliver a Worklight hybrid application that consists mainly of HTML5 with
CSS and JavaScript, and you must change the hybrid part of the application to provide new features or to fix a defect, you do not have to ask the application users to update it on their devices. You can use the Worklight direct update mechanism to deploy new HTML with
CSS and JavaScript for your application without changing the application version on the mobile device.
Not D: Delivering a new version of native code
The main reason that you would want to deliver a new version of an application is probably because your application uses native code and you want to provide new features or deliver fixes that require changes in the native code. You might also need to provide a new native version of the application, even if your Worklight application is completely written by using web technologies, to accommodate new mobile operating systems supported only in later versions of IBM Worklight. You cannot use the direct update mechanism in either of these cases. You must build and deploy a new version of the application.
Reference: evenv/ c_update_apps_wl_ac.html

An application developer intends to use Worklight iOS native APIs to develop a mobile application. A Worklight iOS native API is added to the Worklight project.
Which file does the application developer need to copy to the native iOS application project to connect to the Worklight server?

  • A. info.plist
  • B. worklight.plist
  • C. authenticationConfig.xml
  • D. application-descriptor.xml

Answer : B

The IBM Worklight native library and the client property file: The name and the format of this content depend on the environment. for iOS:
The WorklightAPI folder defines the IBM Worklight native library.
The worklight.plist file is the client property file.
References: evref/ r_development_guidelines_for_using_native_api.html

An application developer is concerned about how many requests may hit the adapter being created. The developer wants to ensure that the adapter can handle enough requests, but yet not allow requests to overwhelm the system.
What can the application developer do to limit the number of requests that an adapter will handle?

  • A. In the web server configuration, specify number of requests for MaxClients.
  • B. In the application server configuration, specify the number concurrent requests for the servlet engine.
  • C. In the loadContraints element of the adapter XML file, specify the number of requests formaxConcurrentConnectionsPerNode.
  • D. In the connectionPolicy element of the adapter XML file, specify the number of requests formaxConcurrentConnectionsPerNode.

Answer : D


Tuning Back-end Connections -
maxConcurrentConnectionsPerNode The maximum number of concurrent requests that can be performed on the back-end application from the Worklight server node. The worklight server will create a thread pool with maxConcurrentConnectionsPerNode size for that purpose. This maxConcurrentConnectionsPerNode parameter is set in the adapter.xml in the connectivity entry.
References: rver?lang=en

An application developer is implementing form-based authentication. The developer has created a challenge handler object to handle challenges from the SampleAppRealm by invoking createChallengeHandler on WL.Client as follows: var sampleAppRealmChallengeHandler = WL.Client.createChallengeHandler
Which function of the challenge handler must the application developer implement?

  • A. submitFailure
  • B. submitSuccess
  • C. submitLoginForm
  • D. isCustomResponse

Answer : C

entry/ibm_worklight_authentication_form_based_authentication_using_database_login_mo dule?lang=en

An application developer is using Unstructured Supplementary Service Data (USSD) on a mobile application that is configured to send a USSD message with the information that is going to be stored on the server. After the information is stored, the application developer needs to configure a custom response message for the application that will send the text
Success to the user.
Which is the correct code implementation that the application developer can use to return the expected response message to the user?

  • A. WL.Server.sendUSSDMessage(“Success”, “text/plain”, false))
  • B. WL.Server.sendUSSDResponse(“Success”, “text/plain”, true))
  • C. WL.Server.createUSSDMessage(“Success”, “text/plain”, false))
  • D. WL.Server.createUSSDResponse(“Success”, “text/plain”, true))

Answer : D

To send back a response:
WL.Server.createUSSDResponse("This is my response", "text/plain", true))
References: devref/ c_ussd_support.html

Which Worklight adapter is used to execute stored procedures in a database?

  • A. SQL
  • B. JMS
  • C. Gateway
  • D. Cast Iron

Answer : A

You can use the Worklight SQL adapter to execute parameterized SQL queries and stored procedures that retrieve or update data in the database.
References: evref/ c_overview_of_ibm_worklight_adap.html?lang=en

An IT company uses a native Android application to manage financial data. The company now wants to use the same application for iOS mobile devices. The application architect decided to use Worklight Foundation to generate a common User Interface for Android and iOS platforms.
The application developer is required to create this new common User Interface as a Web and add it to the existing Android application.
What steps should the application developer perform to add the new Web View to the existing Android application?

  • A. 1. Create a Worklight Native API application. 2. Create a folder called WebContent in the root of the project. 3. Add the Web view to the WebContent folder.
  • B. 1. Create a Worklight Native API application. 2. Right click the {Application name} folder and click on Add Hybrid Resources. 3. Select the Web view and click OK.
  • C. 1. Create a Worklight project with a hybrid application with an Android environment. 2. Copy the existing native code to the nativeResources folder of the Android environment. 3. Add the Web view to the Android environment.
  • D. 1. Create a Worklight project with a hybrid application with an Android environment and add the Web view. 2. Right click the Android folder of the Application and click on Export Worklight Hybrid Resources. 3. Add the Worklight hybrid resources to a new Native API application.

Answer : D

IBM Worklight Application Framework helps you create hybrid applications that interact with back-end services.
You can add a Worklight web view into an existing native Android, iOS, or Windows Phone
8 application. For example, you can transform the application from pure native to hybrid.
Using either the Eclipse plug-in or the command-line interface, export the corresponding resources from an existing Worklight hybrid project.
References: dev/ t_wl_native_hybrid_web.html

An application developer needs to send data to an iOS native page that will use the data that the user captured on a new web page. To accomplish this task, the developer needs to verify that the native page is implemented as an Objective-C class that inherits from a specific iOS class.
What is the name of the class the application developer must verify that the native page should inherit from?

  • A. UIViewController
  • B. UIManagedDocument
  • C. UIDocumentInteractionController
  • D. UIDocumentInteractionControllerDelegate

Answer : A

Adding the native features using Worklight NativePage API
Following the Worklight NativePage API documentation, native features are accessed by extending the UIViewController class. The instructions assume familiarity with using
XCode, iOS programming and Objective-C.
Example: Integrating the native address book
-> In XCode, right-click Classes > New File. Select iOS > Cocoa Touch > Objective-C class. Click Next.
-> Following the definition in WCHybridAppProperties.js, in the Class field, name the class
ContactsViewController. Ensure that Subclass of is set to UIViewController. Select With
XIB for user interface. Click Next. Etc.
References: ores.doc/concepts/ csmmobileappworklighti.htm

An application developer is working on a mobile application for a bank. The requirement is to globalize this application to display user messages, currency, date and time according to the locale and language settings on the device.
Which Worklight APIs can the application developer use to detect the specific device locale and language?

  • A. WL.Client.getLocale()WL.Client.getLanguage()
  • B. WL.Device.getLocale()WL.Device.getLanguage()
  • C. WL.App.getDeviceLocale()WL.App.getDeviceLanguage()
  • D. WL.G11N.getLocaleName()WL.G11N.getPrefferedLanguage()

Answer : D

The getLocaleName function gets the client current locale setting on the device. The getPreferredLanguage function gets the current language of the client.
Note: The following listings and figures show the Cordova globalization API. Dojo is used to demonstrate the user interface.
Table 2. Listing 1: Using the Cordova globalization API
function onDeviceReady(){
g11n = window.plugins.globalization;
References: dev/ c_globalization_in_ibm_worklight.html

An application developer is working with the Worklight administrator to secure a mobile application using adapter based authentication. The administrator provides the following configuration in the authenticationConfig.xml file.
<customSecutityTest name=AuthenticationAdapter-securityTest>
<test isInternalUserID=true realm=AdapterAuthRealm/>
<realm loginModule=AdapterAuthLoginModule name=AdapterAuthRealm>
<className>com.worklight.integration.auth.AdapterAuthenticator</ className>
<parameter name=login-function value=AuthAdapter.onAuthRequired/>
<parameter name=logout-function value=AuthAdapter.onLogout/>
<loginModule name=AdapterAuthLoginModule>
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</ className>
</loginModule> </loginModules>
What must the application developer do to ensure security is enforced as required?

  • A. Create a Worklight adapter named AuthAdapter and implement the onAuthRequired and onLogoutfunctions properly.
  • B. Create a Worklight adapter named AuthAdapter and implement the onAuthRequired, onLogout, andsubmitCredentials functions.
  • C. Create a Java class for the login module named AuthAdapter that implements the interface defined bycom.worklight.core.auth.ext.NonValidatingLoginModule paying particular attention to implementing the onAuthRequired and onLogout methods.
  • D. Create a Java class named AuthAdapter that implements the interface defined bycom.worklight.integration.auth.AdapterAuthenticator paying particular attention to implementing the onAuthRequired and onLogout methods.

Answer : C

Page:    1 / 5   
Total 74 questions Expand All

Talk to us!

Have any questions or issues ? Please dont hesitate to contact us