cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Mobile SDK and Windows 8

Former Member
0 Kudos

Hello everyone,

I need your help for a technical problem because i cannot find the solution by myself.

I develop an application for Windows 8 (application store) with Visual Studio 2012. The application will be deployed on a tablet with Windows 8 Pro.

However i need a communication/synchronisation with SAP so we want to use SUP Mobile Server.

I have used the SUP Sdk Mobile 2.2 to declare the MBOs. I generate c# code (option : .Net for windows with Eclipse environnment). But when i want to integrate the dll generated by the sdk in my Visual Studio 2012 project i have dependencies problems. For example, "UltraLite" dlls trying to use old .NET  (3.5) framework dependency. But for a windows 8 application we need .NET 4.5.

How can we realize a windows 8 application (store) using SAP Mobile SDK ? Is there possible with native deployment (c# etc...). I don't find any documentation about this problem.

Thanks in advance.

Stephane.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I resolve my problem and i have realize my first windows 8 application using Sup Runtime.

This solution works :

1) Embed the SUP generated code in a windows service (target .NET3.5) and declare associated contracts.

2) Develop a windows 8 application (target .NET4.5) and communicate with the windows service.

Note : in some some Windows 8 hardware .NET3.5 is not activated. you have to activate it in the windows functionality windows.

It's not perfect, but when Windows will be officially support by Sup we could replace the windows services easily.

Former Member
0 Kudos

Hello,

I am interested in what you achieved.

On msdn sites I'm reading that metro apps can't use .net 3.5 .dll files.

Could you please give me some more information on how you developed the desired communication between the two of them?

Thanks in advance.

Eni

rupambhatta
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you please elaborate your solution? I would like to replicate the same in my Win8 App.

How did you create the WCF service for all the SUP MBO generate APIs? Not sure how you really got all the apis from the MBO generate code accessible from your Win8 app via WCF service?

Pardon my ignorance - I am new to Win8 development.

Thanks for sharing your solution!

Former Member
0 Kudos

Hi, I did a sample to try a communication with .NET 3.5 code and .NET 4.5 (windows 8 code).

You develop a classic WCF and access it through URLs like: localhost/service. So I imagine that for each entry point in the MBO generated code (example findContactById) you will have an entry point in the WCF (example localhost/service/findContactById) that will call the GENERATED code. so the WCF is like a wrapper in this case.

Anyway I'm not sure this is an optimal solution since Windows 8 fully supports HTML5/CSS3/JS applications and 2.2 also generated Hybrid JS code.. So I'm assuming another option exists (hybrid windows 8), but I haven't yet done this.

rupambhatta
Product and Topic Expert
Product and Topic Expert
0 Kudos

I thought so. Exposing each and every object API method through WCF wrapper sounds a lot of work to me. But this is the closest we can come to using replication benefits of SUP on Windows 8. In fact, I can always write a more optimal data layer in the WCF service where I would expose only the essential API or move the business logic to the WCF layer. This way I would have to expose the minimum application specific APIs to the App UI layer. If anyone knows an easier solution, do share.

Other option is to use SUP REST APIs to connect via SUP, use its authentication mechanism and all the other goodness but then use standard web service consumption on Win 8 development. Please note that SUP oData SDK is not yet ported to Win 8. Hence, even if you have oData service from SAP Gateway, you would have to consume it using standard oData .net libraries. Clubbed with SUP REST API, it can be a good SUP solution but effort in such development is also quite high.

Regarding the Hybrid JS code, the issue is that the generated code is still supposed to be used in applications that play within the SUP Hybrid Web Container app and there is no Win 8 version. Hence, technically it leads to the same challenge as using Object APIs in the first place.

I am trying to now evaluate the pros and cons with the WCF wrapper of Object API approach. Apart from the additional effort to wrap the APIs, I don't see any other issues. Do let me know your opinion.

Former Member
0 Kudos

Hello Eni,

First we choose this architecture solution because we want to keep the offline mode and the SUP synchonization methods. Hybrid implementation is not usefull because it don't support offline mode.

The implemented solution is :

Pre-requiste : Windows 8 PRO

1) Windows 7 : Design you MBO with Sup Workspace and generate code for C# application (.NET)

2) Windows 8 : On Visual Studio create a WCF project with .NET 3.5 target. Integrate the generated code of SUP.

Note : SUP has a database approach so my advice to you would be to add a data layer (objects implementation) in you WCF service and don't directly use the MBO in the interface.

In all the case you have to implement data abstraction in a Windows Store application with WCF because the mapping between the views and the MBOs is not "easy"

