Working from Home and Walking to Work: Surviving Remote Work

There’s a commercial that I’ve seen in the last few months on TV where the announcer is singing the praises of a lady who rides her bike to work, “…which is impressive, because she works from home.” While it’s true that it seems a little nuts to leave your house to go to your house, there’s actually some incredible wisdom in this simple practice. Working from home is a privilege and an expression of trust from our employers, even if we’re self-employed, and you need to be equipped to find a good cadence to your day.

Awake, Alert and Ready to Go

The first month that I started working from home I thought I had it made. I was sliding out of bed pretty much straight into my chair and starting my work day with the sludge still on my teeth, sipping on coffee and trying to make sense of the emails I was catching up on through my half-closed eyes. I’d usually wait until lunch to shower and I rarely did my hair.

Now, this was all kinds of bad for many reasons, especially because I wasn’t able to get any of my schtuff done, but it also meant that days were always a real slow build up. Rather than hitting the keyboard running with trumpets and sirens and “Hells, ya!”, it was more like a pitiful crawl being cheered on by a fourth-grader playing a sad kazoo.

So, I started walking to work. And I love it. I say goodbye to my kids and give my wife a smootch. I leave via the front or side door, head North and do a loop through my neighbourhood. I will usually read a few emails, catch up some news and listen to music as I walk, but often I stop to talk to folks who live in my community too. As I finish my walk, I enter the house through the back door, and I’m officially at work.

I am engaged, trumpets blaring, as I start hacking.

When I finish my work day, I leave through the back door, and head South, doing another loop, but usually on a different route. If it’s a busy evening, it can be as short as a block or two. I come in through the front or side door that I exited through in the AM and I’m back home.

Separation of Work Space and Home Space

This practice really helps me to keep the work stuff at work and the home stuff at home. There are a few other physical boundaries that I keep in place, but really, the walk at the start of the day and the end of the day are just a great way to get energized, tune in my focus on the way to my office and leave work behind when I’ve signed out for the evening.

Those other physical boundaries? I work in my office, I have a space set aside in my home where work stays. It is a very rare occasion when I bring my laptop out of my office to work elsewhere in my home.  I don’t keep a house phone in my office, and I don’t take my VOIP gear out into my home.  My wife and I don’t talk much through the day, if at all, except occasionally via Skype chat. In my new office (we’re in the process of renovating right now) I’m installing extra sound-proofing so that the noises of the home enter my work space even less than they do today.

Of course, there are some exceptions. At lunchtime, I just walk upstairs to have lunch with my bride, I don’t do the walk from-and-to work again. And if she is otherwise predisposed throughout the day, I’ll take the home phone with me as I head down to the office (our son has Type 1 Diabetes, and our house phone is the emergency contact number). And with kids missing school busses and meetings starting promptly in the AM or running late at the end of the day, I don’t always get my walk in. But I covet the days I do.

Find Your Own Survival Technique

The walking works for me, but it may not for you and I understand it’s not for everybody.  It really doesn’t have to be a walk, but as a remote worker I have found success in having a way to start my work cleanly and to be able to literally walk away from my job at the end of the day.

This is really a matter of figuring out how to not only survive the opportunity you have to work from home, but to find success in it. So figure it out! What is it for you that helps you train in on your work day? What is it that helps you disconnect as the evening begins?

Wake Up and Get S#!t Done – A Practice of Awesome

People, we need to get more stuff done. Insert whatever word is appropriate for you. We’re a culture consumed by consumption and I think it’s going to suck a lot of life out of our kids. Seriously, it’s going to suck.

As we seek to fill our time with things that are pre-fabricated, manufactured and less original, we lose out on the participation in creation, which is how we got to be awesome as a species in the first place. So, let’s be all commit to being more awesome.

  • Learn every day; just…be more learned.
  • Wake up early and give yourself an hour for your future self.
  • Teach someone, especially kids.

Sleep is awesome. I’m speaking from personal experience as I’ve done it a few times, in fact I’m quickly approaching 13,800 attempts at a night’s rest, many of them successful. I even take a nap most days. But we’re suckers for using sleep on the wrong end of our night. Staying up late is just way more appealing.

