Skip to content

Latest commit

 

History

History
 
 

Readme.md

Simple OWIN Database Sample

Introduction

I created this sample for the OOP 2015 conference in Munich (Germany). My topic is Application Lifecycle Management in the Cloud. As always I try to show mostly practical samples instead of boring slides. This sample code should allow participants to reproduce my demos and play with the results.

Content of the Sample

I have written a detailed blog article describing the background of the sample. You can find it in my blog.

The code is structured as follows:

  • SimpleOwinDatabaseSample contains a very simple web application (OWIN). For demo purposes it accesses a database (just listing the tables inside of the database). Imagine that this sample is a complex LOB web app that you want to manage in the cloud.

  • SimpleOwinDatabaseSample.Test contains unit tests for the sample mentioned above. For demo purposes I also added an integration test accessing the database.

  • The last sample in JiraWebhook shows how to implement a Jira webhook that receives a message whenever a new Jira issue is created. In this example I use Visual Studio Online's REST API to automatically create the issue as a Product Backlog Item in VSO.

Hands-on Lab

Do you want to play with the sample yourself? Here is what you have to do:

  • Read my blog article to understand the background of the sample.

  • Get an Azure and a Visual Studio Online account. All the components I use in this sample (Azure Websites, Azure SQL DB, Visual Studio Online) are free if you accept a certain quota. It should be enough for your first experiments.

  • Create a new VSO project and explore the project management capabilities.

  • Check in the sample code.

  • Create a new Azure website and change the connection string settings so that it points to a DB in the cloud (maybe you have to create one in Azure).

  • Setup continuous deployment using the Azure portal.

  • Change the sample code and check in. You should see that a build is started automatically. If everything works, you should see the web app in Azure a few minutes later.

Do you want to try the Jira Webhook, too?

  • Deploy the JiraWebook sample into a new Azure website. Don't forget to set the website configuration settings accordingly (especially the TfsConnection with VSO credentials in the form user:password).

  • Configure the webhook in Jira (details)

  • Create an issue in Jira. It should be created in VSO automatically by your webhook.

  • Do you want to see what's happening behind the scenes? Try Azure website's remote debugging feature to break into your webhook when it is called. Nice, isn't it?

Have fun!

Questions

Please post your questions as comments in my blog article.