Introduction
Nowadays , we can see that, many of the standard Smart Sync MI application(MI applications like MAM..) users have asked so many questions regarding the issues they have faced while modifying the code of standard applications using the latest versions of NetWeaver Developer Studio.Most of the standard MI applications were developed with SP 09 version or lower versions of developer studio and there are so many structural differences between the applications developed using SP 09 and later versions . There is no relevant help regarding the structure of applications created using the SP 09v of Developer Studio.Obviously the developers who are new to the MI applications will have doubts during the migration of SmartSync MI applications from SP 09 to higher versions of NWD Studio.I started developing Smart Sync MI applications using SP 09 version of studio and right now using the SP 16 version of Developer Studio. So i could notice so many differences in the structures of applications generated while creating SmartSync applications using SP 09 and higher versions of Developer Studio.In this blog, i am discussing the structure of Smart Sync Applications developed using the SP 09 version of NWD Studio.This would be really helpful to those who are new to MI application development.This is applicable to SmartSync MI JSP Runtime applications.
Prerequisites
If you want to verify this,
1. NetWeaver Developer Studio of version SP 09 must be installed.
2. Appropriate MI client must be installed on the local machine where the developer studio is installed . This is to avoid errors (some of the library files are required while creating the MI project) during the creation of MI project.
3. MDK settings must be properly configured in the NetWeaver Developer Studio.
Versions
I used the SP 09v of NWD Studio and SP 11v of MI client as subject installations.
Sample Project
For creating sample SmartSync MI applications , we need the meta data descriptor file(meRepMeta.xml file). We are exporting the meta data with respect to MCD(Mobile Component Descriptor).
We should include at least one SyncBO in the created MCD.
ZSBCONTACT
is the sample SyncBo(S01) created for testing. I used the standard BAPI Wrappers provided by SAP.The details about the used BAPI Wrappers and the details of the fields mapped for each BAPI Wrapper is listed below.BAPI Wrappers used,
__________________
MEREP_CONTACT_GETLIST Contact address: Getlist
MEREP_CONTACT_GETDETAIL Contact address: GetDetail
MEREP_CONTACT_CREATE Contact address: Create
MEREP_CONTACT_MODIFY Contact address: Modify
MEREP_CONTACT_DELETE Contact address: Delete
I have mapped only these fields in my sample SyncBo.
MEREP_CONTACT_GETLIST
_____________________
TOP
-
PERSNUMBER
FIRST_NAME
LAST_NAME
PROFESSION
***
BIRTHDAY
MEREP_CONTACT_GETDETAIL
_______________________
Import Parameter
-
PERSNUMBER as Key
Tables
______
010(ADDRESS)
-
PERSNUMBER (key)
SEQNO_ADR
CITY1
CITY2
STREET
HOUSE_NUM
REGION
LAND
020(E_MAIL)
-
PERSNUMBER(key)
SEQNO_E_MAIL
E_ADDR
E_ADDR_TEXT
MEREP_CONTACT_CREATE
________________________
Import Parameters
-
PERSNUMBER
FIRST_NAME
LAST_NAME
PROFESSION
***
BIRTHDAY
Tables
_______
010(ADDRESS)
-
PERSNUMBER
SEQNO_ADR
CITY1
CITY2
STREET
HOUSE_NUM
REGION
LAND
020(E_MAIL)
-
PERSNUMBER
SEQNO_E_MAIL
E_ADDR
E_ADDR_TEXT
MEREP_CONTACT_MODIFY
_________________________
Import Parameters
-
PERSNUMBER
FIRST_NAME
LAST_NAME
PROFESSION
***
BIRTHDAY
Tables
_______
010(ADDRESS)
-
PERSNUMBER
SEQNO_ADR
CITY1
CITY2
STREET
HOUSE_NUM
REGION
LAND
020(E_MAIL)
-
PERSNUMBER
SEQNO_E_MAIL
E_ADDR
E_ADDR_TEXT
MEREP_CONTACT_DELETE
________________________
PERSNUMBER
Creating SmartSync MI Project.
Now we are going to create a Smart Sync MI application using the
Smart Sync Application Wizard
.
The generated project will have the structure like this in the NetWeaver Developer Studio.(figure given below).
In this figure , we can see 3 folders named
java , app-root , cfg
and the library files refered in the generated project.Table 1.1: Generated Smart Sync MI Application Directory Contents(JSP Runtime)
Directory Name | Directory Contents |
---|---|
app-root |
|
cfg |
|
java |
|
Folder Contents in Detail
Contents of app-root folder
As i mentioned above, this folder is the base directory of the generated application.Contents of this folder is used for executing the application in the client device.
Contents of WEB-INF folder
Contains the web.xml deployment descriptor and static configuration files.Generally, this directory contains files that are copied rather than changed during a build.
Table 1.3: Contents of WEB-INF Folder
Directory Name | Directory Contents |
---|---|
classes |
|
lib |
|
res |
|
web.xml |
|
core.configure |
|
zmcdcontactapp |
view file, which is mapping the relationship between the particular event in the corresponding JSP file to its event controller file and the target screen to which thecontrol is to be forwarded.The target screen contents are diplayed as a result of the event.The contents which are to be displayed must be populated within the event controller method which is implemented within the proper controller.(We can see as may view files equivalent to the number of JSP files generated whose names are exactly same as that of the generated JSP files.In our case within this folder , we have only the Menu.view file , as we have only the Menu.jsp file within the zmcdcontactapp which is also in theapp-root folder.) |
zsbcontact |
*.view files.This folder contains the view files of the JSP files which are in the zsbcontact folder located within the app-root folder. |
Contents in java folder
Contents in this folder are the generated interfaces for handling the SyncBo instances.
Manager.java - This Interface is SyncBo specific. This contain the declarations of all basic methods corresponding to one SyncBo object.
This manages a business object and all its composing child business objects. This factory object is responsible for the following tasks for all the business objects it manages:
-Looking-up: looks up a single business object by its key from persistence.
-Retrieving: retrieves a collection of all the business objects from persistence.
-Constructing: constructs a business object instance.
-Inserting: inserts a business object to persistence.
-Copying: clones a business object for editing. The cloned business object has exactly the same keys and contents with the original one, but not on persistence.
-Updating: updates a business object in persistence.
-Deleting: deletes a business object from persistence.
-Other business logics, e.g., searching, etc.
bioimplementation |
biointerface directory.In addition to this , we can also see onesyncbonamelist.properties file ,which is used for storing the names of SyncBos used in our Smart Sync Application.This property file is referred in our application.In this file, we can see the mapping between the exact syncbo name we used and the name generated by the studio for finding the actual syncbo. |
web |
|
Summary
Hope you have got a general idea regarding the structure of Smart Sync MI JSP Runtime applications generated using the SP 09 version of NetWeaver Developer Studio.
Author's Note
1. SP 09 version of Developer Studio is using the 2.5.1.1 version of Mobile Development Kit Tools.
2. Smart Sync MI Applications (JSP Runtime) generated using SP 09v of Developer Studio is MCD specific.It is generating
MCD specific files.This architecture makes the applications too complex during migration.
3. Smart Sync Applications using SP 11v or higher versions are generic applications.
4. In SP 09v applications, the developers don't have to code in Smart Sync API level as most of the codes are generated by default.
5. Applications in SP 09v of Developer Studio is following the exact MVC Architecture(We can see the seperation of models, views and controllers here).
6. When comparing with higher versions , it is additionally using two more APIs.(
mbcore.jar
andmbsmake.jar
)