When you are building a mobile app or a website mostly likely you are going to need some type of data repository. This can be either files, video or in the form of a “database”. In order to access these repositories you need some sort of access mechanism. Sometimes it is a library or SDK others it is a connection to the database. However, with a mobile app or even websites that are distributed the connection to these repositories can be tricky. You need to create some sort of endpoint for these. Back in the day these were called Web Services now they are called API or Web API’s. Creating them can be time consuming as well. You have to create all of the routines needed to get and put data. You will need to create authentication mechanisms to make sure the proper user is getting and putting data. All in all this could be very time consuming.
If you want to use the new method of Azure App Services, here is a video as well.
First off, make sure you sign up for your Azure account before we begin.
Create Mobile Service
Login to the Classic Azure Portal. Click on NEW -> MOBILE SERVICE -> CREATE
Enter a url for your clients to access the service.
Choose eiher an existing SQL Server or Create a New SQL Server (this is used to host your database).
Create Your Data Table(s)
Click on the Mobile Service name you just created.
In the navigation tab, select DATA.
On the bottom of the screen, click CREATE and choose a table name. You can also modify permissions if needed.
Modify Your Schema
Click on the table name you just created and select COLUMN from the navigation tab.
On the bottom of the screen, click ADD COLUMN and add as needed.
You can connect to the Database you just created by using a SQL client tool and your connection string.
To find your connection string click on DB in the left nav, find your Database name and you will see your connection string.
Windows: can use SQL Management Tools or Cloud Explorer (within Visual Studio), or Mac: SQLPro for MSSQL or Mac SQL Studio
FYI: if you are connecting to the SQL server you will have to add your ip address to the server firewall.
Access Your Table API
Automatically you will get a CRUD (create, read, update, delete) API created for you.
Click on the table and then click on SCRIPT in the navigation tab
There will be 4 scripts that you can modify if needed.
FYI: if you name your object and properties in your code, then no need to change anything in the api unless you need specific business logic
Your endpoint will be: https://MOBILE SERVICE NAME.azure-mobile.net/tables/TABLE NAME
Create A Custom API
From our Mobile Services page, click on the navigation tab API.
Click CREATE -> and provide your custom API with a name.
Here you can build custom logic to query multiple tables or perform some other routine.
Your endpoint will be: https://MOBILE SERVICE NAME.azure-mobile.net/api/API NAME
View Errors and Logs
From our Mobile Services page, click on the navigation tab LOGS.
I have worked for digital agencies for most of my career. I was a developer and eventually became the Director of Technology at a few of them. I have worked with web technologies since 1996 and have gone through iterations of design and build trends. From the Adobe Flash splash-screen phase to home page takeovers. From content needing to be “above the fold” to iframes to ActiveX and more! When I was working at Byte Interactive from 2003 to 2007 we were a big .NET and Flash web agency. We did some PHP and Java but most of our clients were .NET. In the 06/07 time frame we started dabbling in the Mobile design space. It wasn’t until we were bought out by Story Worldwide in 2007 when we started to get more into the mobile space. We worked on iOS and some Android and mobile web as well. I then left Story in 2010 and became the Director of Mobile Technology at Affinion Group. This is where I started to get heavy involved with the Mobile Web. From build patterns to testing on all sorts of devices. The “band” was getting back together in late 2010 (ex Byte and ex Story) to form a new company called WELD Media. I jumped in as VP of Technology and we supported web and mobile web heavily before I joined Microsoft.
During all of these companies we had many types of projects. Ranging from small promotional websites to full blown eCommerce applications. We had to support IE 7 for some time as well as all of the newer mobile devices. When it came to testing we used a bunch of methods that have stood the test of time. Different browsers. Browser add-on (Firebug, YSlow, Web Developer Toolbar) we used F12 and inspect element heavily. Heck, we even set up old PC’s and Macs as a test lab. We purchased iPod Touches, iPads, Android phone and tablets. But the common denominator with all of these is you had to be near the device or using the browser to help debug. It did not matter the “tool” you used. You had to open up the website and see for yourself or try and replicate the issue. And there were issues. As a developer, you are able to keep your dev machine up to date. But not so much your clients. Especially when the IT departments lock down versions.
I remember a few of our clients were still running IE6 when IE8 and Chrome were the standard. IE6! Ugh, that was the absolute worst. Even better, they might be using the latest version of a browser but the plugins are out of date (see Flash) or not installed. There is nothing you can do when you are trying to debug that type of issue other than heading down to the clients office and see for yourself (we did this a few times).
These issues are all present today and even worse. With the explosion of connected devices accessing the web makes it even harder to debug and troubleshoot an issue. How many flavors of Android are there now? Last count – 10! Even iOS has a lot. And lets not even touch on screen resolution.
So what happens when your client calls you up after the project has launched and says “I am looking at the site on my home computer and it does not work” or “The site is not working on my mobile phone”. Aside from saying the typical developer line “it works on my phone/computer”, what do you do?
Get Started with Vorlon.js
Lets talk about how we use it and get started.
First you need to make sure Node.js is installed. Head on over to Nodejs.org and download and install for your platform of choice.
Once installed, create a project directory somewhere on your computer and you can utilize the Node Package Manager to install Vorlon.js.
That will install Vorlon.js. The -g option with NPM installs the package globally. So you will not see the files in your project directory. You will have to navigate to the directory that global packages are installed to if you want to modify or copy the installation. On Windows you can find it at C:\Users\username\AppData\Roaming\npm\node_modules\ on a Mac /usr/local/lib/node_modules.
Once installed, you can issue the vorlon command to get the server up and running
Now you have a server running on your localhost on port 1337. To get access to the dashboard, just open your favorite browser and navigate to http://localhost:1337/dashboard/.
Start using Vorlon.js
In order to start debugging you will have to add a single reference to your client project.
Done! Now when you visit the client project website on any device, information will be sent to the dashboard.
Wait, we are not done yet. We can use Vorlon.js in a desktop app or we can deploy to Azure using a one-click deploy. Both of which can be found on the Vorlon.js GitHub page.
There are a few other interesting tools to help with Website debugging and testing.
The Remote client app is a small utility program that allows you to access Microsoft apps from the cloud. When you launch Internet Explorer from the Remote client app, a real preview version of the browser opens into a new window on your operating system, much like any other app you might have running. This version of Internet Explorer is modified to host the latest preview version of the EdgeHTML rendering engine, so you can test how your site will render in Microsoft Edge.
Remote app clients are a great solution if Microsoft browsers are not available for your operating system, or if you’d like to test the preview version of the browser without installing it directly on your machine.
Remote is available for Windows, Mac OSX, iOS, and Android