
Mobile Applications for Handhelds in the Composite Development Scenario are based on a set of components that are composed into a mobile application:
Mobile Service Component
A Mobile Service Component contains a coherent set of Data Objects as well as business logic for these Data Objects. One or more Mobile Service Components expose their business logic to one or more Mobile UI Components.
Mobile UI Component
A Mobile UI Component uses business logic and data supplied by one or more Mobile Service Components and provides the user interface for these. A Mobile UI Component contains standard Web Dynpro (WD) development objects, such as the WD model, WD applications, and WD components. Mobile UI Components operate on top of service components and can be used by other UI components. One or more Mobile UI Components comprise the application's user interface.
Mobile Application
A Mobile Application serves as a bundling entity that groups the Mobile Service and UI Components into a single entity.
Mobile Java Component
A Mobile Java Component is used to contain business logic of components or controls. This is primarily used to contain the business logic for custom controls. Mobile Java Components can expose their business logic to one or more Mobile Service, UI, Application, or Java components.
These four entities are technically represented as standard NWDI development components of type Mobile Applications for Handhelds. Each such component comes with its own meta-model of objects that it can contain. The tools in the Mobile Applications for Handhelds perspective of the SAP NetWeaver Development Studio allow you to model (and code) the respective objects, generate the runtime code of the component automatically, and then build, deploy, and run the component locally.
Any of these four entities can also be uploaded to the Data Orchestration Engine (DOE) for later deployment to mobile devices. All three are Mobile Components in the DOE-sense and are thus entities that can be deployed by means of the DOE. Their interdependencies as Development Components (DCs) are reflected as mobile component dependencies on the DOE. The dependencies that Mobile Service Components have towards Data Objects on the DOE are also captured as data object dependencies of the resulting mobile component. This chain of dependencies is reflected in the mobile component descriptor file ( mcd.xml ) of each component. You can view and edit this file in NWDS.
The Mobile Application, however, plays a special role in this: on upload to the DOE, it is turned into a Software Package - the DOE equivalent of a mobile component-bundling entity.
Mobile Service Component
Mobile Service Components are standard NWDI Development Components (DCs) of type Mobile Applications for Handhelds and contain the business logic of a mobile application. This logic is represented as a set of model entities that are developed using specialized modeling tools in the Service Explorer.
Data Objects are imported from the Data Orchestration Engine (DOE) . You can deselect nodes or node attributes that are not required in the context of the Mobile Service Component. Thus, Data Objects are projections of their DOE equivalents. You can place services on top of Data Objects. Services are bundling entities for business logic, such as for queries, validation logic, and so on. A service has service operations that can be of two types:
Queries
Queries are service operations representing a query against the local data store. It is modeled in a dedicated editor and allows for complex operations, such as joins, filters, input parameters, and so forth.
More information: Creating a Query
Custom Operations
Custom operations are hand-coded operations of a service. In the implementation of a custom operation, the developer can access the SAP NetWeaver Mobile client's runtime API or standard Java 2 Micro Edition (J2ME) APIs.
More information: Creating a Custom Method
Both service operations return either Java simple types (such as string, Boolean, and so forth), client data object nodes, or data structures. A data structure is an ordered list of Java simple types and client data object node attributes and is also modeled in a dedicated view.
Custom operations can throw Java Exceptions that must previously be declared in the Mobile Service Component.
Mobile Service Components can also contain messages. These are typically added as error message texts when exceptions are thrown.
The complete business logic modeled in the Mobile Service Component is consumed by the Mobile UI Component. If the business logic is very complex, it can be broken up into several Mobile Service Components and Development Component dependencies can be defined as needed.
Mobile UI Component
Mobile UI Components are standard NWDI Development Components (DCs) of type Mobile Applications for Handhelds and contain the user interface (UI) of a mobile application. The UI is developed using Web Dynpro (WD) technology. This means that concepts, tools, meta-model, and many of the WD APIs are available to developers, making mobile UI development an easy task for an experienced Web Dynpro developer.
Mobile Application
A Mobile Application serves as a bundling entity that joins the Mobile Service and UI Components to form a complete Mobile Application that can then be deployed and run.
Apart from bundling mobile components, Mobile Applications also specify certain properties of the mobile application. At present, the only application-level property is the start-up application: It is defined by selecting one of the Web Dynpro (WD) applications in the project's UI components. This application will be listed on the application launcher of the Mobile Client for Handhelds.
The bundling is an optional step, since mobile UI components can also be deployed directly and all dependent components are automatically deployed with it.