Tim Murphy's .NET Software Architecture Blog

Azure Sketchnote Collection: Part 2 Nov 25

This is the second in a series of sketchnotes documenting different aspects of Azure and related technologies.  Hopefully you find a few gems that lead to a better understanding of Azure.

Why Azure


Azure For Developers


Azure Redis Cache


Power BI


Hybrid Cloud


Azure Application Component Deployment Nov 05

I think I can! I think I can!

One of the aspects of Azure development that I have found the least amount of information written about is the deployment of your application components.  This is especially the case when it comes to ALM (Application Lifecycle Management) approaches are considered.  As with most things you get the WSYWG demo, but not how things should actually be done in an enterprise environment.  This post will try to cover as many deployment approaches as possible.  While it won’t be comprehensive it will give you enough alternatives to start coming up with your own processes.

Visual Studio

This is usually where every demo of Azure development begins and ends.  You right your web app or cloud service and “Poof!”, your solution magically ends up in your Azure environment.  In this scenario you use the publish option of the project context menu to open a wizard that allows you to connect to an Azure subscription and define where you what site or service you want to publish too.  The process is even simpler if you defined these parameters when you created the project.


Zip Files

While creating web jobs I came across this method of deployment.  You zip up your web job solution and go to Web Jobs under Settings for your Web App and you will see the blade shown below.  You can learn more about this in my earlier post here.



This is the point where we get to a manageable deployment process.  Once you have finished coding your Cloud Service you can go to the project in Visual Studio and create a deployment package using the context menu shown below.


Once you have that visit your cloud service in the portal and select the Update button.  The blade in the figure below will appear and allow you to upload the package and the appropriate configuration.  Azure will then complete the deployment from the provided resources.



If you like to be hands on FTP may be the deployment approach that is right for your team.  It should be familiar to anyone who is used to manually copying their files to a web server.  Once you go into Deployment Credentials for your Web App as shown below and then grab the FTP host name from the properties page you will be able to navigate straight to the wwwroot directory and copy your application files to the server.


From Source Control

Any of us who have been in this game for a couple of decades know that automated builds and deployments save a lot of manual deployment mistakes.  Thankfully we have a number of options for deploying from source control to Azure.  Rather than explain each I’ll put a couple of links here that do a good job of explaining the process of setting these scenarios up..

Visual Studio Online

TFS On Premis


This post gives just a quick taste of Azure deployments from the quick and dirty options to methods better suited for enterprise developments processes.  Be sure to try as many of them out as possible to understand they fit with your development team.

Can Sketch Noting Help You Keep Up With Technology? Oct 14


I saw a post from someone who had created a Sketchnote of one of Scott Hanselman’s talks.  It was the first time I had seen this as an defined process for note taking.  As I get older and technology moves faster I am finding that it is getting harder to keep up and remember everything I need to learn.  This approach looks like it could be part of the solution.  This post documents my findings as I start to use sketchnoting.

One of the things I noticed as I learned more about sketchnotes is that I have seen this approach used before in industry books.  Specifically the “Head First” series had the look and feel of a sketchnote.  It seems the authority on sketchnotes is Mike Rohde.  I took the time to go through his workbook and videos.  I wish I had started with his handbook.

Not being an artist by any stretch of the imagination I wasn’t sure how difficult learning this skill would be.  I’m always up for a challenge though and I am finding it fun to exercise my drawing skills.  One thing that I have found that makes it easier is to Bing other people’s drawings to get ideas.

As has been mentioned in a number of articles I perused it is difficult to take notes on a tablet.  Most of this has to do with the touch control available in most of the current generation of devices.  Of course your mileage will vary.  I have tried drawing with both my Surface Pro and HP Spectre 360 with varying success.  I think newer generations like the Surface Pro 4 and Surface Book will do much better.

I took a look at Moleskines but I like having a bigger drawing surface.  I am finding that a 8 1/2 x 11 graph paper spiral note book is my sweet spot.  It makes getting your fonts right easier and better alignment.  The thinner the pens you are using for your fonts can also make things look better.  The biggest problem with some of these thin pens is that they tend to bleed ink making it harder to keep clean lines, but those are the trade-offs.

