upgrading a custom db to azure app services - azure-mobile-services

I have an exixsting windows 8 app connected to an azure customdb, shared with a web app, using azure mobile services.
I would like to write a new version of the app for windows 10 using azure app services, but I don't find documentation about the changes using a custom existing db.
Where can I find it?

The changes to the database between Azure Mobile Services and Azure App Service are identical. If you want a tutorial on how to use an existing table and project it into mobile apps, I wrote one here: https://shellmonger.com/2016/05/11/30-days-of-zumo-v2-azure-mobile-apps-day-19-asp-net-table-controllers/ - it's part of a sequence of posts, so you may have to go back a couple of posts to get to the start of the ASP.NET ones.

Related

How to connect Swift to a postgresql database hosted on Google Cloud

I'm new to working with back-end, but have been running into issues trying to get my iOS app to connect to my PostgreSQL DB.
I have developed an app with Swift which is a game that I want to run locally on iOS devices. I have a PostgreSQL DB set up in Google Cloud Platform but I cannot figure out how to get the Swift app to connect to my PostgreSQL DB.
I've read some about using Vapor or Perfect to run the application using Googles App Engine but I'm not sure that is what I want to do since I want the app to run locally but there are a few aspects of my app that I need a global database for.
Would anyone be able to point me in the right direction of how I need to connect my Swift application with Google Cloud's PostgreSQL?
Your question is pretty much very similar to this one.
In short, the correct answer is you shouldn't connect your client side application directly to the database. Instead, you should build a service that can connect to the database, and act as a service between your application. This helps prevent any unauthorized queries to your database and provides better performance. If you wanted to do this on GCP, you could look into something like Google Cloud Functions or Google Cloud App Engine to act as a service.
An alternative would be to use a "Database-as-a-Service" like Cloud Firestore. This is a scalable, pay-as-you-go service with great mobile support.
Yeah sure you need a server, ruby on rails to connect to your Postgres database.
The server will facilitate data back and forth from the Google cloud Postgressql

Backup configuration page not loading

I upgraded my app service to Standard a few days ago. However, when I go to the backup configuration page, it never finishes loading. I just get the dots across the top of the screen forever.
According to your description, I have checked this issue. Per my test, I found I could not configure my backups for my mobile app on Azure Portal as follows:
While for web app, I could configure the backups via Azure Portal as follows:
Then I Use REST to back up and restore App Service apps and Use PowerShell to back up and restore App Service apps to check this issue. After configure the backup for my mobile app, I could see the Configure button on Azure Portal, but when I try to change the backup configuration, I encountered the same issue as you mentioned.
Per my understanding, you could leverage the powershell command Edit-AzureRmWebAppBackupConfiguration for a simple way to edit your Backup Configuration, you could refer to here for more details.

How to change database schema in an Azure Mobile App .NET backend?

I've found documentation on how to change a database schema for an Azure Mobile Service .NET backend, but I haven't found similar documentation for Azure Mobile Apps. For those who haven't been paying close attention, Azure Mobile Services was Microsoft's original backend-as-a-service, and it has now been replaced by Azure Mobile Apps.
The documentation I reference above mentions using ClearDatabaseSchemaIfModelChanges and ClearDatabaseSchemaAlways. Neither appears to be available in an Azure Mobile App.
How can I start with the quickstart ToDo app and modify the .NET backend to include an additional database column?
Behind the scenes, the Azure Mobile Apps SDK uses Entity Framework. You need to adjust your DTO / Model and then add a database migration.

Self-hosted Azure Mobile Services

Is it possible to host an Azure Mobile Service? (Published on my own server)
I only want to use the Mobile SDKs to sync tables on mobile applications, I don't need push notifications.
I also want to have a Web API controlling this data in the same project, is it possible without having NuGet Packages problems?
Other question, do I need the Azure Mobile Backend to make it work with the Mobile SDKs (iOS, Android, etc)?
If those solutions don't work, I'll be hosting this on Azure and probably managing the data with another Web API self-hosted.
You may want to consider Azure Mobile Apps which allows full control of your deployed site.
The Mobile Services backend, or Mobile Apps server SDK is required for the Azure Mobile client libraries to work.

Developing with Azure Mobile Services?

