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?
Answer : C
Explanation:
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:
http://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/d 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 -
Answer : C
Explanation:
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: http://www.ibm.com/developerworks/library/mo-aim1206-working-with- 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
Activity?
Answer : C
Explanation:
AndroidManifest.xml file contains a reference to the Activity to be launched when application is started.
Incorrect:
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.
References: http://www.ibm.com/developerworks/library/j-mobileforthemasses3/
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?
Answer : A
Explanation:
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:
https://www.ibm.com/support/knowledgecenter/SSZH4A_5.0.5/com.ibm.worklight.help.doc/ devref/ t_deleting_apps.html https://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.appadmi 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:
<securityTests>
<mobileSecurityTest name=FormTest>
<testDeviceID provisioningType=none/>
<testUser realm=SampleAppRealm/>
</mobileSecurityTest>
</securityTests>
<realms>
<realm name=SampleAppRealm loginModule=MyLoginModule>
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
</realm>
</realms>
<loginModules>
<loginModule name=MyLoginModule
ssoDeviceLoginModule=WLDeviceAutoProvisioningLoginModule>
className>com.worklight.core.auth.exp.NonValidatingLoginModule</className>
</loginModule>
</loginModules>
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?
Answer : B
Explanation:
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"/>
</mobileSecurityTest>
References:
https://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/ 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?
Answer : A
Explanation:
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.
Incorrect:
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:
http://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/d 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?
Answer : B
Explanation:
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:
http://www.ibm.com/support/knowledgecenter/SSZH4A_6.1.0/com.ibm.worklight.dev.doc/d 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?
Answer : D
Explanation:
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:
https://www.ibm.com/developerworks/community/blogs/worklight/entry/tuning_worklight_se 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
(SampleAppRealm);
Which function of the challenge handler must the application developer implement?
Answer : C
Explanation:
References: https://www.ibm.com/developerworks/community/blogs/f870215a-82d8-4701-
88a5-7937fb3c73c0/
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?
Answer : D
Explanation:
To send back a response:
WL.Server.createUSSDResponse("This is my response", "text/plain", true))
References:
https://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/ devref/ c_ussd_support.html
Which Worklight adapter is used to execute stored procedures in a database?
Answer : A
Explanation:
You can use the Worklight SQL adapter to execute parameterized SQL queries and stored procedures that retrieve or update data in the database.
References:
http://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/d 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?
Answer : D
Explanation:
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:
https://www.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/ 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?
Answer : A
Explanation:
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:
http://www.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.starterst 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?
Answer : D
Explanation:
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:
https://www.ibm.com/support/knowledgecenter/SSZH4A_6.1.0/com.ibm.worklight.dev.doc/ 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.
<securityTests>
<customSecutityTest name=AuthenticationAdapter-securityTest>
<test isInternalUserID=true realm=AdapterAuthRealm/>
</customSecutityTest>
</secutityTests>
<realms>
<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/>
</realm>
<realms>
<loginModules>
<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?
Answer : C
Have any questions or issues ? Please dont hesitate to contact us