Overall I am enjoying the process and it is helping me remember more of what I am working on even if it is mostly just because I am writing more.  It takes more time, but the relaxation factor is also a benefit.  It also gives you an easy way to review what you have been learning which will re-enforce topics so I would say it indeed will help you keep up with technology if implemented regularly.  I would suggest that anyone give this a try and see if it fits your style.  Have fun.

Azure Sketchnote Collection: Pt 1 Oct 02

I recently started sketchnoting to better understand topics with as many new technologies and languages come out every day.  This post is simply a collection of Azure related sketchnotes that I created.  It is meant as a quick overview of some of the key components and concepts around Azure.  I’ll post more in a future post.  I hope at least a few people find them helpful and I invite feedback.

AzureCon 2015






Azure Security Center


Azure Machine Learning


Earn Your Playing Time Oct 02

FalconsWheaton20150906 (151)

It is aggravating being a coach and a parent watching other parents complain that their child doesn’t get their fair share of playing time.  I could have done this with my own son this season, but instead I told him to work harder and he is now a starter.  Those who show effort and willingness to learn will earn their playing time.  We do our children a disservice by expecting someone to give them a role they haven’t put in the work for or don’t have the skill to perform.

We have to realize this applies to ourselves as well in our business lives.  You need to show to your company that you have value and that they are better off with you as a starter.  As a developer this may mean that you need to spend your own time writing a proof of concept.  Another approach is to ask what areas the company has skill deficiencies and make an effort to gain those skills.  You should also see if you can find a mentor.  Often this will make the road easier and both of you can improve your game.

The more you show that you have the ability and drive to make the company successful the more often they will come to you first for the important projects.  Work hard, make yourself visible and earn your playing time.

Learning The Azure Cloud Sep 18

HiddenLake20141204 (2)_3)_4)_5)_tonemapped

The cloud is everywhere around us and if you are building systems in the Microsoft space the cloud means Azure.  So how do you get started.  To my way of thinking you need to understand the front end, batch processing and storage offerings along with the toolset.  This post will outline some of the resources that I have found are helpful to getting started.

Trial Azure Subscription

The first thing anyone who is interested in Azure should do is sign-up for a free trial subscription.  If you are lucky enough to have an MSDN subscription you can also use your $100/month allowance that comes with it.  Either way nothing can ever replacing getting your hands dirty.

Once you setup a subscription you want to make sure you get the most out of it.  One of the greatest thing with Azure is that there are a certain amount of resources that you can always get for free.

Resource sites

All of the resources I have listed here are from Microsoft themselves.  There are a number of other great sites out there, but this should be enough to get you started.

The main online resource site is on the Azure site itself.  This gives you a number of scenarios and examples for developers, administrators and architects.  If you are looking for some free lectures and associated code check out the Microsoft Virtual Academy.  While you are there check out the variety of material on other subjects they have available.

The last site I would suggest for beginners is the Channel 9 Azure Friday site.  Scott Hanselman is always a great presenter and is able to boil down just about any subject to understandable nuggets.  They cover a diverse array of Azure related subjects so everyone should be able to find some pearls of wisdom.


Learning Microsoft Azure by Geoff Webber-Cross gives a good starting point for a rounded understanding of the basics involved with building Azure solutions.  It is a little out of date at this point, but then again anything in print is these days.  The concepts are still valid.

For those of you who get more advanced or have an architecture bent you probably also want to check out Building Hybrid Applications in the Cloud on Windows Azure.  This one was written even earlier, but it is from the Patterns and Practices team which I have trusted for the past 15 years.

This list is by no means comprehensive, but hopefully it will give you are jumping off point to begin your Azure journey.

What Should Your Goals Be When Developing Sep 18

Waiting For Football

This post was prompted by a number of Twitter posts that were discussing if developers thought about who would be maintaining the code they wrote.  Of course the answer is “it depends” as any good consultant will tell you.  No two developers are the same.  Some are more aware of the consequences of their decisions than others.  The real question is what should your goals be as you are developing?

