What is the difference between Azure App Services API Apps and the Custom API of App Services Mobile Apps? - azure-mobile-services

Azure App Services Mobile Apps can provide a Custom API hosting service which looks very similar to API Apps.
What is the real difference between the two?
Is it possible to consume Mobile Services from API Apps Node Backend ? Is there any Mobile Apps SDK available for NodeJS ?
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-node-backend-how-to-use-server-sdk/

Azure API Apps is for hosting APIs that will be consumed from a variety of clients, and where it is acceptable to codegen a client, or make direct REST calls.
Azure Mobile Apps defines a client and server SDK with a protocol for communication that adds additional functionality for things such as offline sync. Offline sync is not possible with API apps, because there is no actual client SDK, just tools for generating one for different platforms.

Related

How to authenticate IOT devices to Google Cloud Services

I have a Raspberry Pi3 device which has Android Things dev preview 0.6.1 installed. On completing certain operations, the device needs to send data to Google Cloud Storage. To do so it must have an API key to authenticate itself.
In Android devices it could be done easily using by integrating Google Sign in Option but since my Android Thing device doesn't have any interface, Google Sign In could not be implemented in it.
I have gone through github project Android Things Weather Station Sample which is using Google Service Account to publish data to PubSub. To do so, it generates and imports a credential.json file into the project and somehow generates credentials from it.
So my question stands is, without user consent, can we use Google Service Accounts to authenticate with Google Cloud Storage? If yes, how can we generate access token from it ? If no, is there any other method to authenticate with GCS?
The simplest and most secure way to authenticate your IoT devices with Google Cloud is using Cloud IoT Core to publish data over MQTT or HTTP into Cloud Pub/Sub. Cloud IoT Core is a bridge designed to securely manage large fleets of devices and authenticate them with your cloud project.
Take a look at the SensorHub sample app on GitHub, which is similar to the weather station, but uses Cloud IoT Core to authenticate and publish instead.
As Shubham stated, using a service account is one way to authenticate devices. Otherwise you'd need to build a mobile companion app which you use to authenticate the user. Then you would have to transfer that token to the IoT device.
In case anyone faces the same issue, I found this document which has explained the way to authenticate devices with Google Cloud without the consent of a user.

Self-hosted Azure Mobile Services

Is it possible to host an Azure Mobile Service? (Published on my own server)
I only want to use the Mobile SDKs to sync tables on mobile applications, I don't need push notifications.
I also want to have a Web API controlling this data in the same project, is it possible without having NuGet Packages problems?
Other question, do I need the Azure Mobile Backend to make it work with the Mobile SDKs (iOS, Android, etc)?
If those solutions don't work, I'll be hosting this on Azure and probably managing the data with another Web API self-hosted.
You may want to consider Azure Mobile Apps which allows full control of your deployed site.
The Mobile Services backend, or Mobile Apps server SDK is required for the Azure Mobile client libraries to work.

Standalone ServiceStack service for Web & Native Mobile App

Our architecture consists of several backend (non-ServiceStack) services and applications that send data to our system via ServiceStack service hosted in asp.net - this is currently a standalone ServiceProject project containing our required Services/Repository/DTOs following the structure of all the provided ServiceStack samples.
With our backend complete we're now designing our two front-end requirements consisting of a web application and native mobile application. For the web application I'd really like to continue leveraging ServiceStack by using the Razor plugin to create the application's layout/views from our existing DTOs, for our mobile app we will only rely on the ServiceStack service for authentication and data - as it is native it's layout/views will come from it's own SDK.
Can I leave my standalone ServiceStack service as is and:
Create a separate web application project that authenticates
against our existing standalone ServiceStack service and uses the
Razor view plugin?
Have our native mobile app clients
authenticate against the same standalone ServiceStack service?
Most of the examples ie. RazorRockstars I've seen have the services embedded in the web project so I'm not sure if this distributed type of setup is supported. Any guidance or feedback on this is greatly appreciated!
It is very much possible. You can consume the web service from both, web and native mobile application. I worked in a ASP.NET MVC web application which used to make call to Web API service hosted at different server. The Web API service was shared among multiple applications. We were consuming it by making AJAX calls from client.
Something similar to your scenario is done at below link but they are using cloud to host service:
http://www.codeproject.com/Articles/529109/Mobile-2fWebplusClient-2cplusWebplusAPIplusandplus
If you have opportunity to make a web app for mobile instead of native app, then in a single solution both mobile and desktop app can be created. The exemplary solution can be found here: http://nopcommerce.codeplex.com/
Thanks and free free to discuss more in case of further questions.

Developing backend Webservice and Database for iPhone App for Standalone person

I want to develop my iPhone app but I am not sure what could be the options I have for hosting database and webservice to communicate with my iPhone App. Could someone please suggest me what could be the best way to go for this?
I know how to build everything but never come across this situation. I have been working in environment where we ask Admin to give us Server where we host everything but if I want to do it myself and don't have server infrastructure what could be the options do I have? Do I need to purchase from web hosting provider?
Thanks.
From my experience, I've developed back-end part for iPad client. It was REST, ASP.NET Web API (WCF Web API) and as database on back-end MS SQL Server and MySQL.
Anyway for mobile clients you can freely use REST. It can be ASP.NET Web API from .NET or other libraries that help to make REST services for example from Java.
REST is good consumed by mobile client applications. And then from client application perspective, it's no matter what database back-end will have.
Speaking about hosting it also depends from requirements to back-end. When you have no server infrastructure, you can use cloud PaaS like Amazon AWS (EC2) for example. Or host server it by yourslef.

Common web service for asp.net, iPhone and Android

What are the necessary points that we should keep in mind while developing web service .NET that can be accessed by ASP.NET and mobile phones like iPhone and Android?
Web services by design are platform agnostic, which means that you should be able to access them from any application. However depending upon the relevant framework options available different implementations might be easier to access that others (XML/SOAP via .NET as an example).
Building a REST service serving up JSON could be your best option for an easy adoption on multiple platforms.
REST vs SOAP
Web Services
1.It Can be accessed only over HTTP
2.It works in stateless environment
WCF
WCF is flexible because its services can be hosted in different types of applications. The following lists several common scenarios for hosting WCF services:
IIS
WAS
Self-hosting
Managed Windows Service
For mobile application check http://www.c-sharpcorner.com/UploadFile/sry_143/4010/
For ASP.Net application check http://geekswithblogs.net/nestor/articles/108042.aspx
Happy coding!!