Skip to Content

When asked about the benefits of cloud computing one common argument is usually its on-demand character. And indeed, in our time where everybody is busy it’s a huge advantage to be able to access information whenever needed, from anywhere. Or as I keep saying: “Convenience trumps everything else!

Same rationale is true when it comes to upskilling –  the speed of innovation and technology is constantly accelerating and it’s more important than ever to hone your skills to stay up to date (or should I even say to stay relevant?) Given the usual time constraints developers face to learn about new technologies the only viable way is to make it as simple as possible/convenient to do so.

For us at the SAP HANA Cloud Platform team this mindset has became sort of a mantra and it has been the guiding principles for all that we do in regards to developer outreach. Just take the openSAP courses organized by Rui Nogueira , the end-to-end scenarios brought to you by Jens Glander, Bertram Ganz and Thomas Bieser or all the sample code hosted at github.com as prominent examples.

In that tradition, I’m happy to present you a new end-to-end hands-on tutorial that will take you from zero to hero in roughly four hours teaching you how-to combine the most-commonly used platform services to build a full-fledged mobile weather app.

/wp-content/uploads/2015/06/weatherapp_732037.png

Note: While basic knowledge of Java and the Eclipse IDE is helpful, they are no hard requirements to finish this tutorial, which has explicitly been designed for newbies to the platform. In fact, we provide links and references to the respective frameworks, tools and technologies used for those that want to dig deeper on their own afterwards.

As promised by the title we’ll start completely from scratch and then build out the app step-by-step. Here’s a high-level overview of the individual steps:

  1. Is there any other/better way to start than with the classic “Hello World”?
  2. Let’s add authentication so that we know whom we are dealing with.
  3. We’ll learn how-to expose services via REST to provide an external API (e.g. to be consumed by other apps or the UI)
  4. We add a persistence layer to manage bookmarking of favorite cities
  5. We then enhance the persistence layer to be multi-tenant-capable
  6. Next, we show you how-to use the connectivity service to consume an external service (in our case one that provides weather information)
  7. Last, we’ll develop a mobile UI using a master-detail template based on OpenUI5

Curious? Hopefully so! Then head over to github and get your hands dirty following the tutorial.

Have fun coding!

PS: If you should get lost along the way… don’t worry! We have created check-points after each step and you can always download the project in the respective state using the respective Release.

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Abdul Hakim

    Hi Matthias,

    Thanks for the excellent blog. I am more familiar with ABAP/JavaScript based development and not Java. I would like to understand whether it is necessary for HCP developers to know Java as well? Also what Java skills (In addition to Core Java) are required to work on HCP.

    Thanks

    Hakim

    (0) 
    1. Matthias Steiner Post author

      Hi Hakim,

      thanks for reaching out! My answer is a classic: it depends! 🙂

      In general, the philosophy behind HCP is to provide choice to our developer community. At the time of writing we support several runtimes/programming models:

      Going forward we’ll incorporate Cloud Foundry as an additional runtime container (for the lack of a better term), which comes with a feature called “build packs” that allows to bundle application and runtime together. Then developers can “bring your own language” (BYOL)…

      Hope that helps – happy coding!

      Cheers,

      matthias

      (0) 
      1. Abdul Hakim

        Thanks for the clarification. I like “Bring your own language” concept and hope i am allowed to bring ABAP one day 😉

        Thanks

        Hakim

        (0) 
  2. Nitesh Agrawal

    Excellent Matthias.

    I will go through tutorial and post my comments about it later.

    Sometimes when you are working on a particular topic for long you tend to forget the basics.

    I hope this tutorial will be a HCP refresh for me.

    Thanks.

    (0) 
  3. Gareth Ryan

    Quick tip to hopefully help others avoid issues…

    If you are starting completely from scratch (like I just have due to a new laptop) and hence are installing Java before Eclipse, try to install 1.7 as otherwise you may hit issues with the Maven build around page 11 if you use the latest 1.8jdk.

    There is probably a more complex work-around but I found it quick and easy to just point my Eclipse at a 1.7jdk.

    Cheers,

    G.

    (edited to change JRE -> JDK – oops!)

    (0) 
    1. Matthias Steiner Post author

      Hi Gareth,

      thanks for the hint… I have to admit I’m still on 1.7 myself, so I did not test it with 1.8.

      Please note though that as a Java developer you always want to install a JDK (Java Development Kit) instead of a JRE (Java Runtime Environment).

      Cheers,

      matthias

      (0) 
  4. Timo Renner

    Hi Matthias,

    cool tutorial, helped me to get around some issues. 🙂

    for all that can’t find the tutorial document anymore: it’s available at

    cloud-weatherapp/cloud-weatherapp-script.pdf at master · SAP/cloud-weatherapp · GitHub

    One feedback on the used JAXB parser:

    good for simple applications or XML-based communication, but hard with JSON (which should be the preferred format when exposing services to SAP UI5) when it comes to (bidirectional) JPA relationships.

    After some hours of struggeling, I was able to manage it with the Jackson implementation of fasterxml.

    Cheers Timo

    (0) 

Leave a Reply