What is currently the "best" way to develop a back-end system in Azure Mobile Services?
Specifically, what tools are available? From what I've seen, most examples just go to the Management portal and manually add a few lines into the script window. This is worse than using just Notepad, and doesn't have any concept of version control...
Is there any way to make a project in VS 2012 that contains all the Node.js code that will run in the Azure Mobile service? Is there a way of fully running that code on a local development environment that mimics the Mobile Services?
I need to have server-side code with much more complexity than is shown in most of the Mobile Services samples or documentation that I've been able to find.
I have a web site, and a Win 8 Store App that need to authenticate against, and access relatively complex data structures from a back-end database. The solution being pushed right now all seem to include Mobile Services at the center of it, using simple REST against raw tables, but all the examples are too simple to be useful.
Can someone point me to a "real-life" sample of using Mobile Services, and a "mature" way of developing and testing such a system using the tools in Visual Studio?
Thanks.
Why you have no other option than the Management portal is really beyond me. It seems very awkward for a C#/.NET developer to go back to Notepad style programming with console.log() debugging.
What I would love to see is some Node.js entry points that you could connect to a regular C# assembly which could fulfill the request (as in ASP.NET MVC or Web API) having the full .NET Framework at your disposal.
What I could see as a possible architecture is to have:
ASP.NET MVC hosted on Azure
--- writes processed data with logic to --->
Azure SQL DB <--- reads from --- Azure Mobile Services ---- bridge to ---> Mobile devices
Or
Cloud Worker Role on Azure ---- crunching/processing ----> Azure SQL DB <---- reading/writing raw data ---- Azure Mobile Services ---- bridge to ---> Mobile devices
You can use the Mobile Services facility for mobile devices facilities, scheduling and push notifications with limited code and do most of the coding in a managed .NET environment.
The AMS (Azure Mobile Services) along with Azure has advanced dramatically since this post was written and the replied answers.
Some of this stuff still holds true. If you have a ton of node.js written not in the Azure cloud portal, you will want to copy and paste to the portal online, custom api calls section and even perhaps sql backend tables for CRUD operations.
The hope for C# developers is that it is NOW in preview mode in which YOU CAN skip node.js and build everything without node.js very shortly... Some bugs to work out, but in 6 months this will be fairly solid.
I had questions and issue and a guy named Carlos carlosfigueira was very helpful.
Azure Mobile Services - Getting more user information
Josh covers unit testing server-scripts here: http://www.thejoyofcode.com/Unit_testing_Mobile_Services_scripts_Day_7_.aspx
In this tutorial, he uses the Mocha testing framework for JS (id TDD mode) and walks through an example for testing an INSERT script that encrypts the value of a particular property (text) and a read script that decrypts it (value is encrypted at rest in SQL db).
You can also find aggregation of links and tutorials here.
I would suggest that you build this solution using Windows Azure Mobile solutions especially it supports the Node JS NPM right now, which means you can create the API you want on the Windows Azure using the Node JS NPM and can work with it using WAMS easily. have a look on the following link it will help you understand what I want to say more.
http://weblogs.asp.net/scottgu/archive/2013/06/14/windows-azure-major-updates-for-mobile-backend-development.aspx
For the Client I also suggest that you build it using SignalR which is designed for cases such yours where real time applications require a lot of transactions from the server side.
http://www.asp.net/signalr
you can also find more details about how you can integrate both of them in the following link: http://hhaggan.wordpress.com/2013/07/12/signalr-node-js/
I hope these help you, let me know if you need anything else.
For running locally, the mobile service has the same Kudu environment available in azure websites, so you can browse to https://your_service_name.scm.azure-mobile.net If you navigate to the Debug Console from the top nav, you can download everything running in the site/wwwroot folder.
You can run this nodejs project locally (On windows only if you require the SQL Server npm package). Your code is in App_Data/config/scripts. If you replace the downloaded content with your current local git working copy, you can develop and debug locally, and then push changes as usual.
Tools I use:
Eclipse with JS environment (or any nodejs IDE).
Git
Postman
Steps:
Enable source control to your azure mobile service.
Pull to your local and create a eclipse project with the source.
Make changes and push.
Test with POSTman
This procedure allows me to develop really fast and eclipse tell me the common JS errors. But it has obvious downside:
No debugging (I use console.log)
The project ended up with a lot of commits (its hard to use git for proper source control)
I just did a blog post on running Azure Mobile Services locally: http://www.mikelanzetta.com/2014/09/running-azure-mobile-services-locally/ - basically it interrogates the API and starts up express, and allows you to run mocha yourself locally. It's a bit cleaner than pulling down the full wwwroot from the scm link, and I found using my local runner as a git submodule made it easy to work with (and easy for me to use VSO for managing my tests).
Anyway, for actual development, I use the Git integration and WebStorm - it automatically figures out the tasks in my local Gruntfile and makes it easy to run and test. For once it's deployed, Postman is helpful.