Written by Altınok Darıcı on 05 - Feb - 2015

Azure Mobile Service With JS Backend

What is mobile service?

 Mobile Service provide a service to build a mobile application(non-calculator mobile app) that interact with server easily, you do not consider data storage layer or push notification or  identity.

 

Azure Mobile Services contains two backend options, first one is JavaScript and the otherone is .Net. I will mention the first one which is JavaScript. 

 

Mobile Service have api for Windows Phone & Store, Android, IOS, html + javascript. You can use any platform you want using rest api.

 

Mobile services contains Data, Api, Scheduler, Push, Identity, Logs and Scale options.

When we creating mobile services, wizard ask to us create a new SQL database or use existing one? if you want to create new SQL database, you can use 20 mb free sql database instance.

 

  • Data, this feature for storing data in to Azure Sql Database without writing any sql commands. So if you do not know anyting about SQL, you can easly use this Data layer.
  • Api, if you want to write any javascript code, you can write as an api, and invoke from client easily. For example, you want to download html and parse it then store to the database. If you do these kinds of stuff in Windows Phone or any client, you waste the data and power of mobile device. Instead of this, you can write a javascript api on Azure Mobile Service and invoke it from client.  So, your code runs on Azure and consume Azure's resource and you get the result only.
  • Scheduler, this feature is to run same jobs in specific time interval. For example you want to run a piece of code in every 1 hour. We talked about in above example, we have a logic to download and parse html, you want to invoke this api in every 1 hour. Using scheduler you achive this, set the scheduled job and invoke api in every 1 hour without writing any code.
  • Push, push notification is very important feature today, beacuse we you lots of application on our mobile device and we do not check these applications always, imagine that whatsapp do not sends notification. In order to see message you have to check it always, as you think, it is impossible. For example you wrote an application to IOS, andriod and Windows Phone, and you want to send a push notification, you can easily send a notification from Azure Mobile Service.
  • Identity, we have an application and user should login to use our app. But user do not want to create a new account for our app, user wants to login to our application using facebook, google, microsoft or even Active Directory account. You can achive this using Mobile Services Identity feature.
  • Logs, for example we wrote javascript codes for api and we set the scheduled job for it. So our codes runs in every 1 hour. You want to log some step to trace your application, you should use Azure Mobile Service Logs to log these kinds of stuff.
  • Scale, Mobile Service consist of 3 pricing tiers, Free, Basic , Standart, you can change your service's tier from Scale tab on management panel, and you can define types of scaling from here. For more information:

http://azure.microsoft.com/en-us/pricing/details/mobile-services/

 

 

 

Creating Mobile Service

 Create Mobile Service

 

 

You can download the sample project after creating mobile service.

 

comments powered by Disqus