Azure Mobile Services versus Custom API - asp.net-mvc

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.

Related

Use generated java sdk for web portal?

I am creating a web portal that controls the devices (like switching it on/off), visualize the data sent by those devices(endpoints). I have generated a java sdk. Do i use that sdk in my web portal or is it just for a device that sends telemetry data?
It is desirable to use generated sdk only for device that sends telemetry data.
There is no point in attaching sdk to your web application, as far as this part of the system doesn't treated as endpoint. It is bad practice to include endpoint sdk into the places, where lion's share of functionality would be ignored.

Sharing OneDrive Access/Refresh Token between multiple apps

I have went through the OneDrive API documentation but couldn't find anything on what I needed. Basically, we have developed two apps, one webapp and one mobile app for our product. We want to share the tokens between the two apps (if the user has already authorized for one app, he shouldn't need to re-authorize the second app).
The API settings page in Microsoft Account Developer Center states that
Mobile client applications use a different OAuth 2.0 authentication flow.
What is the recommended way to achieve this in OneDrive? Can the two apps use the same client id/secret and share the tokens? Or can they use different id/secrets and OneDrive provides a way to sync these tokens?
You can not do this since the registration for web apps are different from the mobile app. You can do this if both are web or mobile apps.
When registering an app in Azure AD, the first option is to specify is your app web or mobile app, and then the flow and settings will be different based on the selected app type.
Hope this helps.

Developing Mobile Native iOS applications to intergrate with SAP middleware

I am currently involved in defining strategy for a large future project, where it is proposed to developed native mobile phone applications that would integrate with SAP middleware.
I would like to understand how one would develop a native iOS mobile app that would communicate with SAP NetWeaver, using Odata?
Regards.
You can create server side OData service and communicate with it from mobile app by http/https protocol.
OData supports both JSON and XML formats.
If your application is rather simple - common BSP application can be used. It works faster but a little bit harder to develop complex application.
Odata is an open standard, there are libraries that you could use in your ios project hence you could consume the Odata service in your app. It is just another HTTP/HTTPS request-response.
SAP gateway expose Odata service
Consume that in the app using open source libraries available.
Another option:
Use SAP mobile platform 3 (a product from SAP to mobilise enterprise) to develop native and hybrid apps. It supports all major mobile platforms like iOS, windows and android.
It has an SDK which provides all enterprise level features to your app - offline support, SSO, different authentication mechanisms like LDAP and 509 certificate etc.
SAP also provides cloud based solution as well it is called Hana cloud platform mobile services.

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

How to oauth-login a server app via the mobile client (especially iOS, Twitter, but in general too)

We have a web application that supports Facebook and Twitter login/signup via oAuth (and can also post to FB/TW). Now we are building a mobile client and naturally we want people to be able to login-signup via FB-Twitter on mobile as well, on iOS even using system-integrated accounts.
Now mobile app and our server app are two different apps, however, and if I get oAuth correctly, we'll need to have two authentications: one for a mobile client (system account can be used), another one for a server (we'll have to show WebView for it).
Yet some existing apps seem to be fine with single authentication only (e.g. Flickr and Foursquare! At least 4sq seems to be fine with iOS system FB account only. How is it possible?
Do they share consumer key/secret between mobile and web app making it essentially the same app?
Do they use some FB-specific extension to oAuth
Do they only use auth token wherever it comes from making it a user ID?
Something completely different?
Old question, but this may help someone who finds their way here.
Twitter Reverse Auth

Resources