0

I'm developing with Azure Mobile Services (using SQL Azure) to provide a backend for both IOS and Android mobile apps and a PHP website.

My question is now that now custom apis have been introduced is it considered best practice to wrap everything up in custom api calls rather than e.g. using the CRUD table operation scripts directly from apps or websites?

Additionally for data access from a website should you lock down access to stored procedures and only exec via custom apis, to enforce a consistent approach no matter who the consumer is?

While I appreciate that custom apis and the table scripts are restful it still isn't clear how to architect a solution in the most efficient, reliable way that can enforce business rules in only place allowing each process only one entry point e.g. you have a stored procedure exec'd by an api called from the mobile apps. If the website calls that stored procedure directly without going via the api it could have unwanted side effects because other logic steps will have been missed.

I'm relatively new to Azure so forgive me if I have just missed something fundamental here. I've read many blogs and tutorials but they rapidly go out of date.

Many thanks

1 Answers1

0

In my opinion the great feature of azure mobile services is the push notifications (to ios, android, wp). If you are not going to use that, there's no great advantage to use WAMS (Windows Azure Mobile Services).

But it's a good choice using Windows Azure as backend since it's easy to scale up /down. In this case, you could create a Webapi and host in a Web Role. As it works with http, you can easily create Restful services and call them from your apps (ios / android).

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • Hi - I am going to use features such as push notifications in the apps. Basically businesses will add data primarily via the website and users will consume that data primarily via mobile devices. So there will be a crossover in what they need to access. Are you saying you would avoid custom apis on mobile services and instead use webapi? Would you perform basic CRUD ops in the APIs via table scripts or by calling stored procedures? It seems there are so many options! – user2907970 Oct 23 '13 at 12:13
  • Webapis are very easy to consume and you have OData leverage. I would go with that and no stored procedures. – Thiago Custodio Oct 23 '13 at 12:21