Skip to Content
Author's profile photo Julia Lakatos

Mobile Chat App with NW Cloud: Part II – Architecture and getting started

In this series of blog entries we will describe the development of a mobile chat app using SAP NetWeaver Cloud as a backend. The last time we explained the purpose of the blog. Now we want to tell you more about the functionality and the architecture of our app and how we got started with NW Cloud.

What functionality will Twaddle provide?

Our first design includes the basic functionality of a chat client. First of all there is a login screen where you enter your ID and your password. At this time there is no authority check after pressing the “login”-button. (We will work on authorization later so we didn’t care much about that at the beginning of our project. 🙂 ) If there is a new username, a user will be created on the database. After that, the screen with all existing chat rooms will be shown. At this time, the backend automatically creates new one-by-one chat rooms when a new user is created. But you do not only have the possibility to chat one-by-one, you can also create a new chat room with several persons to chat in a group.


What does our data model look like?

After telling you about the functionality of our app we want to show you the data model we designed. There are of course our users, which I already mentioned. Many users are in many chat rooms and the other way round. A new message belongs to the user who sent it and to the chat room where it was posted. Thereby we have the possibility to get all messages of one chat room but we also know who sent it.  

Slide 3.jpg

What about the architecture of Twaddle?

It’s probably useful to show you a high level overview of the architecture of Twaddle. In the middle of the picture beneath you can see the NW Cloud with a servlet and a database. The iOS Device on the left-hand side sends a message to our servlet. This message is saved in the database belonging to NW Cloud. This database also stores the users and chat rooms. The iOS Device on the right-hand side asks the servlet for messages and displays the new message on the screen.

Slide 2.jpg

How we got started with NW Cloud

Getting Started with NW Cloud is explained by the documentation very well. First we had to apply for an account for the NW Cloud landscape which was done in a few seconds. There are SAP-internal test landscapes available, but the public trial landscape gives us the possibility to connect to our application via the public internet. That’s important for our use case, because the mobile application should be able to connect its backend servers without the necessity to create a VPN, so we decided to use the public landscape. Because of the 90 days limit this can’t be a long-term solution of cause, but in the moment we are satisfied. 🙂

After setting up the tools our first aim was to develop a Hello World application. Fortunately there is a tutorial for exactly this purpose available. So the biggest issue for us was to find out which credentials we had to enter as “Account information” in the eclipse prompt. Finally we were successful with these:

Account name: p142549XXXXtrial

User name: P142549XXXX (use your SCN account)

Password: (your SCN password)

In our next blog post we will explain the data exchange between mobile device and NW Cloud in detail. We will describe how our servlet works and how we use JSON for exchanging the data. We always appreciate your feedback so please feel free to suggest any ideas of improvement.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Matthias Steiner
      Matthias Steiner

      Hi Julia,

      seeing how Johannes and you are tackling the development of this PoC makes me really happy and I'm looking forward to the next iterations of your blog!

      In regards to authentication it really is piece of cake and requires little work on your side thanks to the integrated Identity Management. With just a few lines of code you can connect your app to the underlying user repository of SCN - it's documented here:

      User Authentication

      All the best - and if you should have further questions, just keep asking!



      Author's profile photo Former Member
      Former Member

      Thanks for the advice. We are currently trying to figure out how this SAML-authorization can work on a mobile device and with our SAP-internal Single-Sign-One. Once we have a solution we will provide it in one of our next blog posts. 

      BR Johannes

      Author's profile photo Matthias Steiner
      Matthias Steiner

      Hm, for same reason I was under the impression that you'd require to be online for a chat application anyway so the regular SAML2 authentication (not authorization!) should be applicable. But maybe I'm missing something here!

      What speaks in favor for SAP-internal SSO instead of using the user repository of SCN?