How can I connect a mobilefirst application to a bluemix service? - ibm-mobilefirst

I have developed a hybrid app on mobilefirst, and I wish to use a bluemix service. so I think the best solution is creating a nodejs app in bluemix and adding the needed service.
But I don't know how to connect both apps.

You can find online many examples describing how to use MobileFirst Adapters in order to access Bluemix services.
Review the following.
Once you when a technical question, open another.
MobileFirst Platform Foundation Labs - showing how to implement and integrate various features, including Bluemix services: https://developer.ibm.com/mobilefirstplatform/labs/
Implementation on an MobileFirst app which accesses the Watson question & answer service: https://developer.ibm.com/mobilefirstplatform/2015/04/29/using-http-adapters-to-access-watson-question-and-answer-service-at-ibm-bluemix/

Some bluemix services requires to have the app bound to your application. One way to handle this would be to deploy your MFPF Server in Bluemix using docker bound to your nodejs app, with all the services bound to it.
The idea here is your docker is bound to the nodejs, and the services are bound nodejs app, then this allow the services to be visible to the container.
This would be the case for example for SQL Database services.
Other Services are exposed outside the bounded app, such as Cloudant that has a public api for it.
To explore this observe the syntax of the command "ice group create"that you could to use to create a container group bound to app:
ice group create [-h] [--name NAME] [--memory MEMORY] [--env ENV] [--volume VOL] [--publish PORT] [--min MIN] [--max MAX] [--desired DESIRED] [--bind APP] [--auto] IMAGE [CMD [CMD ...]]
The key option would be "--bind APP". This same action could be done via the bluemix dashboard on the option to "Start Containers".
https://www.ng.bluemix.net/docs/containers/container_cli_reference_ov.html#container_cli_reference_ice__group_create
There is a sample app here that explores Watson Services + MFPF, without using the docker approach:
https://github.com/IBM-MIL/IBM-Ready-App-for-Banking

Related

Implement mobilefirst service in ios app

In IBM bluemix, i basically have to use mobileFirst service to host my ios application being implemented in it. I have seen several tutorials and stack overflow search for that but didn't got any satisfactory answer from that. If you can provide any sequential tutorial for that will be very helpful.
Set up your Mobile Foundation service instance, as instructed in the following doc: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/bluemix/using-mobile-foundation/
Create an iOS application. It can be a native app or a Cordova app with the iOS platform.
Add the MobileFirst SDK to the application by following the instructions per the required platform, here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/sdk/
Register the application in the server. You can do this either via CLI or via a graphical interface. You can see a "quick start" way, here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/quick-start/
Basically, to register an app from the command-line, simply navigate to the app root folder and run the command: mfpdev app register.
To ensure the connection between the server and client, you can make a simple call to obtain a token. You can find this code in the Quick Start docs mentioned above.
For iOS, be sure to enable "Keychain Sharing" in Xcode.

MobileFirst JavaAdapter on Bluemix

