blog-banner

Cross-Platform Serverless App using NativeScript and AWS services

  • Aws
  • AWS API GATEWAY
  • AWS LAMBDA
  • Aws S3
  • MOBILE APP

I wanted to demonstrate how easy to build a native-looking cross-platform app using AWS services without actually having your server. I ended up using NativeScript to build the app. This is an internal quiz app to train our team members. Find more details below.

NativeScript

A cross-platform is an app development platform that provides native UI support. Cordova kind of platform relies on webview which does not give the native app feel. NativeScript uses a Javascript engine to render native UI elements. It supports XML, TypeScript or XML, Javascript. I used XML and Javascript to build the demo app.

AWS

AWS offers a plethora of web services that have changed the way IT infrastructures are handled. I have used S3, API Gateway, and Lambda for this task.

Since this is a simple use case, I used S3 as the storage medium for the quizzes. Each quiz is stored as an individual CSV file. Login, quiz loading, and scoring are all carried out by Lambda functions passed through the API gateway.

Find the screenshots of what the app looks like, on Android and iPhone.

The flow is App makes requests to AWS API Gateway which in turn triggers Lambda that validates user data and loads data from the S3 bucket.

NativeScript offers an easy way to build UI using XML and you can control logic using JS code. Native does offer a nice set of features not limited to,

App settings storage

Native API calls

Read more at https://docs.nativescript.org/, hope you enjoyed it.