Mobile Azure service for iOS and Android - ios

I am working on the project where my backend will be in Azure and it will be native iOS and Android application :
https://learn.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-ios-how-to-use-client-library
My question is :-
Does Azure provide the service where we don't have to create any webservices to transfer the data between mobile and database on server?
We can handle everything from mobile side ?

NO - and you don't want that. It opens up a massive security hole.
You have to create the App Service and then use Easy Tables. Once the table is created, you can use the model in the client code and just push changes to the service. It will automatically and dynamically change the model on the backend.

Related

How to share data between Azure Mobile App and ASP.Net MVC Web App

How can I share data between an instance of an MVC Web App and an Mobile App client say Android.
From the App Service documentation it is stated that we can use "(For .NET) Leverage any feature of ASP.NET, including MVC"
Following the standard Azure Todo List tutorial, if I create an Azure App Service, add and publish an Android Client with the Todo List object. If I want to add another object say Student.cs that should be shared between an MVC Web app and the Android client.
Do I need to extend Student.cs from EntityData and scaffold an MVC
controller using the default TodoContext. If this is the option
should I use migration to update the App Service DB? Just publishing
this back to App Service did not work for me.
Do I need to create a new MVC app, and scaffold CRUD operations
directly against the Azure SQL database used by the App Service? If
this option how can the App service be notified of data changes?
Do I need to publish the MVC web as a Web API and bye pass the
Mobile App client SDK and instead call the API app directly from my
mobile client?
The goal is to do data entry in the web app and pull and display the data in the mobile app.
You can combine the Azure Mobile App and Azure Web App into one single entity. Your application has access to the OData v3 endpoints as https://{yoursite}.azurewebsites.net/table/{your-table} and your application can do regular AJAX REST calls from the client. In addition, Entity Framework is fully set up so you can access the tables directly using Entity Framework.
So, set up your entities with a base class on EntityData, then use those with Entity Framework as normal. Scaffold your mobile web API using the Azure Mobile Apps SDK TableController.

Azure Mobile Services versus Custom API

We currently have a MVC5 web application that has recently gone live. Much of the business logic is contained within GET and POST controller methods in C# files. A native iOS app is planned for the project and the concern was expressed that we must ensure that the business logic is the same for the web app and the mobile app. I'm asking for anyone with experienced with Azure Mobile Services to elaborate on how we can easily ensure consistency between the web app and the mobile in terms of backend business logic. I see two options as of right now: 1. Create an API project and ensure both the web app and the mobile app call the same endpoints 2. Integrate Azure Mobile Services and ensure that the business logic matches the web app at all times. I'm just looking for guidance.
Thanks
If you are starting work now, I would start work with Azure Mobile Apps rather than Azure Mobile Services. Azure Mobile Apps can provide a web app and a mobile-friendly API for you.
Azure Mobile Apps provides three distinct things on top of Azure Web Apps. The first is a mobile-friendly data-sync capability. This is a RESTful interface that provides access to data from a backend resource. You can use it directly as a REST endpoint - great for your websites, but it is also an OData source. There are clients available for iOS (Objective-C/Swift), Xamarin (C#/.NET) and more coming that use this to provide a sync capability. The addition of a SQLite store provides an offline sync capability that your mobile app can utilize for performance and network efficiency.
The second is authentication that works with the mobile data-sync capability. This can be used across your web and mobile apps and links into enterprise authentication systems (via Azure AD), Facebook, Twitter, Google+ and Microsoft Account. One of the more interesting things you can do is provide personalized results - a user can only access their own records via data-sync. Mobile authentication is different and the SDKs provided in addition will provide that functionality for you.
Finally, there is a pass-through for Notification Hubs - a powerful push notifications system that provides access to APNS (for iOS devices), GCM (for Android devices) and WNS (for Windows-based devices) as well as push capabilities to Chrome and Safari web apps, Baidu and Kindle.
Nothing stops you from doing all this from a standard MVC5 ApiController, but the wrapping of the client-side SDK plus the additional functionality of the table controller reduces the complexity of the code you have to write.

iOS Push Notifications ASP.NET talking to Azure Mobile Services

I have completed the tutorial in
http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-ios-get-started-push/
and able to receive push notification on my iPhone. The question is, if my website is ASP.NET, how can I get my website to talk to mobile services? Or it is not possible at all ?
Yes, you can definitely communicate ASP.Net website with mobile service. Download Nuget Package for Microsoft.WindowsAzure.Mobile.Service and add reference - http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.mobile.service.aspx.
Instantiate MobileService instance using App Key and secret. And start consuming the DBs as service. There are lot of tutorials for this - http://blogs.msdn.com/b/mim/archive/2014/02/28/windows-azure-mobiles-services-c-backend-en-version.aspx.
Best way to get used to , is download simple TODO app for .net Backed Mobile service and see how that works.

What is the most efficient way to create end-points for an Amazon SNS service?

I am using Amazon SNS Service for an iOS application that needs push notifications.
I have figured most of the things, except for the part where I have to register my device tokens.
This is where Amazon talks about it. It can be done manually or with the help of createPlatformEndpoint API which they obviously recommend for bulk uploads. My question is how we can directly register tokens from devices that will install the app later on. The documentation talks about a proxy server which I would want to avoid as of now. Isn't there a direct way of doing this, like where I can directly call a method and push the device token received in the application to my SNS Platform?
This, is a possible duplicate except that it is in reference to Android.
The AWS Mobile SDKs support accessing SNS directly from the mobile device. If you're interested in seeing code demonstrating this on iOS, we included some as a sample we prepared for re:Invent 2013 called Mobile Photo Share.
The important thing to note when accessing SNS directly from the mobile device is that you'll want to restrict the credentials delivered to the device to only those services and resources you'll need to access. You can accomplish this via web identity federation or a token vending machine with appropriately restricted policy.
If you want to learn more about the Mobile Photo Share app, we had two talks at re:Invent about the app and its architecture. The video and slides for those talks are available here:
Building Cloud-Backed Mobile Apps
Integrating Social Login Into Mobile Apps

iOS Cloud Storage API for Visual Studio 2010

I have created a WPF application using Visual Studio 2010 that receives data and sends the same to a Windows Azure Server (where the data is stored in tables). I am able to send and receive data on my Windows Phone 7 using the same using a service function I created.
However, I now need to send data from this application and receive it on an iOS device (in an iOS app). Are there any APIs for Visual Studio that let you send data to an iOS cloud storage space.
If not, are there any APIs that enable an iPhone app to receive/pull data from an Azure Server.
Windows Azure Mobile Services includes an iOS SDK (along with Android, Windows Phone, Windows 8, and JavaScript) for storing data (as well as authentication and push notifications on those platforms). That presumes though that you're leveraging the storage that's part of Windows Azure Mobile Services, and it sounds like you've already got an alternative storage solution in Azure - though it wasn't clear if you were using SQL Database or table storage.
By leveraging WCF Data Services or the Web API you could expose your existing Azure data via OData which is an open protocol (REST-ful) for which there are many client libraries including iOS. Since you already have an existing storage solution, this service wrapper approach may be easier and quicker than migrating to Azure Mobile Services.

Resources