10

I'm just getting started with Mobile Apps. I'm used to making APIs with ApiController of Web API.

The default project template for Mobile Apps in VS2015 comes with a sample TodoItemController that inherits from TableController. It looks like there are some CRUD operations installed out-of-the-box in TableController and each data object must be of type ITableData.

Ideally, I'd like to skip TableController and implement things my own way with ApiController.

My question is, what are the ramifications of ditching TableController if any? Is there any tight-coupling between App Service and the use of TableController?

Mark13426
  • 2,569
  • 6
  • 41
  • 75

1 Answers1

7

The TableController is coupled with the client SDK's table logic, and provides all the right logic & columns for the interactions needed for querying, offline sync, etc.

You can use API Controllers just fine, it mainly will depend on what features you want to use.

phillipv
  • 1,717
  • 9
  • 9
  • Can those features be implemented with ApiController? – Mark13426 Oct 09 '15 at 16:07
  • 5
    No, if you want offline sync and client-side querying capabilities, you need to use a TableController. All other features will work fine with ApiController. Make sure you use the attribute MobileAppController, see https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-how-to-use-server-sdk/#how-to-define-a-custom-api-controller – lindydonna Oct 13 '15 at 00:18
  • @lindydonna-msft what is the advantage of using MobileAppController if I only want to return json object? – Emil Dec 18 '16 at 00:58
  • @batmaci MobileAppController will set up JSON serializers in a way that is compatible with the Mobile Apps client SDKs. – lindydonna Dec 19 '16 at 19:47
  • Don't use it, it is a bad idea. The TableController is not worth the effort and you will eventually dump it. To add to this MS philosophy when they can't fix something, they create something new and expect you to follow. – Nick Turner Nov 03 '20 at 16:28
  • Managing your own api sync is very easy using shiny – Nick Turner Nov 03 '20 at 16:30