The main trade off we struggle with are speed to market versus maintainability.  Every project is under time pressure and every organization struggles to keep maintenance costs down.  How do you strike a balance that gives you the best return on investment?

Thankfully many of the coding practices that make a piece of code more maintainable are patterns that can be learned and honed to the point where they do not impede progress adversely.

On the other hand, many of the abstractions used to make code more unit testable, such as dependency injection, also drastically increase maintenance cost.  This is especially true as your object graphs get deeper and each dependency relies on another above it.  The tests help greatly with making sure that you don’t break specific scenarios when you change code, but finding a new bug and the right place to add a new feature have a large increase in cost as the abstractions make understanding the code paths challenging.

They way I see it a balance needs to be struck between maintainability, testability and time to market.  How much weight each of those factors have depends on the size of your product, your market and your staff’s capabilities.  Review your company’s priorities and learn to leverage your tools and processes to match those priorities.  In the end this is a game of try, learn and repeat.  Keep your head up and keep improving.

HP Spectre x360: Review May 29


I finally unboxed my Spectre x360 from the Microsoft BUILD conference and fired it up.  I thought it might be useful to prospective buyers to cover the pros and cons of this machine.


My first impressions are that the form factor is very thin.  If fits very easily as a second machine into my backpack adding extra compute capabilities.  It has a bright, wide screen making it easier to get work done.  Generally it will also run all day on one charge depending on how process intensive the apps are that you are running.

Another plus is that with a real laptop mode, an acceptable processor, RAM and SSD, and a full keyboard makes this a viable secondary development machine.  This is something that my Surface Pro with the loosely connected keyboard and very little storage can’t do.


Power and Windows buttons are hard to find.  It would be better if there was a Windows button in the bezel like other machines that operate as tablets.  The screen also has a lot of bounce to it when you touch it in laptop mode.

After using my original Surface Pro for so long I am really missing having a stylus.  I’ve tried using the Surface stylus and it doesn’t recognize that anything is there.  OneNote on a tablet with a stylus is a great combination for meetings and conferences.


In the final evaluation it is a good machine for someone what need a lightweight machine with good battery life and decent horse power.  If you just need an email machine there are much cheaper machines.   So if you are in the right audience give it a look.

Azure Utilities You Should Have In Your Toolbox May 28

Grandfather's Workshop

Developing applications that leverage Azure resources can be challenging.  The Azure portal give you limited view into your account resources.  It shows you the basic structure of you storage accounts, but it doesn’t let you upload and download blobs.  When it comes to your Azure SQL DB about all you have is the ability create and import a database.  So what are the best tools to be productive?

The first tool that you might want to look at is the Azure Storage Explorer. It allows you to view what is in your Azure storage blobs, queues and containers.  You can also create new blob containers, queues and tables as well as maintain the items in them.  It’s biggest drawback is that it can’t be setup to operate against development storage emulator.


The Blob Transfer Utility is a little more capable, but takes a little more digging to configure.  You have to manually enter all of your account information and then the file selection is backwards to me.  It selects all files in a folder by default and you have to unselect them if you only want one.  On the flip side the error reporting is helpful as you figure out the tool.

Ultimately the best tool is the Server Explorer in Visual Studio 2013.  It allows you to access all of you storage types across all the accounts tied to your Microsoft ID.  It gives you the ability to list, add and remove items no matter if you are looking at blobs, queues or tables.  This turns out to be the quickest and most flexible storage tool I have worked with so far.


In the end I would suggest that you start with Visual studio, but try out other tools.  There is always someone coming out with a new better tool.  All these are free, but you may find a product you can purchase that handles all you Azure maintenance needs.  As I run across any better tools I will post them here.  Stay tuned.

Review: Chicago Coder Conference May 19

Party Place Under Giants

On May 14th and 15th, 2015 the Chicago Coder Conference was held at the UBS building in downtown Chicago.  PSC Group was a sponsor of the event and had a fair sized contingency in attendance.  This post will review the good, the bad and the ugly of the conference.