Bust Out of Your Funk

But what do we do in those last hours, when we’re the least rested and least focused? We watch House of Cards. Play games. Do the Facebook. Drown in Twitter or Instagram. Lame.

As far as New Years resolutions go, I’m not much of a fan. And since I try to do this every day already, it’s not really much of a commitment for me to make, but I think it’s a great life hack. So, here’s one thing that you can do to make your life better:

Wake up early.

That’s it. No secret sauce, no programs or diets or fads. Just get your arse out of bed.

I’ve been doing this, fairly faithfully for the last couple of years, and it’s something that I’ve started sharing with folks because it works. I can’t possibly make money off of you getting up earlier, so there’s nothing but a good honest recommendation in this.

Why do it? Because you can start to take control of your life, that’s why. You get up early, and things happen. There’s likely less distraction in your house and you’re going to be able to tune in to the task at hand. There are a ton of things you can do in just 45min-1hr:

  • Read something you’re interested in
  • Gain at least some awareness of world events
  • Learn, learn, learn
  • Go for a run/walk/bike, take out the trash, do some Yoga, shovel some snow (I do advise against snow blowers and lawn mowers in the wee hours, for the sake of the neighbours. Especially if I’m your neighbour)
  • Write, even if you aren’t sharing it
  • Solve a problem outside of your normal domain

I’m a software developer (in case you couldn’t tell from my blog) so for me, my goal is to stay caught up on the changes in the industry (cloud, patterns, vNext type stuff), things that influence my industry (electronics, politics, economic trends, job markets) and things that are disruptive to my career (wearables, IoT, startup culture, young kids with big ideas). I write code almost every morning. I try to work out 4 times a week.

If you don’t think that an hour of effort can make a difference, here’s what I did yesterday AM in 64 minutes:

  • Created a new Azure Web Site
  • Setup DNS for the site
  • Created a certificate request for the site
  • Applied for SSL with GoDaddy
  • Completed the certificate request
  • Exported the cert (with cert chain) and uploaded to azure
  • Added the site to a GitHub private repo
  • Published the site to Azure
  • Added two settings to turn “test” and “paypal sandbox” mode to my web.config
  • Added those app settings to the Azure website
  • Enabled SSL bindings and redirects

TL;DR: I got schtuff done. And yes, I track my time and keep a log. When I look back on my week, I can honestly reflect and say, “Good week, Chambers” or “Pick up the slack, home slice”. It’s not a tool to condemn myself, it’s a way to score wins and keep motivated. Last year I put over 150 hours into “my career” and this year my career is better than last year.

Ch-Ch-Ch-Ch-Ch-Changes

If you’re not a morning person, so what? All you’re saying is that you’re not great at waking up. So wake up earlier, and get over your “not a morning person” time, then get to work.

If you get up early and start doing something meaningful, there’s going to be a few things that happen:

  • You’ll start slipping away to bed earlier, because you’ll be tired earlier in the evening. Embrace it.
  • You’ll start to lose interest in gossippy, trendy fads.
  • Things you have wanted to learn will start to get learned.
  • Projects you have wanted to work on will get some attention.
  • It will be easier to walk away from your work during the day/evening and spend time with your family because you’re constantly achieving.
  • You will see less value in lower forms of entertainment (reality shows) and greater value in the investment in yourself and time with your loved ones.
  • You will be happier because you will feel like you’re accomplishing something nearly every single day.
  • You will appreciate your rest much more

Oh, yes, rest is important. And I don’t just mean sleep. No athlete worth her salt trains every day of the week, nor should you. Take a day off every week (I try to practice a digital Sabbath) and let yourself recharge. And balance your efforts (I take a walk before and after work). I will write on this soon, as it’s especially important for me as I am a remote worker.

    But, But, But…I Like my TV Shows! And I don’t Like to Get up Early!

“Can’t I just do this before I go to bed?” Sure, if that’s what you prefer. But why wait until your last hours of the day – as your concentration and willpower fade – to invest in yourself?

