Azure Certification Jump Start in New York City

If you’re interested in any of the following, this is a must-attend, free, hands-on event!

  • Becoming Azure certified
  • Improving your marketability in the new cloud-optimized world
  • Becoming a systems architect
  • Staying current on the latest technologies
  • Becoming a cloud EXPERT

Join us for a full day focused on architecting Microsoft Azure systems and solutions. You’ll also discover what’s required to pass the MCP Azure Certification exam.

We’ll cover all the exam objectives, including PowerShell, through live demos, hands-on labs and discussions, and we will tailor the agenda to fit your needs and concerns.

Agenda: (subject to change without notice)
Everyone who attends will receive a copy of the Microsoft Press guide, 70-534 Exam Reference: Architecting Microsoft Azure Solutions (co-authored by Dan and a $40 value). The event also includes breakfast, lunch, and drinks during the social hour — all at no cost to you, thanks to our generous sponsors.

View detailed agenda

Everyone who attends will receive a copy of the Microsoft Press guide, 70-534 Exam Reference: Architecting Microsoft Azure Solutions (co-authored by Dan and a $40 value). The event also includes breakfast, lunch, and drinks during the social hour — all at no cost to you, thanks to our generous sponsors.

We hope you can join us, and we look forward to seeing you there!

Speakers:
Dan Stolts
Sr. Technology Evangelist, Microsoft
Brian Lewis
Sr. Technology Evangelist, Microsoft

 

Developing for the Microsoft Band Android Edition

In my last post we looked at getting set up to develop a Windows Phone app using the Microsoft Band SDK as well as Visual Studio Community Edition on a Windows 10 machine. We also looked at using the Web Tiles, which utilizes a web interface to build a communication tile that you install with your Microsoft Health App. In this post, we will look at getting going with Android development.

In order to start development for the Microsoft Band let’s go over some ground rules. You are not building an app for the “Band”. You are building an app for a mobile device (aka Phone) which will take advantage of all of the sensors within the Band. Think of the Band as sending and receiving information. It sends data from it’s sensors and receives data from the app that you create.

There are 2 major aspects of developing for the Band. The “app” and the “Band UI”. The app is something that you have full control over. The UI, the code, the OS (yes, we support Android, iOS and Windows development). The Band UI is more structured and starts with the Tile which is the first interaction with your app. Once the user engages with the Tile, you then can create Pages with information and actions.

Development Setup

To get started with the Microsoft Band development, we will first need to get our machine up and running. Whether you are on Windows or Mac, the steps are pretty much the same.

  1. Download and install Java JDK
  2. Download and install Visual Studio Emulator for Android (Windows) or Xamarin Android Player (Mac)…Visual Studio Emulator for the Mac coming soon.
  3. Download and install Android Studio
  4. Download the Android SDK for Microsoft Band

Once everything is downloaded and installed, you can start by creating an empty Android project.

After the project is created and before you start coding, you will need to make sure we have the Microsoft Band SDK (jar file) added to our project. In Android Studio we can drag our jar file into our lib directory. Once we do that, make sure you right click on the jar file and choose “Add as Library” so it is added to your Gradle and project.

Now you are ready to start development!

Development Process

The process of creating an app and connecting to the band is in 3 steps.

  1. The first step in our app is to make a connection to a Band. To make a connection, the Band and the our Android device must be paired. Item to note – this will not work within the emulator, you will need a device. You can use the Band Client Manager to get a list of paired Bands, and establish a connection to one or more paired Bands.

     
  2. Once we get a list of paired bands we can then start the process of subscribing to its sensors. The subscriptions are managed by the Band Sensor Manager on the Band Client. For each hardware sensor, the Sensor Manager allows the application developer to create a subscription. A subscription is essentially a platform-specific callback mechanism. It will deliver data at intervals specific to the sensor. Some sensors have dynamic intervals, such as the Accelerometer (on Android and Windows), that allow developers to specify at what rate they want data to be delivered. Other sensors deliver data only as their values change.

    Item to note – sensor subscription can be taxing on battery. Use as needed.
  3. We also then can create a Event Listener to perform our operations.

    Item to note – The Heart Rate sensor requires user consent to access. You can prompt and check if the user provided the appropriate permissions before your calls.

     
  4. That is basically it. There are some clean up methods such as deregistering the event listeners when done, but more or less those couple of lines will get you up and running.