Let’s start with the bad and the ugly so that we can end on a high note.  The overall organization of the conference was really bad.  It started with the keynote.  They had a venture capitalist talk about how the funding process works.  Given that most of the people there were employed by a company that sent them there I thought it was a poor choice.  Add to that the fact they timed the sessions without any time built into the schedule to clear rooms and the next speaker to setup and didn’t well publicize the Wi-Fi availability (which was poor) and it didn’t make for a good experience.

The best part of the conference was the number of quality presenters from not just Chicago, but around the region.  Unfortunately Chris Woodruff got sick and was not able to give his presentation.  This lead to a number of scheduling shuffles (which the organizers didn’t announce) where speakers dug presentations out to make sure there weren’t any time slots where you had nothing to hear about.

The best presentations were from Greg Levenhagen on Visual Studio debugging tools and Eric Boyd on architecting scalable applications.  Greg showed a number of features of Visual Studio that most developers never knew existed and can save you huge amounts of time.  Even better, since both of his machines died he used my laptop for the demo giving me some reference to go back to.

Overall, the conference was positive, but the organizers have a lot of work to make it more productive.

Advice For Speakers: Know Your Point May 18

There Be Ghosts Here?

It has happened to all of us.  You go to a conference and sit down in a session that has a great title and abstract only to sit through a long winded talk that has nothing to do what you were sold.  As a speaker myself I find that this is a good reminder of the questions that you need to ask yourself as you prepare your material.

Each session we put together has a limited amount of time.  Review your content to make sure that every point you make has some bearing on your stated subject.  Is each example or slide going to give the audience a better understanding of the topic?  One of the best ways to do this is to start with an outline as this gives you simple bullet points to review.

The next step is that each slide or demo should relate back to those bullet points from your outline.  As each slide is completed make sure that you review the content to make sure you haven’t strayed from this outline item it was intended to cover.

Finally, do a practice run with someone who can give you objective feedback.  This will give you a way to know how things are shaping up before people start walking out of your talk.

None of these suggestions should be new (you probably heard them in high school speech class), but reminders never hurt.  Follow these suggestions and you are one step closer to a successful talk.

Build 2015: Day 2 Keynote May 01


As with any second day keynote, day two of Build had less fan fare and new announcements than yesterday.  Today it was all about doubling down on the message and showing a little more. 

The one message that I think went horribly wrong was the opening video.  It was all about how Microsoft in the past hasn’t been open and companies didn’t think they could trust them, but now a new leaf has been turned over and they are who companies want to work with.  While there has been some of that viewpoint in the past I don’t think it was a majority viewpoint.  I even had a manager tell me one time “You will never get fired for going with Microsoft”.  I think they should have highlighted their increasingly open stance and let this minority view fade.  They really need to get some marketing people who know what marketing is.

Steve Guggenheimer and John Schewchuk ran the show for day 2.  They very quickly and with what didn’t seem to be much rhym or reason went through videos from QuestLove and PropellerHead followed immediately by AutoDesk and Acumatica representing commercial applications.

David Treadwell came out and things got to what you expect from a keynote: information.  The main message being presented is that Windows 10 is one united front.  What they described was akin to magic where developers can write one piece of code and the platform will optimize a variety of features such as menus for the device and mode that you are using it.  If this materializes well in the final product then life will be getting easier for developers.  As proof that they have put some serious work into this release he informed us that over 2500 new features have been added to the development platform.

For a while after that David and Kevin Gallo played tag team presentation.  As a developer I was encouraged by how familiar I was with the concepts of the canvas and map controls that Kevin demonstrated and amused when he tried to wipe away a line he drew on the Surface Hub with his hand like it was a normal whiteboard.  The interesting aspect of the map control he show was that it seemed it had data binding capabilities.  This could make for interesting possibilities.

My funny bone was tickled further when during Kevin’s demonstration of making a slideshow for an app I noticed that the image he was using was of a bathroom with the toilet next to a floor-to-ceiling window.  Remind me to look closely at my own images when doing a presentation.