My morning ritual is easy: I get up, put the coffee on, do a quick workout (sometimes as short as 10 minutes), shower, grab my cup of joe and get to work. This takes less than 20 minutes, so I get up about an hour before the rest of the household. Want to know something crazy? I don’t even set an alarm. But, more on that in a future post.

legocreative

My 11 year old son loves Lego and Dr. Who. He wakes up a couple of times a week and spends 10-15 minutes or so looking at online projects that other Lego-Whovians have built, and then tries to re-create them, or just builds his own, even recently getting into painting his own characters. He gets it: if he wants to learn how to do something, he’s got to put some time into it. He’s got school during the day, homework and music lessons during the evenings, and his parents make him get a reasonable sleep in each night. When else can he do this?

So, wake up early, close down your unnecessary browser tabs (Twitter, Facebook, email) and get some real s#@t done. Spend your early mornings on yourself, your daytime on your job, your evenings with the people you care about most and get a good night’s sleep. It will change your life for the better, guaranteed, or I’ll double your money back.

And happy coding. Smile

Fatal: unable to access ‘Repository': Failed connect to bitbucket.org:443; No error

I was getting this error when trying to push a new branch up to bitbucket today:

fatal: unable to access 'https://{account}@bitbucket.org/{project}/{repo-name}.git/': Failed connect to bitbucket.org:443; No error

I was able to get the correct IP for bitbucket.org via nslookup, and I was able to access both HTTP and HTTPS in a browser. Going verbose didn’t reveal much new information either:

$ GIT_CURL_VERBOSE=1 git push --set-upstream origin feature/select-account-dialog:feature/select-account-dialog
  * Couldn't find host bitbucket.org in the _netrc file; using defaults
  * Adding handle: conn: 0x36b570
  * Adding handle: send: 0
  * Adding handle: recv: 0
  * Curl_addHandleToPipeline: length: 1
  * - Conn 0 (0x36b570) send_pipe: 1, recv_pipe: 0
  * About to connect() to bitbucket.org port 443 (#0)
  *   Trying 131.103.20.168...
  * Timed out
  *   Trying 131.103.20.167...
  * Timed out
  * Failed connect to bitbucket.org:443; No error
  * Closing connection 0
fatal: unable to access 'https://{account}@bitbucket.org/{project}/{repo-name}.git/': Failed connect to bitbucket.org:443; No error

Then I noticed the Cisco VPN client icon in the taskbar…I was connected to a VPN. Disconnected, and the push was successful. Hope this helps someone else out there.

Haping coding. Smile

Team Foundation Error – BasicAuthCredential is not marked as serializable

I was working on a project hosted in a git repo in Team Foundation and wanted to update the build process. Scroll down for two different fixes if you’ve got the error, or read on to see if it’s applicable to your situation.

When I navigated to the step to configure the process template parameters, I ran into the following error:

image

The text was:

Team Foundation Error – Type ‘Microsoft.TeamFoundation.Client.BasicAuthCredential’ in assembly ‘Microsoft.TeamFoundation.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=’[token] is not marked as serializable.

I’m not aware of any recent changes or updates to my machine, my dev environment or the TFS server in question. I tried restarting Visual Studio, but the error persisted.

I then remembered that about three months ago I ran into a similar problem (though I can’t quite recall if it was the same error) when I started using a VM that had a co-worker’s credentials pre-baked into VS. To fix this problem I removed the credentials in Windows, and it resolved the issue, prompting me to sign in as myself when I next launched VS.

Solution 1 – Reset Your Credentials

Rather than removing the account, I wanted to first try to just poke it by re-entering my password or  To reset your credentials, try this:

  1. Close all instances of Visual Studio.
  2. Tap your Windows key, then type “Credentials”. The Credential Manager app link should show up in your list.
  3. Check out your “Windows Credentials”. Under Generic Credentials, you should see your TFS account.
  4. Click on the twirldown next to the entry and select “Edit”.
  5. Retype your password.

Solution 2 – Delete the Credentials from Windows

imageIf the reset doesn’t work, you can try this instead.

  1. Close all instances of Visual Studio.
  2. Tap your Windows key, then type “Credentials”. The Credential Manager app link should show up in your list.
  3. Check out your “Windows Credentials”. Under Generic Credentials, you should see your TFS account.
  4. Click on the twirldown next to the entry and select “Delete”.
  5. You may need to do this for more than one account, especially if you have a git:http:// account saved as well.
  6. Confirm the delete operation.

Whichever solution you have to go with, this should fix things up. Note that in solution 2, you’ll be prompted for your credentials when you open up Visual Studio and try to navigate to a team project.

Cheers, and happy coding! Smile

Day 2 – Adding Entities to a Storage Account Table

In this series we are looking at the basic mechanics of interacting with cloud-based Table Storage from an MVC 5 Application, using the Visual Studio 2013 IDE and Microsoft Azure infrastructure.

We’ve got some basics in place, namely loading up all resources from a table, but it turns out that users want to be able to add records, too. Who knew?  To allow this to happen, we’re going to need to update our view a little and add an appropriate method on our controller.  Let’s make that happen, then we’re going to take a look at why our approach is breaking down.  Don’t worry, we’ll start fixing things up in Day 3!

Updating Our View

We’re going to keep working off of the view we created in Day 2, just simply by adding a form below the existing UI. 

<h2>Like Kittehs? Add a Kitteh!</h2>
@using (Html.BeginForm("Index", "Home", FormMethod.Post))
{
    <div class="form-group">
        <label for="ImageUrl">What kind of Kitteh is it?</label>
        <select class="form-control" name="PartitionKey">
            <option value="FunnyKittehs">Funny Kitteh</option>
            <option value="CuteKittehs">Cute Kitteh</option>
        </select>
    </div>
    <div class="form-group">
        <label for="RowKey">Kitteh Name</label>
        <input type="text" class="form-control" id="RowKey" name="RowKey" placeholder="SeriousKitteh">
    </div>
    <div class="form-group">
        <label for="ImageUrl">Image URL</label>
        <input type="url" class="form-control" id="ImageUrl" name="ImageUrl" placeholder="http://awesomekittehs.org/pic1.jpg">
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
}

If you’re new to Bootstrap, it may seem like there’s a lot going on there, but you get used to it pretty quickly. Our form has three “groups” in it.  This is a construct in Bootstrap that allows us to associate controls and labels and get the CSS styling we expect.   Each form group has a label and a control, in our case, and we’re simply putting in the properties we need in order to create a new row in our Azure Table.

The form is configured to POST to the Index action on the Home controller, so let’s set up someone to answer when the calls start coming.

Updating Our Controller

The next piece is just as easy. We want to accept the form information (our controller will leverage MVC’s model binding) and then create a new entity in the Table.

[HttpPost]
public ActionResult Index(KittehEntity entity)
{
    var storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));

    var client = storageAccount.CreateCloudTableClient();
    var kittehTable = client.GetTableReference("PicturesOfKittehs");

    var insert = TableOperation.Insert(entity);
    kittehTable.Execute(insert);
            
    var kittehQuery = new TableQuery<KittehEntity>()
        .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "FunnyKittehs"));

    var kittehs = kittehTable.ExecuteQuery(kittehQuery).ToList();

    return View(kittehs);
}

The insert is a type of TableOperation that we get by calling the static method aptly named “Insert” and passing in our entity. Our kittehTable object here is created in the context of a table reference that we load from our storage account by name.

At the tail end of the insert operation, we reload the list of kittehs (everyone is here to see the kittehs, after all) and return the view to render the list.

It’s Falling Apart!

Good grief, Charlie Brown, you’ve repeated all your code!  Our controllers should handle the mapping of requests and related payload to service endpoints, and direct users to the correct views.

Putting application logic into our methods is a dangerous slope, and anytime our actions start doing more than one thing we start making it hard to test and maintain our software.  This is ungood.

Next Steps

A lot of times tutorials and blog posts fall short in the area of best practices, and I don’t want to go there for this one. In tomorrow’s exercise we’re going to break our problem down into better pieces that more accurately represent what you’d be doing in a real-world application.

Microsoft Virtual Academy – A Lap Around Azure Websites – All the Questions and Links From the Talk

