C# web application release strategy

I'm currently working on setting up a release strategy for our C# web apps.
All our source code is kept safe by subversion. My goal is to accomplish the following:

  • Automate release builds of all our websites
  • Create per-environment and per-server builds with relevant configuration (eg our staging servers and live servers log to different databases)
  • Enable a simple installation of the latest builds to our remote live servers
  • Be able to tell easily what version of the site is running on our servers
  • Be able to relate the current installed version to a subversion number

My testing so far has lead me to some BATch files running MSBUILD over my sites and some NSIS scripts that compile all the files into a single EXE for easy installation. It's coming on well but I still have some way to go.
If anyone has any recommendations I'd love to hear them!
PS NSIS is fantastic! If you ever need to create any installers, try it!!

Mate tutorial - abstracting the business logic/data communications and presentation

As promised, here's an example of the business/presentation abstraction in Mate.

Read-only bindable getter

It's fairly easy to setup data binding with setters/getters, but quite often you don't want to give the developer write-access to your properties. Flex Builder will throw a warning if you don't have both a setter and a getter and you're specifying the property to be bindable.
The solution is to manually fire an event when the property changes. This event then causes Flex to fire the binding event that causes a property update.
private var _myProperty:String = "";
 
[Bindable (event="myPropertyChange")]
public function get myProperty():String {
return _myProperty;
}
 
public function doSomething() {
_myProperty = "New string";
dispatchEvent(new Event("myPropertyChange"));
}
Generally, doSomething() will get called from somewhere else in your code, and your view (or whatever) will bind to the read-only getter.

Flex Builder 3 - project references

Simply put, they don't work!!
If you've ever developed a Java application in Eclipse, you'll be well aware that if you set a project reference of Project B in Project A, the code in Project A will be able to "see" the code in Project B.
However, Flex Builder (which we all know is based on Eclipse) does not work this way. You have to manually add Project B's source directory to Project A via the Flex Build Path project settings. The most frustrating part of this is that Flex Builder stores the actual directory of the other project, so if you have multiple developers working off a single codebase, it's highly likely that each developer will have to change the source path to match their environment.
Shame, eh?

Mate - abstracting the business logic/data communications and presentation

When I first wrote about Mate vs Cairngorm, the main concern I stated with both was that in any MVC architecture there's little consideration given to splitting out the data/business code from the presentation code.
Here is my solution.

Mate gotcha - events not being picked up by EventMap

I've been using Mate heavily over the last few weeks and am really enjoying implementing the architecture. However there are a few gotchas that caught me out and I'll write about them here.

Flex microarchitectures - Cairngorm vs Mate

I've recently been comparing various Flex architectures for managing business logic and server communications. The two main systems I've been looking into are Cairngorm and Mate.

Custom Flex 3 Preloader

Unlike Flash movies, the Flex framework provides a preloading graphic free of charge. Whilst useful to give the user some feedback that there's nothing to see until we're fully loaded, most application developers will want to customize this. Read on for my tutorial.

Custom renderer skin inheritance in Tree and List controls

I just spent most of the day trying to figure out a problem with a custom item renderer skin, so I thought I'd write it down here in case anyone else comes across this.

Simple Flex button skin example

Flex 3 brings to us powerful skinning abilities. In this post I'll show you how to create a simple skin for a Flex button.

About the author

Matthew Butt is an experienced developer, software architect and development manager. For more information, review the About page.