In our system most of the code is in an asp.net (2.0) web site, I discovered Castle Monorail a few month ago and I think it’s really easier to use than asp.net / webforms.
Here is what we need :
– Use Castle Monorail
– Our code must be in the website (my chief is a kind of old school web developer so he prefer to have some “.cs” files than one “.dll”).
– We have to keep the existing webforms code
So maybe if you have a tutorial or something like that (I found a lot of tutorial about asp.net MVC and castle monorail but I did find any with asp.net 2.0)/
Merci les collegues
So it was pretty simple (15 min top) :
1/ Get the element that you need from web.config :
– config section handler
-Configuration itself
“App_Code” is the name of the web site assembly.
-http handlers
-http modules
2/ Take the dll that you need, in my case (I don’t use activerecord) :
Castle.Components.Binder.dll
Castle.Components.Common.EmailSender.dll
Castle.Components.Common.TemplateEngine.dll
Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.dll
Castle.Components.Validator.dll
Castle.Core.dll
Castle.MonoRail.Framework.dll
Castle.MonoRail.Framework.Views.NVelocity.dll
Castle.MonoRail.ViewComponents.dll
3/ Add a class in your App_Code folder (for instance TestMonorailController) :
using Castle.MonoRail.Framework;
4/ Add a Views folder in the root of your website
5/ Add a TestMonorail folder in the folder you just created
6/ Add a file name “OnePage.vm” in this folder :
7/ Test your website :
http://localhost:XX/YourWebSite/TestMonorail/OnePage.rails
and you should see
“TEST”
Et voila 🙂 I can edit my production code. Thx Ken