The cool factor rose when they showed the architecture app being run on both Xbox and Hololens with the appropriate user interaction paradigm on each device.  Mark this as another win for developers.

We got to see more of the new Edge browser which it was confirmed runs on the EdgeHTML engine.  A point was made that this browser is all about user experience.  They have made over 4200 interoperability improvement and it performs better than any other 64bit browser.

Where as yesterday they announce the bridges to universal apps, today they showed them.  From adding the ability for a Win32 app to make toast notification to the converted LoseIt Android app to converting iOS projects into Visual Studio Universal App project, we made our lap around demonstrations of these abilities.

The most charismatic speaker of the day was Joseph Sirosh.  With comments like “AI meets AI (artificial insemination)” he kept the crowd laughing and still managed to educate us about Azure Learning.  Of course that comment was in regards to the fact that farms are now using Azure learning and pedometers on cows to tell when they are in heat so that they can get better pregnancy rates.

His other demonstrations did not disappoint either as he showed us different ways that the BizTalk-like-orchestration in machine learning could predict March Madness outcomes or leverage APIs from gallery.azure.net to detect faces and determine how old they were on how-old.net.

Steve and John came back out and showed us an amazing DirectX 12 demonstration where the rendering was so life like that you thought you were watching a film.  It was only after the keynote that I found out the amount of computing horsepower they had on stage to make it work.

The last demonstration was for the capability of creating Minecraft Java mods in Visual Studio.  It’s lost it’s lustre as we were insulted by the presenter and teenage developer on stage who evidently didn’t realized that everyone in the audience was a developer and knew what intellisense is and how to code.


For myself I think the day 2 keynote was a bust.  I think Microsoft did itself a disservice with poor marketing videos, weak content and poor speakers.  There were moments that impressed and some presenters that improved our understanding of this new Windows world, but they need to do better next year.

Build 2015: Day 1 Keynote Apr 30


Build is always one of the most exciting Microsoft conferences.  Have of the fun is trying to guess what will and won’t be announced.  Will the analysts be right or will there predictions be off in left field?  So what happened day 1 this year?  Of course that depends who you ask, since no one goes to the same sessions or sees things through the same filter.  This post will cover the keynote and a future post will cover the day 1 sessions.


The keynote is always a rollercoaster.  Anticipation.  Surprises. Disappointment.  This rollercoaster was operated by a cast of most of us are familiar and I run it down as we go.

The first disappointment came before the session started.  The line to get into the room snaked up all three floors of the Moscone Center.  I’m not sure what the delay was, but It took forever to get us in.  Little things can put a damper on the experience.

The presentation began with a feel good fluff piece.  At one time it would have been impressive to have someone create a pen driven app to take music notation, but at this point I’m not wowed.  I’m not trying to belittle his work, but I think they should have found something that really showed off new features of Windows.

From that point Satya Nadella laid out three areas of transformation that they would cover today: Cloud, Office and Windows.


Bring on the Gu!  Scott Guthrie came out to lead the charge for the cloud announcements.  I was impressed by the facts he presented:

  1. Azure has more data centers than Google and Amazon combined
  2. 500+ new features have been added to Azure in the last 12 months
  3. 90k new Azure subscriptions per month
  4. Microsoft is the only company with an offering that combines both on premises and cloud resources that create a complete solution

Other announcements that I though made an impact include:

  1. .NET Docker packages are able to be deployed to Linux servers
  2. Linux deployments can be debugged via Visual Studio
  3. Introduction of Visual Studio Code edition for Windows, Mac and Linux
  4. Azure Service Fabric
  5. SQL DB now has transparent data encryption, full text search and elastic database pools
  6. Azure Analytics has expanded include the new offerings SQL Datawarehouse and Data Lake
  7. Both Ford and the NFL are using IoT and Azure to collect and analyse data

In all Azure Dominated the keynote.  There is too much to go into the details here, but it is clear that this has become the most important part of Microsoft’s business.


