Azure Application Development 101
Today, our guest blogger, Gilad David Maayan explains application development 101 using Azure's services to write cloud applications.
Cloud computing is a combination of storage, compute, networking, business applications and management solutions. Most organizations consider cloud computing as the main factor for improving agility and reducing costs. In addition, cloud computing eliminates the need to control and manage your IT infrastructure.
Azure is a service offered by Microsoft that allows you to host applications and run datacenters in the cloud. Azure offers a cloud operating system called Windows Azure that serves as a runtime for applications. Additionally, Azure offers different services for managing, developing and hosting applications in the cloud. This article reviews the development tools offered by Azure and the best practices for using them.
Azure Software Development Lifecycle
The software development process in Azure is mainly based on the two phases below.
Most commonly, developers use their local machines to build Azure application code. However, you can also develop application code directly through the Azure portal with the help of the Azure Functions service. Azure Functions is a serverless computing service aimed to simplify and accelerate application development.
Serverless computing allows developers to eliminates infrastructure considerations. With serverless, developers can simply build and upload code, and then define the triggers or events that will execute the code. Triggers can come from a wide range of sources, including another user's application or other cloud services, such as databases and event and notification hubs.
Development and Testing
Developers usually use the Visual Studio Integrated development environment (IDE) to develop and test Azure applications. While non-Microsoft developers can use community libraries like the SDKs for Java, Eclipse Plugins, Ruby or PHP while using Azure.
Developers can combine Azure SDK and Visual Studio to develop and deploy code and project infrastructure directly to Azure from their IDE. In addition, Microsoft also provides a dedicated Azure Resource Group deployment template in Visual Studio.
The template supplies all the resources needed to deploy code in a single operation. This solution is useful in cases where multiple development teams and developers work together on the same Azure solution.
Tools to Create and Deploy Azure Applications
Microsoft Azure offers a couple of ways to create and deploy applications. They can be classified into different types of Azure cloud services, as explained below.
Azure App Service
Azure App Service enables developers to host and build web apps, RESTful APIs, and mobile backends in the programming language of their choice without managing infrastructure.
Azure App Service provides all the required tools to create apps for particular business needs. Furthermore, it makes the development cycle quick and efficient with GitHub, automatic patching, Visual Studio Online integration, production and staging support. The below list reviews some of the apps you can build with the help of Azure App Service.
- Web Apps Service—create, load balance and deploy web applications or websites with Java, .NET, PHP, Python, and Node.js frameworks.
- Mobile App Service—host and build engaging native and cross-platform apps for Android, iOS, Mac or Windows. In addition, you can use the service from anywhere and anytime and leverage all other backend cloud benefits. The development environment is suitable for creating large-scale enterprise-grade applications.
- Logic App Service—automate, schedule, and orchestrate business-critical processes and workflows. Developers can leverage Logic Apps to integrate data, apps, and systems more easily with prebuilt APIs and connectors.
- API Apps Service—host and build your APIs securely in the cloud. Azure API Apps allows you to develop APIs using languages such as PHP, Python or C#.
Azure Virtual Machines (VMs)
Azure Virtual Machines are a well-known standard with a large collection of pre-defined Linux or Windows servers. Virtual machines allow full control over configurations, as well as full responsibility for updates, support, administration, and software installations.
Azure Virtual Machines can fully isolate two operating systems and their applications. For example, if you create a Ubuntu VM install Apache, MySQL, and PHP 6, it will not conflict with the Microsoft SQL, PHP 5 installation on another virtual machine. Additionally, there are a few VM images available in the Azure Marketplace that have pre-installed Visual Studio. By using these images you can quickly create a temporary, or long-term use development VM.
Azure Functions is a serverless compute service that allows developers to run small pieces of code in the cloud without worrying about the infrastructure. That means that you are only concerned about writing the logic of the function.
To execute an Azure function you have to use a trigger. A trigger is an event in external services that fires up the Functions. An external event can be an HTTP request, a timer being lapsed or a Blob being inserted into a container. You can substantially save on cloud costs when using Azure Functions, because Microsoft charges only for the time the Function actually runs.
Azure Cloud Services
Azure Cloud Service is a Platform as a Service (PaaS) designed to support applications that are reliable, scalable, and inexpensive to operate. Azure cloud service is hosted on virtual machines, thus provides more control over Azure VMs. This means you can access them remotely and install your own software. However, monitoring and deployment of complex VMs and workloads is challenging compared to App Service.
There are two different Azure Cloud Services roles, which provide different app hosting:
- Web roles—you can host the app automatically via the Internet Information Services (IIS). A web role is usually assigned for straightforward or lightweight applications.
- Worker roles—a worker role deploys the app as a standalone application without using the IIS. Worker roles are typically used for powerful APIs and applications.
Each of the Azure application development tools listed above has its strengths, weaknesses, and learning curves. There are multiple steps you should take in order to deploy an application in Azure. Choosing a tool is just one of the steps in Azure deployment. First, you have to synchronize and test the code with the source code manager. Then you should add the engine and versions to all assemblies. And lastly, after you compile the code, you can upload the created package to Azure.
How often are you using Azure? Is it your cloud provider of choice? How do you write Cloud applications? Post your comments below and let's discuss.