On January 14th, 2015 Jon Galloway and Cory Fowler presented a live “Lap Around Azure Websites” on Microsoft Virtual Academy. I was the online “Community Expert” for the live event and fielded questions in the chat.

The Links Shared from the Session

Some questions were more easily answered just by sharing a link! Here are the links that I mentioned in the chat or that were cited by Jon and Cory:

As well, here are some other really great MVA sessions you should take advantage of:

  • Building Apps with Node.js Jump Start (Course)
  • Introduction to Creating Websites Using Python and Flask (Course)
  • What’s New in Visual Studio 2013 Jump Start (Course)
  • Microsoft Azure Fundamentals (Course)

And, if you’re into the whole reading thing, I published a book on Azure Websites that is still really relevant, in spite of all the new features and changes the portal’s seen.

The Common and Predominant Questions

I grabbed the questions that stood out the most from the chat and am posting them below, along with my answers.

Can Javascript run on .NET platform also?
No, JavaScript doesn’t run natively on .NET. But Azure != .NET, and Azure Web Sites has many options for web stacks, including Node.js. Remember that JS has traditionally been a client-side language, so it of course can be used in any web application created with .NET

Do we need SDK’s and command line tools with Visual Studio 2015 Preview.
No, you don’t need it. But the SDK adds some extra (really useful) tooling, and the command line tools gives you options from a console or PowerShell script.

What are your thoughts on using WebMatrix? How does it compare to VS in terms of workflows you are going to talk about?
WebMatrix is a great tool for working with non-.Net stacks and has language support beyond what you’ll find in VS. However, if you’re working with .NET langauges (as well as many other non-.NET languages), VS gives you probably the IDE experience, hands-down.

When signing up for the free trial on Azure Websites it still asks me for entering my credit card details on the trial registration page. Is it going to charge me?
Even if they do collect the CC info, there will no charges. By default there is a spending limit of $0 on your account. Unless you remove that, there will not be any charges incurred. You can sign up with confidence!

How can you deploy to two Azure websites? One for Staging and another one for Production.
The easiest way is to use two different branches in source control, then you can automate everything about deployment to two entirely different websites. You can use slots and swapping to help with this.

My trial period has expired and I have converted my subscription to Pay-As-You-Go subscription. When will I have to pay something?
You’ll have to pay if you want to start adding “real-world” value to your project. Things like scaling, dedicated domain names, load balancing and the like.

Are MySQL databases hosted on Azure the same as SQL server? What’s the deal with these 3rd party partners? How is it different?
The third-party DB providers are from partners that may or may not use Azure resources. They provide an integration mechanism with Azure, but don’t necessarily spin up Azure resources. With MySQL, you just need a connection string to get at the data. It is not hosted on the same server as Azure SQL. And in the case of ClearDB, they are actually hosted on an Azure cluster.

Should a team have their GIT repository in VS online or Azure for an Azure site?
There is no preference. In fact, I have on-prem git repos, VS Online hosted and even repos (the majority) hosted on GitHub. You are free to choose what works with your team.

Should I add my packages to .gitignore when working with GitHub and Azure Websites? Does Kudu install the packages for me? If so, wouldn’t it be faster to deploy by NOT adding the packages to .gitignore?
It’s possible that you might save time, but deploying to different regions may mean greater latency as you deploy. Local cached packages can be quickly retrieved by Kudu, which could result in time saving for you.

Can I use the Kudu webhooks with a local githook from my Git repo? 
The webhook endpoint is exposed in the API, you can read more about it here.

How do deployment slots work? Can I use separate databases for different slots?
Slots can have their own configuration, so if you need different connection strings for the alternate slots, you can do that. This is also true of app settings and the like.

What does Kudu do?
Kudu is the deployment engine that powers Azure Websites. It’s grown into a great set of services that allow you to manage and customize your deployment process. There is a public API you can use in your own projects, integrate with other web hooks and more.

How does the Kudu Console work in the Browser?
The cool bits to me (as a developer) is the continuous connection to the browser from the server. That’s all powered by SignalR, which is another open source project started by some MS folks. You can find the SignalR GitHub repo here.

What are the costs related to turning on tracing?
There is a very small percentage of a performance hit, but nothing really in terms of monetary costs, it’s included in the platform. The one potential thing to watch for is that there is a cap on website space and the logfiles will count towards that.