Office almost seemed like an afterthought thrown in to make it look like there was more going on.  It seemed like they rushed through it.  Rob Lefferts came out and quickly how the capability to use the same capabilities everywhere was central.  Every product in the suite is focusing on integration that reminds me of the contracts introduced in Windows Phone and Windows 8.  You can grab contact information from LinkdIn or SalesForce or images from PicHit.me.

When they went into the Office Graph, Delve and the Skype web SDK topics they were moving so fast it was hard to keep up.  They should have either gave them equal time or split them out into their own announcements.


While the Azure announcements impact my job daily, I knew that the Windows announcements would speak to the spirit of Microsoft.  Satya came out saying a lot of the right things.  He spoke about making Windows more personal, having one development platform no matter the device and having one store.  Of course the cynic in me feels that if they wanted Windows 10 to be more personal they would have left the features that were in Windows 8 instead of going back to the Windows 7 way of doing things.

When Terry Myerson came out he was hitting most of the right notes too.  He talked about making the OS the most attractive development platform.  Again, my thought was that more important is to make it attractive to the end users, but that means getting developers and companies to put more top notch apps in the store.  Looking at it that way I’m on board.

He then itemized their promise to the customer:

  1. Apps should be easy to be discovered
  2. Apps should be easy to install and uninstall without junking up your system
  3. Payments need to include multiple method and they should be convenient and trusted
  4. Carrier billing for apps will soon be available and not just for phones
  5. There will be a store for business that will allow for control of app distribution as well as payments by PO

This is part of their strategy to get Windows 10 adopted quickly.  Myerson indicated that they want to have 1 billion (yes billion) users within 2-3 years.  A lofty goal for sure, but if they are going to right this ship that is the type of goals they need to have.

I think many attendees were happy to see universal apps extended to Xbox One during the USA Today demo.  This is something many people have been hoping for.  This was followed by a blitz of four developer announcement.  Each was more impressive than the next, even if most of them work expected.

The first is that web application can be registered with the Windows Store.  Once this is done the web app runs inside an application frame and gains many of the capabilities of a Windows app including features such as notifications and in-app purchases.

Second, bringing Win32 .NET apps into the store.  The main example was Adobe Photoshop.  This is made possible by application virtualization and will keep the ecosystem more reliable because the apps will be isolated.

Ways number three is that now you can reuse you Android Java/C++ code.  This is a better option than the running of Android apps on Windows which everyone had expected.  This allows the app to use the Windows APIs and other goodness, makes life easier for people who write for Android, but doesn’t take away the independent nature of Windows.

The fourth way was the most shocking and garnered the most discussion after the presentation.  You will now be able to bring your iOS Objective C code into Visual Studio and have it work on Windows and use the native goodness.  All four of these are helpful to giving Windows 10 the best chance possible of rising from the ashes that it is in right now.

Then came the announcement all the attendees were waiting for: the give away for the conference would be a HP Spectre x360.  An impressive piece of hardware that we will have to see if it stands up as a development machine.

Joe Belfiore then took the stage, but with less focus on the phone than we are used to.  He introduced an optional feature of Windows 10 that will spotlight features that a user hasn’t tried on their machine yet so that they can learn all the productive features available.  This coupled with the fact that Cortana can now use application contract to perform more operations on your behalf without actually opening the app is a wonderful differentiator for Windows 10.

The we finally got to find out the new name for Project Spartan: Edge.  I can’t even tell you what meaning Joe said it had in their eyes.  All I could think was that I was pretty sure that was the name of the rendering engine under the hood of either Project Spartan or IE.

Joe ended his portion with a demonstration of Continuum for phones.  This give you the ability to turn you phone into a fully functioning work station by adding a second screen and bluetooth input devices.  While I don’t see many scenarios where I would use it the feature could be helpful to a certain segment of mobile workers.

Last came the Hololens.  Alex Kipman and a cast of helpers demonstrated more of the practicle feature.  One that really stood out for me is the “follow me” command where you can have a floating application window like a video follow you and then pin it when you stop.  It was then announced that they had brought hundreds of Hololens devices to Build and you could sign up for a limited number of demos.  This brought an audible groan from the audience who had been hoping to take one home as a give away.


