René van Mil

Heart Rate Variability and Brain Waves

Update 28 sept. 2017 · With the release of iOS 11 and WatchOS 4 it looks like you can grab the HRV directly from HealthKit. Thanks Apple! 👍

Recently I’ve attended a hackathon and my team had the chance to work with an Apple Watch, a Polar H10 heart rate sensor, and a Muse brain sensing headband. Our goal was to measure Heart Rate Variability and alpha wave values, which both may (or may not, medical science is very complex) be related to the amount of stress a person is experiencing.

How to Automatically Download All Apple Music Songs

I figured this out by accident and I couldn’t find any other articles describing this method, so here’s a quick blog post describing what I did to have my iPhone automatically make all Apple Music songs I add to my library available offline.

A Telegram Weather Bot With Node.js and Express

Telegram is an amazing messaging service which I’ve been using for more than a year now (I switched when WhatsApp sold its soul). Recently the service introduced a major new feature for third-party developers: the Telegram Bot Platform.

In this post I’ll show you how I built my first Telegram bot: @WeatherDemoBot. It’s a simple bot which responds to you with a message if you ask it about the weather in a location you specify.

Publishing an External API With Meteor

Recently I’ve been playing Minecraft together with a couple of colleagues and we decided to build a system which, among other things, provides us with statistics of our world.
My task is to build the web interface, so I decided to make this my first project using the Meteor platform, since it has been on my list of stuff I want to learn for a while now.

The statistics data I need to render does not come from a local database but from an external API, so I had to figure out how to publish a Meteor record set with the external API as its source. This blog post describes how I got this to work, using a simple demo application and the iTunes API as the external API.

Building a RESTful API With an SAP CE Backend

The SAP NetWeaver Composition Environment (SAP CE) is a Java EE 5 application server. Among a lot of other things, the environment provides several frameworks which allow you to develop webapplications with Java. Most commonly SAP CE servers are used to host Web Dynpro Java applications (from within an SAP Portal) which connect to an SAP ECC backend and local database using the CAF framework.

SAP launched this product around 2007 during the SOA hype, which means currently a lot of customers are still using the SAP CE application server for their custom webapplications built on top of their SAP (and other) systems. Unfortunately the frameworks provided by SAP CE heavily rely on SOAP, WSDL, UDDI, XML, etc. which currently is widely regarded as a failure and deprecated technology stack.

Because of this (and recent personal experience) I decided to write this post, explaining how you can use SAP CE to build a RESTful API, so you can use the server as a backend for modern webapplications (obviously not built with Web Dynpro ;)), or mobile apps.

SAP Gateway on iOS With AFNetworking

SAP Gateway is an ABAP framework part of SAP NetWeaver which allows you to create RESTful OData webservices on the SAP system. Data can be transmitted in either JSON or XML format. It’s a great solution to integrate SAP as a backend system into mobile or web applications (as opposed to the complexity and rigidity of PI and SOAP services).

To demonstrate how to use SAP Gateway to integrate SAP into an iOS 7 app, I have created a simple webservice for the well-known SFLIGHT demo data (make sure to run the SAPBC_DATA_GENERATOR program to generate some demo data first) in SAP, and an iOS 7 app which displays the data. Push and SAP ABAP

Parse Push is a service which allows you to send push notifications to iOS, Android and Windows devices. An easy to use REST API is provided, which allows you to send push notifications from an SAP system to devices running your app. The REST API is especially useful when compared to the Apple Push Notification Service. APNS uses a streaming TCP socket which is not supported by SAP ABAP.

In this blog post I will describe how to configure SAP to use the Parse Push service, and will provide an example ABAP program which will send a push notification.

Building a Backbone.js Web Application With an SAP ABAP Backend

In this blog post I will describe how to build a Backbone.js web application, which connects to an SAP ABAP backend API over a RESTful JSON interface.


Stateless API

The RESTful API provided by the SAP system must not store any state on the SAP server itself. This means there won’t be a session, and each request to one of the web services must include proper credentials.

Allow the user to login/logout

Even though the API is stateless, the user must be able to login to the web application by providing a username and password. And even though there won’t be a session, the user must also be able to logout from the web application.
Also, the web application should allow the user to remember the entered username on the login form, and the user should be logged out automatically after a certain period of inactivity.

Host the web application on any web server

The web application must be a JavaScript application which runs inside the client’s browser and communicates directly with the API provided by SAP. There must not be any server-side scripting (PHP, ASP, etc.), and no middleware must be required.