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.
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.
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.