In all the keynote was long (ran over by 30 minutes) but packed to the bursting point as you would expect from Build.  I see promise in the technology that Microsoft is presenting, but it is yet to be seen if they can capture the imagination and wallets of the general public.  Only time will tell.

Frankentechtures Apr 22

Nothing but bones

Monsters are an exciting thing to see in a movie.  They are not so thrilling in your application architecture.  I recently came up with (or at least I think I came up with) a term for architectures that are put together with mismatching parts and in ways the software gods never intended: Frankenstein Architectures.  A co-worker then evolved that to Frankentechture.

Of course the designer of a framework or an application platform can’t envision every possible use of their creation.  How do you know then when you are just using it in a new and inventive way and when you are creating a Frankenstein monster?  Read the documentation of the author’s intent, see where it performs best and where the maintenance story is the best and then don’t stray far from those boundaries.

Another thing to think about is if you are using patterns just because you read them in a book and it sounded good?  Are you adding them to the application just because you saw them at the latest conference?  Are you spending days and weeks finding ways to get around the limitations of pattern? Do your developers require a 500 level course to make a simple change to your code base?  If you answered yes to any of these then you might have brought a Frankentechture to life.

There is a time and place for adding complex patterns or work around for a limitation in a framework to your solution.  Before you do that though, ask yourself if the problem might be that you are using the wrong toolset or have wrong design pattern for your situation.  If you can identify this as a possible problem early in the development process your can save yourself a lot of grey hair and your company a lot in maintenance costs.

So my call to action is to question every design decision.  Apply the YAGNI principle where ever possible and don’t add complexity before you have a compelling reason to do so.  Choose the architectural components that work well together and best suit your requirements.  If you do this you can assemble a hero instead of a monster.

Creating Azure WebJobs With The WebJobs SDK Mar 04

BusseWoods20140924 (29)_1

The move to the cloud of many applications means that we have to learn new approaches to solving old problems.  One common problem that most developers face at one point or another is background processing for web sites.  In the past the solution would have often been to build a Windows Service and install it on a machine.  Of course if you are using Azure Web Sites to host you application you do not have access to install services.  Depending on what you need to accomplish WebJobs are the solution.  This post will discuss the basics of creating and deploying an Azure WebJob.

First you need to determine what type of WebJob makes sense to you.  There are the ones that are triggered by Azure events and those that are scheduled.  The ones that are triggered revolve around queues and data put into Azure storage.  These are generally referred to as continuous.  Conversely, if you have code that needs to be performed but is not based on an Azure resource then it is scheduled similarly to how we schedule tasks on a Windows server.

The main difference between the way triggered and scheduled WebJobs are coded is based around using the JobHost class and the Functions class.  In the Main method of a triggered job the RunAndBlock method of the JobHost object is executed as shown below.  This allows the job to run continuously.  

static void Main()
    var host = new JobHost();

The actual work is done in a method of the Functions class.  The parameters of each method define the if the function is triggered by a queue entry, a new blob storage or other resource.  This example is actually the default that is generated by the project template.

public static void ProcessQueueMessage([QueueTrigger("queue")] string message, TextWriter log)

The easiest way to write a WebJob that will run under a schedule is to simply remove the code in the Main method and put in your standard .NET code to perform your tasks.  At the same time you can remove the Functions class since it will not be used.

Set connection strings in the app.config for dashboard and storage to the name of your storage account and the storage account secondary access key.  They should look like the following configuration snippet. 

<add name="AzureWebJobsDashboard" connectionString="DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=StorageAccountSecondaryAccessKey" />
<add name="AzureWebJobsStorage" connectionString="DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=StorageAccountSecondaryAccessKey" />

They can be found at either of these two locations depending on the version of the portal you are using.



There are two ways you can deploy your WebJob to your Azure WebSite.  The first is to use Visual Studio.  The other way is to zip up your bin directory for you executable and upload that through the Azure portal.


Ultimately WebJobs are pretty easy to create once you find the basic information around their development.  Learn them and make your scalable cloud solutions on Azure more robust.