How do I analyze the data from my error logs on my site?
You can use the built-in support site from the scm sub-domain on your site. Just navigate to <yoursite>.scm.azurewebsites.net/support and select your hostname. From there, you can drill in and see error and troubleshooting information.

Can I use .NET 3.5 on Azure Websites?
Yes, this is an option from the configuration menu. The only trouble I’ve had in moving to AW is when you have legacy third-party components that need access to unsafe memory or the registry (not supported on websites).

Day 1 – The Basics of the Basics with Azure Table Storage

In this series we are looking at the basic mechanics of interacting with cloud-based Table Storage from an MVC 5 Application, using the Visual Studio 2013 IDE and Microsoft Azure infrastructure.

Before We Get Going…

Let’s not mince words here, the best way to develop in the cloud is with the best and most up-to-date toolset that we have available. You’re going to want to grab these prerequisites as a minimum foundation for following along in this series:

Visual Studio 2013 gives us great templates to start from and by augmenting it with the SDK we also get a rich set of cloud-management features, which we’ll explore in the later parts of the series.

The Straight-Up Attack: Accessing Table Storage from Your Controller

Follow these quick steps to get started:

  • Create a new solution in Visual Studio using the ASP.NET Web Application project template
  • Right-click on your project in Solution Explorer, then Manage NuGet Packages and add “WindowsAzure.Storage” to your dependencies.
  • Alternatively, you can install the package from the Package Manager Console with the following command:
    Install-Package WindowsAzure.Storage

The project is now prepped, so now we can add the needed code bits to start building our app. Let’s start by adding the following class to our project in the Models folder:

public class KittehEntity : TableEntity
{
    public KittehEntity(string kittehType, string kittehName)
    {
        this.PartitionKey = kittehType;
        this.RowKey = kittehName;
    }

    public KittehEntity() {}

    public string ImageUrl { get; set; }
}

Next, replace the code in the HomeController with the code below. Note that you’ll need to add the namespace for the models to the usings at the top.

public ActionResult Index()
{
    var storageAccount = CloudStorageAccount.Parse(
        CloudConfigurationManager.GetSetting("StorageConnectionString"));

    var client = storageAccount.CreateCloudTableClient();

    var kittehTable = client.GetTableReference("PicturesOfKittehs");
    if (!kittehTable.Exists())
    {
        kittehTable.Create();
                
        var thrillerKitteh = new KittehEntity("FunnyKittehs", "ThrillerKitteh");
        thrillerKitteh.ImageUrl = "http://cdn.buzznet.com/assets/users16/crizz/default/funny-pictures-thriller-kitten-impresses--large-msg-121404159787.jpg";

        var pumpkinKitteh = new KittehEntity("FunnyKittehs", "PumpkinKitteh");
        pumpkinKitteh.ImageUrl = "http://rubmint.com/wp-content/plugins/wp-o-matic/cache/6cb1b_funny-pictures-colur-blind-kitteh-finded-yew-a-pumikin.jpg";

        var batchOperation = new TableBatchOperation();

        batchOperation.Insert(thrillerKitteh);
        batchOperation.Insert(pumpkinKitteh);
        kittehTable.ExecuteBatch(batchOperation);

    }

    var kittehQuery = new TableQuery<KittehEntity>()
        .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "FunnyKittehs"));

    var kittehs = kittehTable.ExecuteQuery(kittehQuery).ToList();

    return View(kittehs);
}

Admittedly, this is a bit of a naive approach because we’re mixing concerns here and putting storage access and table seeding in a single controller method, but I want to highlight the premise here without adding too much cruft. Through the rest of the series we’ll extract a service to do the heavy lifting and move back towards best practices.

What we’re doing above is the following:

  • Reading the connection string from our web.config
  • Configuring the client
  • Getting a reference to a table
  • If the table doesn’t exist (it won’t, first time), we build a batch operation and seed it with some data
  • We fetch all records with a “FunnyKittehs” partition key
  • We pass the data to the view

Now, replace the code in the Views\Home\Index.cshtml with the following:

