background preloader

Development Concepts

Facebook Twitter

Configure reverse proxy with URL Rewrite and ARR for IIS. Finally, feel good to be back with one more article.

Configure reverse proxy with URL Rewrite and ARR for IIS

I’m writing about just another “developer life challenge” I faced few weeks back. We got stuck in a situation where we wanted to test our web application in IE8 and IE9. Basically I wanted to make it compatible with both the browsers. Yeah I know, being a modern web technology fan, you’ll hate me for this but it was a need since most of the legacy non technical users are still stuck on those browsers. Good thing is Microsoft is shutting down support for old browsers in upcoming years. Good bye old browsers, we will (not) miss you! Well, our web application was still in development stage. In production stage both the API and web app were supposed to be on single domain and bound to single port so we didn’t have to worry about production. Deployments Best Practices   Introduction This guide is aimed to help you better understand how to better deal with deployments in your development workflow and provide some best practices for deployments.

Deployments Best Practices  

Sometimes a bad production deployment can ruin all the effort you invested in a development process. Having a solid deployment workflow can become one of the greatest advantages of your team. Before you start, I recommend reading our Developing and Deploying with Branches guide first to get a general idea of how branches should be setup in your repository to be able to fully utilize tips from this guide. An introduction to version control   If you are interested in version control, but have not made the jump yet, the most common reason we’ve heard is how confusing it seems.

An introduction to version control  

The best place to start if you are new to version control are the basic concepts. Why is version control important? If you are reading this, it’s possible that you are updating documents that look something like this: index-v12-old2.html. Let’s get away from this and on to something that will not only allow you to control your source code and files, but become more productive as a team. If this sounds familiar: Communicated with your team via email about updates. You can now look forward to this instead: File names and directory structures that are consistent for all team members. The basic concepts Tracking changes A version control system is mostly based around one concept, tracking changes that happen within directories or files. In most cases, you specify a directory or set of files that should have their changes tracked by version control.

Version control without the command line   The command line is a powerful way to use version control systems, but not everyone is as comfortable with memorizing and using text commands.

Version control without the command line  

Thankfully, there are many good GUI clients available for popular version control and operating systems. We’ve compiled a list of our favorites below, which all work well with Beanstalk. Subversion Clients Subversion is a popular choice for people who are new to version control because of it’s robust ecosystem of clients. Cornerstone (Mac, $59) Cornerstone is our favorite Subversion client for the Mac. Cornerstone is also integrated with Beanstalk, making it easier to add your repositories. Versions (Mac, $59) Working with ASP.NET Master Pages Programmatically. The topic you requested is included in another documentation set.

Working with ASP.NET Master Pages Programmatically

For convenience, it's displayed below. Choose Switch to see the topic in its original location. You can perform a number of common tasks programmatically with master pages, including the following: Accessing members that are defined on the master page, which can consist of public properties and methods or controls.Attaching master pages to a content page dynamically. Where does ASP.NET Web API Fit? With the pending release of ASP.NET MVC 4 and the new ASP.NET Web API, there has been a lot of discussion of where the new Web API technology fits in the ASP.NET Web stack.

Where does ASP.NET Web API Fit?

There are a lot of choices to build HTTP based applications available now on the stack - we've come a long way from when WebForms and Http Handlers/Modules where the only real options. Calling a Web API From a .NET Client (C# This tutorial shows how to call a web API from a .NET application, using HttpClient.

Calling a Web API From a .NET Client (C#

In this tutorial, we will write an app that consumes the following web API. To learn how to implement this API on the server, using ASP.NET Web API, see Creating a Web API that Supports CRUD Operations. For simplicity, the client application in this tutorial is a Windows console application. HttpClient is also supported for Windows Phone and Windows Store apps. For more information, see Writing Web API Client Code for Multiple Platforms Using Portable Libraries Create the Console Application Start Visual Studio and select New Project from the Start page.

In the Templates pane, select Installed Templates and expand the Visual C# node. Install the Web API Client Libraries Use NuGet Package Manager to install the Web API Client Libraries package. From the Tools menu, select Library Package Manager, then select Package Manager Console. Sending HTML Form Data: Form-urlencoded Data. Part 1: Form-urlencoded Data This article shows how to post form-urlencoded data to a Web API controller.

Sending HTML Form Data: Form-urlencoded Data

Download the completed project. Overview of HTML Forms HTML forms use either GET or POST to send data to the server. The method attribute of the form element gives the HTTP method: The default method is GET. Part 1 of this article looks at x-www-form-urlencoded format. Sending Complex Types Typically, you will send a complex type, composed of values taken from several form controls. Namespace FormEncode.Models{ using System; using System.ComponentModel.DataAnnotations; public class Update { [Required] [MaxLength(140)] public string Status { get; set; } public DateTime Date { get; set; } }} Here is a Web API controller that accepts an Update object via POST. This controller uses action-based routing, so the route template is "api/{controller}/{action}/{id}".

Walkthrough: Using ASP.NET Routing in a Web Forms Application. The topic you requested is included in another documentation set.

Walkthrough: Using ASP.NET Routing in a Web Forms Application

For convenience, it's displayed below. Choose Switch to see the topic in its original location. This walkthrough shows how to modify an existing ASP.NET Web site to include ASP.NET routing features. At the end of this walkthrough the site will have three new Web pages. Hyperlinks in one of the new pages link to the other two pages by using routes. This walkthrough shows how you can do the following with a minimum amount of code: Define custom URL patterns that are not dependent on physical file names.Generate URLs based on route URL parameter values by using markup or code.

Introduction to Test Driven Development (TDD) Test-driven development (TDD) (Beck 2003; Astels 2003), is an evolutionary approach to development which combines test-first development where you write a test before you write just enough production code to fulfill that test and refactoring.

Introduction to Test Driven Development (TDD)

What is the primary goal of TDD? One view is the goal of TDD is specification and not validation (Martin, Newkirk, and Kess 2003). In other words, it’s one way to think through your requirements or design before your write your functional code (implying that TDD is both an important agile requirements and agile design technique).