Thoughts on Software by Andrew Davey
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 27 | 28 | 29 | 30 | 31 | 1 | 2 | | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | 10 | 11 | 12 | 13 | 14 | 15 | 16 | | 17 | 18 | 19 | 20 | 21 | 22 | 23 | | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | 31 | 1 | 2 | 3 | 4 | 5 | 6 |
Search
Navigation
Categories
Blogroll
|

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)
.net | dsl | macro | nemerle | nrest | REST | web

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)
.net | nemerle | REST | screencast | vb.net