MobileFirst 7.1 - MobileWebApp and DesktopBrowserApp Environment - ibm-mobilefirst

We are using MobileFirst 7.1.0.0-MFPF-IF201703150904 version. We have built a hybrid mobile application for iPhone and Android. In the backend, we have all Java Adapters.
Recently we have decided to extend the scope and add MobileWeb and DesktopBrowser Application. To achieve that I have created the new environment in eclipse studio and tried to test the new environments. I found this error "errorMsg":"Unsupported environment"
I found this article where the same issue is discussed. The article states a workaround would be to use JavaScript adapters.
My question is how can we create these environments now, we only have Java adapters in the backend. Do we need to replicate all the adapters in JavaScript? Is there any other way to achieve this?

Related

IBM Worklight 8.0 Adapter to invoke Java code

We are using MobileFirst 8.0 adapters for mobile application development.
Earlier we were using Mobile first 7.1 where we use to invoke java files as below.
var salt =com.Base64EncoderDecoder.decode(salt);
The above file Base64EncoderDecoder.class was part of worklight .war file.
Can same approach be achieved using Mobile first 8.0 ? Please suggest how this can be achieved in 8.0.
You can still achieve the same functionality with IBM MFP 8.0.
The difference is that , with MFP 8.0, the Java class will be packaged within your adapter project itself.
For more details and a working sample, refer to this link.

Enabling Minification/Concatenation on 6.3 version of MobileFirst CLI?

We are trying to enable the Minficiation/Concatenation feature in MobileFirst 6.3 via the command line for use in our build servers. However, we cannot find the correct options to select to get it do that task.
We have been able to successfully perform this task using the IDE, but this is not a viable option with the build server. We are using identical build-settings.xml files between the Eclipse IDE build and the CLI build.
I have heard that there is a method for accomplishing this through editing the ANT script of the CLI. Does anyone know where this is located in the CLI, and how I would go about doing this?
The optimization feature that enables minification and/or concatenation in Hybrid applications is not available in the MobileFirst 6.3 CLI tool - only in MobileFirst Studio.
This is, however, possible using the MobileFirst CLI tool in v7.0. You can find the user documentation for this feature here: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.dev.doc/dev/c_optimize_app_cli.html

Can IBM Worklight Mobile build faster

Currently I am using Eclipse. Can I use another IDE or a customized configuration for Eclipse to build for my project faster? I want to increase my production time.
Worklight 6.2 and above provide a command line interface which you can use instead of Eclipse.
With some development effort you could also take the CLI and hook it to other IDEs that provide pluggability options.
You can read more about the CLI, here:
For Worklight 6.2: Command Line Interface for IBM Worklight Developers
For MobilFirst 6.3 and above: Using CLI to create, build, and manage MobileFirst project artifacts

Adding worklight adapter programmatically

I am creating application which should be plugin upgradable.
Problem is that every plugin should consist of some client code and there should also be some sort of adapter which will fetch data to application from 3rd party site/api/... So my problem is how do I add new adapter to server programmatically when someone deploy new plugin?? Is it possible? Or is there better architectonic approach?
Using Worklight Studio (plug-in for Eclipse), you cannot programmatically add adapters.
If you are using Worklight 6.2, you can explore the newly released Worklight CLI, which is a command line interface to create projects, applications, adapters, environments, etc... perhaps you could devise a way to intergrate this into a build a system of your own that will fit your needs.
Training module: Using CLI to create, build, and manage Worklight project artifacts
User documentation: Command Line Interface for IBM Worklight Developers

IBM Worklight - Deploy all adapters at once

I have total 35 (and increasing) Worklight Adapters in my Worklight Hybrid App.
Now every time I power on my Mac, I need to deploy all those work light adapters ONE-BY-ONE
Is there any method by which I can deploy awl the adapters in single shot. As of now, I am unable to find out the way.
Anyone else faced the similar problem?
I am using:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426
If that matters.
A Deploy All Adapters action is not available in Worklight Studio, but sounds like a rather useful feature for cases like yours. Feel free to submit a feature request.
After you power on the computer, open Eclipse and start the Worklight Development Server, and then visit Worklight Console, the apps and adapters are not available? I find it highly unlikely that you will need to re-deploy all of your adapters...
A possible workaround for it will be to enhance the Ant script that deploys apps and adapters, to deploy them all using a loop. Also see:
Ant tasks for building and deploying applications and adapters