Recently, I have registered on IBM Bluemix. I've created a Mobile Foundation Service which also creates a Container.
I started a new MobileFirst Project on Eclipse and deployed a JavaAdapter. The adapter works fine in my machine, and the endpoint url is http://localhost:10080/{My project name}/adapters/{My adapter name}.
I went to the mfpconsole of the Mobile Foundation Service (where the url is like {my custom name}.bluemix.net/mfpconsole and uploaded the same adapter.
My question is: What is the endpoint url where I can find my adapter?
I see in this documentation:(https://www.ibm.com/support/knowledgecenter/SSHSCD_7.1.0/com.ibm.worklight.dev.doc/devref/c_adapters_endpoint.html) that there's a "Context," but I don't know where to find this "Context" name. I received the message "Context Root not found."
Thanks in advance!
You can go into your adapter in the console and view the swagger docs (View Swagger Docs).
In addition to what Dora wrote, please note that you're using Mobile Foundation service, which is based on MobileFirst Foundation 8.0, but creating Java adapters in MobileFirst Foundation 7.1
You may be able to deploy these adapters, but you will quickly find out that things have changed dramatically.
I suggest that you will follow the v8.0 documentation, including how to create adapters for v8.0: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/adapters/

How to deploy a local eclipse worklight project in cloud server?

I developed an android based hybrid app in the IBM MFP-7.0., My app is fetching the data from the Java service which is running in Tomcat Server. Here the app adapters are running in my local system MFP server to get the data from the Java service, So that I can only run the app in my local system android emulator. Now, we want to deploy the app in the cloud so that we can give this app to our users. Can some body help me how to run our MFP app in the cloud? Is it required to place eclipse in the cloud to run my MFP server like the way I am running in my local system?
Thanks in advance.
It looks to me like your understanding is completely lacking in this subject matter. Also note that this question has got nothing to do with programming.
You need a host machine. On this server you will run an application server (Tomcat, WebSphere Full profile, WebSphere Liberty profile - either single or a farm, depending on your required network topology and security & scalability needs).
On this application server you deploy MobileFirst
You will also need a database
This host machine needs to be accessible (with appropriate security) to the public Internet so that it could serve apps installed in end-users' devices
The application needs to be configured to send requests to the server (or to any front-side server like a Load Balancer, again, depending on your topology)
The generated application needs to be submitted to an App Store so that users could download and install it on their devices
I suggest that you will do some reading before asking any question. Since you're using IBM MobileFirst, start by reading the user documentation: http://www-01.ibm.com/support/knowledgecenter/SSNJXP/welcome.html

Can Azure be inter-operable with Amazon?

I have a question about whether cloud vendors have an inter-operable mechanism. For example, I am developing a WCF service and hosting in Azure successfully. After a pro-long time using Azure, can I use the same code for deploying it in AWS? Will it be possible? Does the API of both matches the same for deploying? If not, what are all the extra care needed for hosting the same service when switching over other Cloud Vendors like Salesforce.com, OpenStack, etc.,
In general, you can't just take what you develop for one Cloud platform and put it on another: they have different functionality sets and expose different APIs. However, the more low-level you make your code, the more likely it is that you'll find another vendor with a very similar API, since virtualizing infrastructure is simpler (and closer to standardized) than virtualizing a CMS application.
If you're using just IaaS, you can probably port fairly rapidly but you have to do more work to make your application. If you're using PaaS (or SaaS!) then you're more locked-in but you get more support for developing rapidly: it's that support platform which is both the value-add and the lock-in, and you won't get one without the other.
If you're using an Azure web role for hosting your WCF service then from deployment point of view you will not have many problems with AWS. You'll simply use facilities offered by AWS SDK for .NET (aka Publish to AWS CloudFormation). For sure you'll have to change the logging part if you've used Azure Diagnostic and alla Azure services with related AWS services. We did this multiple times in the last year and it works.
For worker role it's not so simple because in Azure they are easily deployed like web role, but in AWS you haven't direct deployment from Visual Studio so you have to do some manual work using Windows Services or something else

Glassfish appication server + application client on ipad

I have written an enterprise application on glassfish v2 application server with java application client. This application client is running on PCs with windows/linux OS. On server side I'm using EJBs. The task is to adopt additionally the client on ipads without/with minimal backend changes. And there are some options for that purpose. Which of there options is best choice? Or are there any other options?
to integrate Sun Glassfish Mobility Platform with Glassfish Enterprise v2 server on server side and to use Java ME on client side.
just to create an web module.
to develop client application using Objective-O/Cocoa and to provide its interaction with glassfish server. In this case it's impossible to use EJBs. I found out this integration is able with SOAP, but how it's works I don't know.
Any opinion will be very helpful!
Expose the EJBs as web services. Once you have a WS, you can create a number of different solutions to the problem. You could have a web app, that exposes some of the features of your solution and a native iPad app that does more (and would justify additional user investment [think freemium...])