Boo Language aspx .Net using xsp2 on Mono and Linux (Ubuntu)

I have been playing around with boo a little bit because it has Python-inspired syntax, runs at C# speeds and is a first class citizen on dotnet.

So I decided to find out what it would be like to do some web programming in it. I learned a bit about asp.Net in the process and mono also.

So first thing I did was:

$ cd /usr/share/doc/boo/examples/asp.net
$ xsp2

and then from your browser you can run any of the “inline” samples

http://localhost:8080/InlineBooButtonClick.aspx
http://localhost:8080/InlineBooExpression.aspx
http://localhost:8080/InlineBooHelloAspNet.aspx

but if you try and run one of the code behind samples, you get something like this:

Description: Error parsing a resource required to service this request. Review your source file and modify it to fix this error.

Parser Error Message: Cannot find type Boo.Examples.Web.YourName

Source Error:

Line 1: <%@Page Inherits=”Boo.Examples.Web.YourName” %>
Line 2:
Line 3:

The problem is the the boo source code needs to be compiled and the dll’s must be placed in a bin directory in the folder you are running xsp2 from. There is a nant build script there but after trying to hack it to get it to build, we worked out it was easier to just compile manually.ie:

$ sudo mkdir bin
$ sudo booc -t:library -o:ScriptRunner.dll ScriptRunner.aspx.boo
$ sudo cp ScriptRunner.dll bin

from your browser:

http://localhost:8080/ScriptRunner.aspx

You can then use this to play around with some boo as if it were the booshell (booish)

Thanks to Cedric for helping me out in IRC on this.Technorati Tags: , , , , , ,

Published by salubrium

I am a Systems Administrator based in Sydney, Australia with some hugely varied interests: Topics covered are Virtualization, Web Hosting, Remote Desktop, Security and Backups, PHP, Python, MVC Frameworks, SEO

Leave a comment

Your email address will not be published.