Skip to main content

Mobile Services from Windows Azure - Introduction

What do you think about Windows 8 and Windows Store? It has a great potential and is a place where people with good ideas can develop application.
Usually when you develop an application you also need a backend. A place where authenticate users, to store data and so on. Windows Azure comes with a solution that can freaks out any kind of backend developer – Mobile Services
Why is so great? A lot of backend stuff that you need in a normal mobile application is built in. Let me give you some example:
  • Authentication infrastructure for Windows Live, FB, Twitter, Google and more coming soon
  • Push notification
  • Store data on the server
  • Custom scripts on working with server data
And this is not all. Imagine that you develop an application for iOS. Could you integrate Mobile Services from Windows Azure? YES, you can. In this moment, after you setup your mobile service you can download a sample application for Windows 8 App, Windows Phone or iOS that contains all the settings for your account and a demo application.
In this way starting using Mobile Services and integrate it in your application is an extremely simple job.  In this moment Mobile Service in the preview state. During this period you can use up to 10 mobile services and have maximum 165MB out band traffic per day for free. More about pricing of Mobile Services can be found in the following link: https://www.windowsazure.com/en-us/pricing/details/
What I really liked at this service is how rapidly you can integrate it in your application. In less than 5 minutes you can create a service and connect your mobile application to it.
Let’s see what you need to do for creating a mobile service. If you don’t have a Windows Azure account yet, you should create a new account. After this go to New->Mobile Service->Create. Because this service in in the Preview, you will have to go to https://account.windowsazure.com/PreviewFeatures?wa=wsignin1.0 and hit the “Try it now” on Mobile Services section.
You will need to give a unique name to your service. Also, a SQL Azure Database needs to be created. If you already have a database created, you can it without any kind of problems. If you have a trial account on Windows Azure it is okay. The trial account also contains a 1GB SQL database.
The last think that I want to tell you is related to how your services are exposed. Of course you have component for WP8, Windows 8 App and iOS that can make all the calls for you, but you should know a little about how the magic happens. Like the rest of services exposed by Windows Azure, REST API is the secret. All the services are exposed using REST API. In this way services are not limited to specific consumers. You can develop application in any languages – and trust me, the REST API is very well documented.
In this blog post we saw what are Mobile Services, what we can do with them. In the next post we will take each feature and present it from a developer perspective (what we need to take an account and how to integrate it).
Part 2

Comments

Popular posts from this blog

How to check in AngularJS if a service was register or not

There are cases when you need to check in a service or a controller was register in AngularJS.
For example a valid use case is when you have the same implementation running on multiple application. In this case, you may want to intercept the HTTP provider and add a custom step there. This step don’t needs to run on all the application, only in the one where the service exist and register.
A solution for this case would be to have a flag in the configuration that specify this. In the core you would have an IF that would check the value of this flag.
Another solution is to check if a specific service was register in AngularJS or not. If the service was register that you would execute your own logic.
To check if a service was register or not in AngularJS container you need to call the ‘has’ method of ‘inhector’. It will return TRUE if the service was register.
if ($injector.has('httpInterceptorService')) { $httpProvider.interceptors.push('httpInterceptorService&#…

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Entity Framework (EF) TransactionScope vs Database.BeginTransaction

In today blog post we will talk a little about a new feature that is available on EF6+ related to Transactions.
Until now, when we had to use transaction we used ‘TransactionScope’. It works great and I would say that is something that is now in our blood.
using (var scope = new TransactionScope(TransactionScopeOption.Required)) { using (SqlConnection conn = new SqlConnection("...")) { conn.Open(); SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = conn; sqlCommand.CommandText = ... sqlCommand.ExecuteNonQuery(); ... } scope.Complete(); } Starting with EF6.0 we have a new way to work with transactions. The new approach is based on Database.BeginTransaction(), Database.Rollback(), Database.Commit(). Yes, no more TransactionScope.
In the followi…