How To


Implementing Updates Without Query

The CQRS pattern separates updates from queries, allowing you to create the best process for each of those activities. Effectively, CQRS codifies the standard practice for ASP.NET MVC developers: Here are some strategies for implementing that pattern and improving your application's performance.

Conflicts in C# and Visual Basic

Case matters when moving from one language to another and, often, variable naming conflicts can be as simple as that.

Processing All Properties on an Object

If you ever need to work with all of the properties in some object, you can use GetType and GetProperties to retrieve the object's PropertyInfo objects. After that you can do what you want. Here's an extension method that sets all those properties to their defaults, for example.

Initialize Member Variables in the Order You Declare Them

In part 4 of this series on the C++ Core Guidelines, Kate Gregory reminds you of an oddity in C++ when it comes to initializing member variables, and shows you a best practice that will make sure this oddity never hurts you.

Integrating ASP.NET MVC, React and JSX with TypeScript

Creating a form with TypeScript, React and JSX lets you generate the HTML for your form dynamically, at runtime, and on the user's computer. Here's how to integrate a data- driven form into ASP.NET MVC.

How To Programmatically Customize iOS Keyboards with C#

Developers will always look to customize everything, and keyboards aren't out of bounds. Here's how to customize the iOS keyboard that pops up in your mobile apps to address any shortcomings.

Simplifying Data Retrieval with CQRS in ASP.NET MVC

Data retrieval and updates are very different activities so the CQRS pattern says that the smart thing to do is treat them differently. Here's a variety of solutions for the retrieval side in an ASP.NET MVC application.

Generate TypeScript Classes from C# with TypeScriptSyntaxPaste

When working with TypeScript it's not unusual to need a class that matches an already existing server-side class written in C#. Here's one way to get from C# to TypeScript by doing what you normally do.

Build Interactive Tiles for Microsoft Band

Now that you know how to communicate with the Band apps, here's another twist. Let's get interactive.

Choosing the Right Constructors to Write

In part 3 of this series on the C++ Core Guidelines, we explore constructors and why, rather than writing a default constructor, you should use in-class member initializers, a feature added in C++ 11.

Simplify Code with the Visitor Pattern

You can't make a complicated problem simple. But, by leveraging the right tools in your language (and the Visitor pattern) you can ensure that your code doesn't get as complicated as your problem.

Classic Stats, Or What ANOVA with R Is All About

New to this type of analysis? It's a classic statistics technique that is still useful. Here's a technique for doing a one-way ANOVA using R.

Logic Is Your Enemy

Leveraging the right combination of object-oriented tools can keep your code simple, even as the problems you solve get more complicated.

Pressure Is On with 3D Touch in iOS Apps

Add pressure-based interactions in your apps in just a few minutes.

Don't Cast Away Const

Too few C++ developers use const properly, or enough. A seemingly-strange guideline, suggesting you never use a particular language feature, leads to some insight about const and some good practices for you.

Eliminate the Barrier Between JavaScript and HTML (or Anything Else)

The JSX tool lets you describe your page as a set of custom elements that you define in TypeScript classes. Those elements then add to the page whatever text or code makes sense to you.

Text Processing, Type Definition, I/O and Visualization in F#

What you can do with most programming languages can be accomplished in F#'s functional programming paradigm. Here's how to handle some simple operations, which might look familiar to you already.

Exploiting the ConcurrentDictionary in Asynchronous Applications

The ConcurrentDictionary provides the most efficient (and safest) way to shared named values between asynchronous processes with several powerful methods. But the best advice might be to avoid ever needing them.

Stack Up the Stream Objects to Combine Functionality

Using the Stream objects correctly can speed up your I/O, protect your files and simplify your code.

SpecFlow 2, Part Two: Gherkin Steps

In part 2, Jason will map the business-readable tests we created last time to test automation code.

Program-Defined Functions in R

The three most common open source technologies for writing data science programs are Python, SciLab, and R. Here's how to write program-defined functions in R.

Get Data to the Client and Save Server-Side Storage

You've got data on your server that you need in your page. Here are all the solutions you require, including one that will make your application more scalable.

Business-to-Developer Bridge Building with SpecFlow 2

SpecFlow 2 makes sure developers deliver what businesses say they want. In this first of a two-part series, Jason looks at how to automate the process of communication through business-readable tests.

Features That Will Matter in the Upcoming TypeScript 1.8

There are lots of enhancements waiting for you in TypeScript 1.8, including features that make it easier to move your project to TypeScript, that protect you from errors and that give you even better control over data types.

Sharing Information Between Asynchronous Processes

When you need to share a list of specific information between asynchronous processes, you probably need the ConcurrentDictionary. Except, of course, when you don't.

Subscribe on YouTube