Announcing IronPython View Engine for MonoRail

November 30th, 2006

I’ve used some of my spare time today to put together some proof-of-concept code on IronPython. I havent changed my opinion on IronPython, I still think the code is mess, but it is certainly moving towards a better implementation.

To integrate with IronPython I didn’t have to go beyond say, ten lines of code. The hosting API is awesome, kudos to, well, whoever thought about it. The indentation as block, though, impose some challenge, which I’m still struggling with. At the same time I’m experimenting with some ideas from nitro project. My goal is to have a view template like the following:


        <h1>Welcome <?w username ?></h1>
        <h2>Task list</h2>
        <div class="taskdiv" mr:unless="tasklist.Count == 0">
            <div class="taskbox" mr:for="task in tasklist">
                <span><?w task.Name ?></span>
                <render:partial ref="_taskdetail" with="task" />
        <h3 mr:if="tasklist.Count == 0">No tasks found</h3>

        <!-- Example of helper invocation -->
        <?w FormHelper.HiddenField("") ?>

I’m also considering some hack to have blocks working, creating an artificial “end” token.

Let me know what you think, this is the time for suggestions.

Categories: Castle | Top Of Page | 3 Comments » |

3 Responses to “Announcing IronPython View Engine for MonoRail”

Colin Ramsay Says:

By basing a new View Engine on Iron Python, what impact does that have on the Castle distribution? Are there going to be many more dlls involved or is the package size going to increase a lot?

I know nothing about Iron Python so forgive these basic questions.

hammett Says:

Well, just two more dlls and a license file.

dru Says:

hammett, that view syntax look awesome!

Leave a Reply