# Wednesday, July 23, 2008

I decided to spend the day creating Spectacle.

Spectacle is a spec-driven/bdd/{buzzword-of-choice} embedded DSL for Nemerle. It creates NUnit compatible test fixtures from very human readable code.

So in the spirit of release early, etc...
Project site: http://www.assembla.com/wiki/show/spectacle
Also: 3 minute screencast:
http://screencast.com/t/4dPdsg35Uj
You'll probably be needing to the pause to read stuff!
Enjoy :) all feedback is welcome.

An example spec:

spec "Account with 100"
    account = Account(100)

    getting account.Balance returns 100

    doing account.Deposit(100) means
        account.Balance == 200

    doing account.Withdraw(50) means
        account.Balance == 50

    doing account.Withdraw(200) throws ArgumentException

Wednesday, July 23, 2008 5:41:23 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 
# Sunday, July 13, 2008

Sending data from a resource to a view in a strongly-typed, but syntactically lightweight manner is not possible with C# or VB.NET.

So check out this screencast of the new "render" macro in NRest!

In a nutshell, my resource looks like:

[Resource("")]
public class RootResource
{
    public Get() : void
    {
        def test = 42;
        render (Foo = "Hello", Bar = "World", test);
    }
}

My VB.NET view looks like:

Public Class RootPage
    Inherits Page(Of RootPageContent)

    Public Overrides Function GetHtml() As XElement
        Return _
        <html>
            <body><%= Content.Foo %>, <%= Content.Bar %></body>
        </html>
    End Function
End Class

The RootPageContent DTO class is generated at compile time by the render macro. Everything is strongly-typed.

.net | dsl | macro | nemerle | nrest | REST | web
Sunday, July 13, 2008 3:27:17 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, July 02, 2008

This is a very quick video showing the work I've been doing with Nemerle, ASP.NET routing and VB 9 XML literals.
I'm trying to find the most efficient way to create RESTful web applications. I'm willing to use all the tools in the box and even make my own to achieve this.

.net | nemerle | REST | screencast | vb.net
Wednesday, July 02, 2008 11:19:24 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  |