What Is Azure?
What is Azure? According to Microsofts own web site, Microsoft Azure is a growing collection of integrated cloud servicesanalytics, computing, database, mobile, networking, storage, and webfor moving faster, achieving more, and saving money.
Thats not a bad definition, but its a little wordy. For web app developers, Id say that Azure is a cloud-based, compute-on-demand platform and set of services that has everything you need to build reliable and scalable web applications. It can support anywhere from a handful to millions of users. Microsoft has been using Azure to host their own large-scale services such as Xbox One.
Lets start with the meaning of cloud-based, compute-on-demand, and how these concepts can save you money. Then we discuss the different categories of Azure services and talk about the services that are most applicable to web app developers.
Cloud-Based Compute-on-Demand Services
Back in the dark ages of computing (before 2006), hosting options were limited. If you wanted to launch a new web application, you had to estimate the max load that your servers could possibly experience, then lease or purchase servers that could handle the traffic. The issue was guessing exactly how much traffic your new web app would experience. It was a classic Goldilocks problem. Because adding additional servers could take weeks to purchase and configure, you didnt want to underestimate, have your site featured on Slashdot, receive a flood of traffic, and watch your servers collapse under the load. Conversely, you didnt want to overestimate and pay hundreds of thousands of dollars for servers that sat idle most of the time. Ive seen both cases happen, and it generally ends with management screaming at the poor development team. Whats a web developer to do?
In 2006, Amazon launched their Amazon Web Services (AWS) platform to address this very issue. AWS changed how computing resources were purchased. Amazons servers were all virtualized. As a developer, you purchased one or more server instances with guaranteed computing resourcesyou didnt know or care about the underlying hardware. Spinning up a new server instance could be automated and took only seconds. Now you could scale both the size of your instance and the number of instances up or down in near real time. This is compute-on-demand.
Amazons second innovation was metered billing. As developers, we were no longer tied to commitments of purchasing or leasing servers for months at a time. With AWS, you simply paid for what you used on a per-hour basis.
Amazon made a killing on AWS and continued to improve and expand their product offering, and Microsoft took notice. As Microsoft is wont to do, they took Amazons great idea and worked to make it even better. In 2010, Microsoft released its own suite of cloud- based , compute-on-demand services that was originally named Windows Azure. In the beginning, Azure had a limited number of services and minimal integration with Visual Studio. Now, Azure has grown to 67 separate services as of the time of this writing. If youre a .NET developer building web applications, Azure is the place to be.
Infrastructure-as-a-Service vs. Platform-as-a-Service
Infrastructure-as-a-Service (IaaS) is a category of cloud computing that refers to providing virtualized computing resources. When you provision infrastructure as a service, you receive nothing more than the virtualized resource. Examples in Azure include virtual machines, networking infrastructure such as virtual networks and load balancers, and storage services such as Backup and Site Recovery and Storage Account. With each of these, you can configure low-level details as to how the infrastructure functions. For example, with a provisioned virtual machine, you have complete control over the operating system (OS) and how it is configured.
With Platform-as-a-Service (PaaS) , you receive a platform for developing applications. Unlike IaaS, most or all of the underlying infrastructure settings are fixed. For example, lets look at Azure Web Apps, which are one of the basic building blocks of Azure web applications. Azure Web Apps allow you to upload your ASP.NET application directly to a hosting environment that puts your app on the Web immediately. You have the ability to change a limited number of hosting settings such as server affinity, the .NET framework version, and whether or not to enable web sockets. The underlying OS settings are fixed and inaccessible.
Why would you want to build on PaaS instead of IaaS if youre limited to what you can configure with PaaS? The beauty of PaaS is that you do not need to worry about details such as setting up and properly configuring the underlying OS and Internet Information Services (IIS) , configuring networking and managing network security, or hardening the underlying OS and keeping up to date with the most recent patches. Instead, you upload your code and verify that your site is answering requests properly. PaaS takes away a great deal of headaches and risk.
My personal recommendation is to always start a web application project with PaaS in mind. If and only if you are unable to accomplish everything you need to do within Azures PaaS offering, then consider falling back to IaaS. Throughout this book, we discuss services from both IaaS and PaaS.
Setting Up Your Machine for Azure Development
Before diving into Azure development, youll need to install some software on your local machine. This software ranges from software development kits (SDKs) to emulators to tools that youll need to use when managing your live Azure services. These tools are all free and are listed here.
Visual Studio 2015 Community Edition
Visual Studio 2015 Community Edition is an excellent integrated development environment (IDE) for .NET in general, and its integration with Azure is excellent. Youll use Visual Studio for rapidly deploying code to Web Apps, WebJobs, browsing Web App server logs, remote debugging Web Apps, analyzing log files, and browsing Azure services within your subscription.
If you already have Visual Studio 2015 Professional or Enterprise installed, you do not need to install Community Edition.
Required : Yes.
Download link : https://www.visualstudio.com/downloads/
Azure SDK
After installing Visual Studio, its time to install the Azure SDK . The Azure SDK includes both the SDK and Azure Tools, which provide deeper Azure integration with Visual Studio and local emulators for development. If you do not install the Azure SDK, youll have to chase down tools and emulators one by one.
Required : Yes.
Download link : https://azure.microsoft.com/en-us/tools . Choose .NET SDK, then click the link for your version of Visual Studio.
SQL Server 2016 Express Edition
This is an instance of SQL Server that you can install to your local machine. Its very handy to use when developing web applications that make use of relational data. Although you can develop against an instance of Azure SQL that is provisioned in the cloud, its much easier to develop locally and avoid latency between your local machine and an Azure regional data center .
Required : Only for developing applications that use a local relational database. Also, if you have already installed an instance of SQL Server 2016 Standard, Developer, or Enterprise on your local machine, you can skip this install.