3) To deploy a Windows service you have to implements some methods in you application (see Microsoft tutorial) and use "installutil" tools (embedded in .NET 4.0).

If the deployment failed, yo have to enable .NET3.5 in Windows 8 PRO settings.

4) Create a classic Windows 8 Store application (target .NET4.5) and use the WCF service to manage SUP Datas.

Former Member
0 Kudos

Hello,

You can read my last post. Tell me if you need more informations.

Former Member
0 Kudos

In all the case you have to implement an optimised data layer for your Windows 8 application. SUP has a DataBase approach and you need and "objects" aproach for your application.

The Windows Service solution could be an architecture choice, if you realize a good implementation you could easly replace SUP with a new version (when it will officially support  Windows 😎

I think SUP REST Apis would be more complicated if you want to implement an offline application (authentification, synchronisation, notification etc...). If you only need an online application you can developp an hybrid application. The hybrid Web containter should work on Windows 8. I don't see what dependencies the Javascript code would have with old version of .NET.

Former Member
0 Kudos

After having already developed a simple SUP<->WCF<->Metro/Win8 test app, now I'm looking at the other options, hybrid/REST/oDATA etc. It seems that you know more in this 'sub domain' compared to me. Do you think it's possible to generate JS code and use it in Windows 8 assuming that Metro apps can also be written in JS and HTML, and all this without having to use HWC of course and without having to use SAP Gateway (so in few words SUP + JS + HTML + .NET + CSS only).

Me personally I would go for the WCF solution which I'm more familiar with but I'm still experimenting with the other stuff but it seems less mature and more complicated than the nativ c#/wcf way.

Please let me know of your advancement.

-Eni

Former Member
0 Kudos

Hello Stéphane,

Thanks for your taking your time to explain the process.

I was somehow sure that I would need to abstract from the MBOs since maybe I couldn't serve them directly through the WCF services. I was thinking that maybe one of these solutions could do the work:

1) Copy-pasting the generated MBOs to the Windows 8 client app (at least the classes.. like Contact, Client, etc. for ex.)

2) Abstracting/Serializing the data either using proper Windows interfaces (lists, dictionaries) or using JSON/XML (I'm still unsure how to send big data in this case not sure if WCF handles all the lists etc by itself).

Apparently you are for the second option from what I understand; which would also require some kind of parsing and would only make the work harder.

EDIT (03.05.2013): Also do you use threads for your WCF? One problem i encounter is during the synchronization phase (which takes more than 1 minute in my case) and I can't keep the Service call for that long. I was wondering how to launch the synchronization and also return something to the user so that he could return for the real result later on.

Thanks again,

Eni

Former Member
0 Kudos

The SUP Object API (MBO libraries) is NOT compatible with Windows 8 today. To build an application for Windows 8 using SUP - you have to use the OData proxy and RESTful interfaces included in SUP 2.2.

If you check the list of supported platforms you'll see that Windows 8 is not included in the list: http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01699.0222/doc/html/lly1336582817864...

Former Member
0 Kudos

Thanks for your response.

But can we do an offline mode (with a local BDD) with the OData method ?

However i was thinking about this solution :

1) Generate MBO with SUP Mobile SDK -> C# code for .NET framework

2) Create a simple windows service (WCF) -> target .NET 3.5 and add the generated code and sup runtime.

3) Create a Windows 8 application with .NET 4.5 and use the WCF service.

4) Enable .NET3.5 (option disabled by defaut) on windows 8 OS

Do you think this approach is valid ?

Former Member
0 Kudos

No, the OData proxy and RESTful APIs don't provide support for offline access. It is my understanding that OData 3 supports a delta sync (of sorts, I don't have the details), so you may get offline access in the future. I don't know.

As for the other option you outline, I'm not sure - I'm not a big Windows developer (all of my Windows development has been in Borland Delphi) so I can't say. Seems like a lot of layers to me.

Former Member
0 Kudos

Hi Stephanie,

     Were you able to install the Mobile SDK in Windows 8 environment?? How did you do it. I am not able to install. The Install program check your os on init and displays a message saying that this software is not compatible with the os and exits..

  Any workarounds that you used to make this work??

Rajesh

Former Member
0 Kudos

I have installed the mobile SDK on windows 7. But i want to generate the MBO (C# code) to integrate them in my visual studio 2012 on Windows 8.

You can't install SDK on Windows 8, you have a warning message. In my case, the problem is the generate code that seems not compatible with the Windows store application.

Former Member
0 Kudos

Go to SUP installer Folder\SUPContents.ini and change the

[OS]

OSCheck=1 to 0

It will install on any version of Windows Now.

Thanks

PRadeep