@model IEnumerable<YourNamespace.Models.KittehEntity>
@{
    ViewBag.Title = "Home Page";
}

@foreach (var kitteh in Model)
{
    <div class="jumbotron">
        <h4>@kitteh.RowKey</h4>
        <img src="@kitteh.ImageUrl" />
    </div>
}

Note that you’ll need to update the namespace to match your project’s.

Finally, add a connection string to the AppSettings section of your web.config. This will tell our app to use the local storage emulator provided by the SDK.

<appSettings>
  <!-- other settings... -->
  <add key="StorageConnectionString" value="UseDevelopmentStorage=true;" />
</appSettings>

Finally, run the app! You should see a couple of adorable kittehs in your browser, rendered in a razor view, with data populated by the MVC controller with entities loaded from Azure Storage Tables.

Next Steps

In this post we injected a few entities into our table using a seed method, but what about adding new entities from the UI? In the next article, we’ll beef up the views and controller to allow users to add new documents to our storage account.

(Psst! If you’re just getting started with MVC and want to get your hands real dirty, check out my book on Bootstrap and the MVC Framework).

Day 0: 8 Days of Working With Azure Table Storage from ASP.NET MVC 5

Here’s a short and simple way to get started using Azure Table Storage from ASP.NET MVC 5. Following these brief, task-oriented articles will help you learn the mechanics of working with table storage and give you some pointers on how you might want to approach it in your app.

We’re going to start with the basics, a simple MVC app with a controller that builds the table, inserts a couple of rows and then displays them.

But then we’re going to expand on that, adding other operations to manipulate the data as well as the tables themselves, and then we’ll take it to the next level where we start to apply some better strategies around how we actually access the data.  After all, MVC is all about separation of concerns!

Most of these principles will apply if you need to access a storage table from other areas of .NET as well…you could just as easily apply these to Web API, a console application or your next WinForms project. By the end, we’ll have extracted the important parts out into a reusable block of code that runs equally as well with the Azure Storage Emulator in your development environment as it does in production in the cloud.

Working With Azure Table Storage – Our Agenda

Check back for more on the series in the days ahead, all the links will be posted here.

And hey, if you’d like to ramp up in your MVC skills, please check out my recent book:

banner5

There is Something you Want to Know. So Learn it.

Students, especially, take note of this because you can get all the tools for free, so this is a great way to kick-start your career. This kind of learning was not available, much less for free when I was a kid.

image

That’s it. An email address. That’s all you need to get started.

Of course, this isn’t an offering limited to students, so for you seasoned vets, give up on that treadmill and commit to four weeks of levelling up.

Okay peeps, go rock some awesome!

Shameless plug: if you’re wanting to ramp up your web-dev skills and get in on a 30 day challenge, be sure to check out my book on Bootstrap and the MVC Framework with tons of tips on CSS, JS, jQuery, and ASP.NET’s MVC 5. Each chapter is in digestible snippets that you can rock out in usually 15 minutes or less.

A Lap Around Azure Websites

If you haven’t yet started your free trial of Azure Websites – or even if it’s been a while since you have – you might be surprised to find out just how rich the offering has become. Rather than trying to catch up on your own, invest one day of time into yourself on January 14th!

Register For The Free, Live Event Here!

image

I am thrilled to be joining the two excellent presenters – Jon Galloway and Cory Fowler – on Microsoft Virtual Academy as a Community Expert to help answer questions through the day. You’ll find me in the chat room, directing you to resources, answering questions and, heck, I might even craft up a sample or two along the way. :)

UPDATE: I have posted all the links and questions/answers that came up through the session, be sure to check out the full list here.

Some Background and Some Present Day

It wasn’t too long ago that Azure Websites was an obscure beast in the cloud mix, with awkward deployment requirements, limited language and platform options and plenty of alternatives that required far less effort with better scaling options.

Today’s Azure Websites’ in equally suitable for greenfield development start-ups, enterprise migrations and hobby sites. A myriad of languages, web stacks, versatility in DB connections, a great deployment story and full integration with the world’s best IDE makes Websites a legitimate consideration for your next – or first – project.

Catch you online!