Monday, February 27, 2012

Razor Added to the F#/C# ASP.NET MVC 3 Internet Project Template

There's a new version of the F#/C# ASP.NET MVC 3 internet Project Template. This version allows you to choose between the ASPX and Razor view engines.

Here's how to use it:

1. Install version 1.6+ of the project template by searching for it on Visual Studio Gallery and/or updating a version that you had previously installed.

2. Create a new project.

3. You will now see a dialog box similar to what is shown below:



While it's certainly not required in order to use this template, you can see the full source on my GitHub.

Monday, February 20, 2012

ExpectThat with CoffeeScript, Zombie, Mocha, and Node

A few posts ago, I showed how to use ExpectThat with Mocha and Node.js. Today, I'll show a simple example of using ExpectThat with Zombie.js--a full-stack testing framework.

Zombie.js

Zombie.js is a fast, headless testing framework that provides various functionality to write tests that hit your full technology stack. While I generally prefer to write more fine-grained, isolated tests, it's important to also have a few smoke tests and/or integration tests to verify end-to-end functionality. Zombie makes these kinds of tests easy, while allowing me to still use ExpectThat and Mocha.

The Example

Here's a simple example that populates two input elements and then verifies that the values of those input fields contain the expected text.


You can find the full example here.

After a few commands such as " coffee --output lib/ specs/ " and " mocha 'lib/example.spec.js' --reporter spec ", you should see an output that looks something like this:


To learn more about ExpectThat, visit https://github.com/dmohl/expectThat.

Monday, February 6, 2012

Another Way To Kick-start F# WPF Apps

Over the last few years I've announced a number of project templates that are available on Visual Studio Gallery. A few of these have provided ways to kick-start F# WPF apps. I talked about one of these templates here. While these are nice for getting acquainted with building WPF apps in F# and/or F#+C#, the files needed for the included sample app may become a bother once you have a few of these apps under your belt. Because of this, I've released an F# only Empty WPF project template (an F#/C# Empty WPF template will likely be coming soon).

To get the new template, do the following:

1. In Visual Studio 2010 or 11, navigate to File -> New and select Online Templates (or just Online if using VS11).

2. Search for "Daniel Mohl" or "F# Empty Windows App" as shown below:


3. Select the template, click OK, and agree to the install.

While it's certainly not required to use the template, you can find the full source on my GitHub.