Thoughts on Software by Andrew Davey
 Sunday, July 13, 2008
Strongly Typed View Data in NRest

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.
Sunday, July 13, 2008 2:27:17 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   |  |  |  |  |  | 

 Wednesday, July 02, 2008
Quick NRest Video

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.


Wednesday, July 02, 2008 10:19:24 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]   |  |  |  |