Overview of MobileFirst adapters

Adapters are the server-side code of applications that are deployed on and serviced by IBM MobileFirst™ Platform Foundation.

Adapters run on the IBM MobileFirst Platform Server as middleware between mobile apps and enterprise (back-end) systems.

Adapters are the server-side code of applications that are deployed on and serviced by IBM MobileFirst Platform Foundation. Adapters connect to enterprise applications (also referred to as back-end systems), deliver data to and from mobile applications, and perform any necessary server-side logic on this data.

You can "hot deploy" adapters, meaning deploy, undeploy, and redeploy them at run time. This capability lends great flexibility to the MobileFirst server-side development process. Here are the benefits of using a Java™ adapter:
  • Ability to fully control the URLs structure, the content types, the request and response headers, content and encoding.
  • Easy and fast development and testing by using MobileFirst Studio and CLI.
  • Easy and fast deployment to a running MobileFirst Server without compromising on performance and without any downtime.
  • Ready-to-use security integration with MobileFirst security that uses simple annotations in the source code.
Figure 1. MobileFirst adapters
The diagram shows how MobileFirst adapters are located in MobileFirst Server and connect with devices and enterprise back end.

Development Language

Adapters can be developed in either in JavaScript or in Java. The source code of the adapter in both cases has access to a rich server API, which enables it to perform operations on the server side such as sending push notifications, calling other adapters, getting the user identity and more. For more information, see MobileFirst Java adapters and MobileFirst JavaScript adapters.

Lifecycle

The adapter lifecycle comprises three stages:
Develop
The adapters are developed in IBM MobileFirst Platform Studio or from the command-line interface (CLI) as a part of the MobileFirst project development.
Test
IBM MobileFirst Platform Studio and CLI tools make it easy to test adapter code. It is also possible to use external tools such as Postman or cURL to test the adapter. The Java adapters tutorials on the Getting Started page of the Developer Center show an implementation of HTTP connectivity in a Java adapter.
Deploy to staging, test, and production environments
After development and testing have been completed, you deploy the adapter to a running MobileFirst runtime of the various runtime environments (beta, test, pre-production, production). You can use the IBM MobileFirst Platform Operations Console to deploy the adapter from its web-based GUI. It is also possible to automate the build and deploy process of MobileFirst adapters by using MobileFirst Apache Ant tasks. For more information, see Administering MobileFirst applications through Ant.

Third-party dependencies

MobileFirst Server comes packaged with third-party dependencies. Ensure that you do not package different versions of those dependencies in your project. For a full list of the third-party JAR files in MobileFirst Server, see Third-party adapter dependencies.