Take a look at the following Channel 9 Video for more detail on building the full app or the GitHub repo.

band-channel9

 

PHP and Azure Data Services

When we think of PHP we also think of MySQL. The perfect relationship. PHP can provide the logic and MySQL can provide the data storage. There are others like SQLite, Postgres, MariaDB, MongoDB and more. All of these provide great functionality and performance but there are a few services that Azure has that can be deployed quickly and managed really easy. We are going to look into 3 services that Azure utilizes to make deploying and building PHP apps really easy and scalable.

Using Azure Microsoft SQL Server

This is not something new. PHP has supported MS SQL for a while now but why not utilize the ability of creating a SQL DB out on Azure and using the ODBC drivers to connect to SQL. By using SQL as a Service you can build software-as-a-service (SaaS) applications that use Azure SQL Database to provide flexibility to support both explosive growth. For workloads with unpredictable database resource consumption, the elastic database model gives you the ability to pool resources to use among a group of databases. Instead of overprovisioning a virtual machine to meet peak demand, you can use an elastic database pool to let hundreds or thousands of databases use resources within a budget that you control.

You are also removing virtually all infrastructure maintenance with SQL Database, which provides automatic software patching as part of the service. Meanwhile, built-in system replicas using the quorum writes technique help deliver inherent data protection, database uptime, and system stability, which means fewer hassles for developers and architects. System replicas are automatically moved to new computers, which are provisioned on the fly as old ones fail.

Now you do not have to focus on the “database server” you can just put your focus on your business and technology.

Here is an example. Using sqlsrv_connect and a MS SQL instance out on Azure, you can be up and running in no time.

Using Azure App (Mobile) Services

Azure App Service is the only cloud service that integrates everything you need to quickly and easily build web and mobile apps for any platform and any device. Built for developers, App Service is a fully managed platform with powerful capabilities such as built-in DevOps, continuous integration with Visual Studio Online and GitHub, staging and production support, and automatic patching. Using Mobile Apps in Azure App Service, it offers a highly scalable, globally available mobile application development platform for Enterprise Developers and System Integrators that brings a rich set of capabilities to mobile developers.

Why Mobile Apps?

Mobile Apps in Azure App Service offers a highly scalable, globally available mobile application development platform for Enterprise Developers and System Integrators that brings a rich set of capabilities to mobile developers. With Mobile Apps you can create API’s in minutes. Customize those API’s to include push notifications, authentication and more.

Here is an example on how to set up a Mobile app as well as integrating the service with a PHP application. There is a Azure JavaScript Library that you can import and use for your app.

Using Azure PHP SDK

The other way to utilize manage storage is via Azure Storage (blobs, files, tables). Azure Storage is massively scalable, so you can store and process hundreds of terabytes of data to support the big data scenarios required by scientific, financial analysis, and media applications. Or you can store the small amounts of data required for a small business website. Wherever your needs fall, you pay only for the data you’re storing. Azure Storage currently stores tens of trillions of unique customer objects, and handles millions of requests per second on average.

Azure Storage is elastic, so you can design applications for a large global audience, and scale those applications as needed – both in terms of the amount of data stored and the number of requests made against it. You pay only for what you use, and only when you use it.

In order to access Azure Storage in PHP you will need to install the Azure PHP SDK and configure your application as well as set up a storage account.

Wrap up

Each of these options will provide you with managed data storage, easy setup, and highly scalable so you can focus on your code and your business.

Check out phpmssqldemo.azurewebsites.net for examples of all three scenarios.