Architecting Services for Flexibility and Growth

Thu, 18 Jan 2018 14:06:00 GMT

The simplest way to ensure that the API your services expose to your consumers is to not let consumers access your services -- at least, not directly.

Architecting Services with Design Patterns

Tue, 02 Jan 2018 19:08:00 GMT

As the number of your services expands you're going to need to start thinking about how to organize them. Applying these two design patterns can help, provided you understand all their variations.

Managing Temporal Data in SQL Server 2016 and Azure SQL Database

Thu, 14 Dec 2017 17:00:00 GMT

SQL Server 2016 and Azure SQL Database both give you tables that automatically keep track of the history of your data. Here's how to retrieve that historical data.

Tracking History in SQL Server 2016 and Azure SQL Database

Tue, 12 Dec 2017 14:32:00 GMT

SQL Server 2016 and Azure SQL Database both give you tables that automatically keep track of changes to your data. Here's how to both create those tables and alter existing tables so they track the history of your data.

Retrieving and Updating JSON Objects in SQL Server 2016

Tue, 14 Nov 2017 18:29:00 GMT

With SQL Server 2016, you can store JSON objects in your rows. Here’s how to work with JSON objects, including how to update them once you’ve found them.

Building the Object Model You Want with Entity Framework

Thu, 09 Nov 2017 20:45:00 GMT

When it comes to inheritance, relational database theory and object-oriented programming have more in common than you might think. Understanding that overlap is critical in designing the object model that will generate the database design your application needs.

Querying JSON Data in SQL Server 2016

Thu, 19 Oct 2017 20:33:00 GMT

With SQL Server 2016, it now makes sense to store JSON objects in your database (even though there’s no JSON datatype). Here’s how to query JSON properties to find the rows you want.

The Heisenberg Developer

Tue, 03 Oct 2017 14:06:00 GMT

There’s a potential security exploit that ASP.NET MVC leaves you open to. However, in Peter’s opinion, all the proposed solutions miss the point.

An Encryption Strategy

Thu, 28 Sep 2017 22:27:00 GMT

Encrypting data that you want stored in your View and returned to you when the user clicks the Submit button has its own special problems. Here’s a complete solution and, as a bonus, an Encryption object you can use anywhere.

Working with JSON in SQL Queries

Tue, 19 Sep 2017 14:15:00 GMT

SQL Server 2016 lets you treat JSON objects like rows in a table, allowing you to use data from AJAX queries in joins, updates and any other SQL statement you can think of.

Returning Simple Strings from Action Methods

Tue, 12 Sep 2017 14:40:00 GMT

When you want to return a string result -- either as text, HTML or XML -- then a ContentResult object gives you the right balance of simplicity and control.

The Future of Programming

Tue, 05 Sep 2017 20:52:00 GMT

If you’ve been programming long enough, then you know that the "right way to do things" keeps changing. Here’s why, a description of where we are now and a guess about where we’re going.

Quick Tip: Read the Inner Exception!

Thu, 31 Aug 2017 14:31:00 GMT

That's often where the real problem is.

LocalDB: The Database Without a Connection String

Tue, 29 Aug 2017 22:29:00 GMT

If you just want to get going with a code-first database, you don't even need to define a connection string -- just write your objects.

Exploiting the Validation Tools in ASP.NET MVC

Mon, 28 Aug 2017 20:30:00 GMT

Your users will make mistakes ... but it would be a mistake to treat all their errors the same way. You can get more out of ASP.NET MVC's validation infrastructure just by paying attention to how you name your errors.

Returning JSON from SQL Server Queries

Thu, 24 Aug 2017 13:39:00 GMT

With JSON now the default format for moving data between clients and servers, SQL Server adds JSON support to make it easier to get your data out of the database and down to the client.

Improving Feedback When Editing HTML

Fri, 07 Jul 2017 18:51:00 GMT

Get Visual Studio to be more helpful when you're working with HTML.

Send the Right Error Information with HttpException

Fri, 30 Jun 2017 22:31:00 GMT

When something goes wrong with your Web Service the decent thing to do is to return your errors in a variety of ways.

AJAX Without JavaScript

Thu, 29 Jun 2017 03:31:00 GMT

You like the idea of an AJAX application, but would rather not write the JavaScript yourself. You're in luck: ASP.NET MVC provides two tools that write the client-side code for you. And these tools even make sense if you’re comfortable with writing your own JavaScript.

Accept HTML and Script from Your Web Pages

Thu, 22 Jun 2017 22:07:00 GMT

Sensibly, ASP.NET MVC 5 prevents users from entering HTML or Script tags into your page's textboxes, protecting you from a wide variety of hacks. However, for those rare occasions when you do need to let the user enter tags, here's how to do it.

Calling Web Services with HttpWebRequest, WebClient and HttpClient

Tue, 13 Jun 2017 18:27:00 GMT

The .NET Framework gives you three different ways to call a Web Service. However, depending on your scenario, the latest and greatest object isn’t necessarily your best choice.

Add a Multi-Select ListBox or DropDownList to Your ASP.NET MVC View

Fri, 09 Jun 2017 18:02:00 GMT

Peter doesn't like them, but that doesn't mean you have to hate 'em, too -- here's how to add a listbox or dropdown list to your View that lets users select multiple items.

Reduce Overhead When Retrieving Objects with Entity Framework

Wed, 07 Jun 2017 17:34:00 GMT

If you're only retrieving an object so that you can read its data, you can reduce your costs by turning off Entity Framework tracking. Which is exactly what you want to do in ASP.NET MVC, as long as you're careful.

Leverage Global Filters and the HandleError Attribute in ASP.NET MVC Apps

Fri, 02 Jun 2017 22:00:00 GMT

Here's how to combine adding HandleError attributes to your ASP.NET MVC application both through Global Filters and adding them directly to your Action methods.

How I Approached Gaining Microsoft Certification

Tue, 30 May 2017 17:00:00 GMT

If you’re thinking about pursuing a Microsoft Certification, here’s how and why Peter went through the certification process for the second time, including his feedback on some of the resources available to you.