Thanks Ken for your comments I my self opt not to use routing just yet (with the project in hand) but as the feature become more and more wide spread I just need to be aware and be ready :)
Cheer On Oct 14, 3:52 am, Ken Egozi <[email protected]> wrote: > ProcessRequest is not only about instantiating the controller.you have > filters than needs to run before and after the actions > you have ViewEngineManager in the mix > you need to invoke Rescues if relevant > etc. > etc. > etc. > > however there is MonorailHttpHandler and the BaseHttpHandler, that do all > that. > you'd need to have the IRouteHandler return Monorail's http handler > > but that is for the url => action mapping. > there's also the other side: action => url creation. > that is, using the api, to supply it with a lambda of a controller action, > that will generate the URL to there (I do not use it personally) > > On Tue, Oct 13, 2009 at 5:42 PM, James Curran <[email protected]>wrote: > > > > > > > > > Diggina a bit further, this may not be that difficult after all. > > > If we add a framework base class similar to th eone I've attached > > below (hopefully GMail won't mangle it that much), then the code for > > the ProcessRequest method should be fairly simple for someone who is > > familar with the Monorail internals. That would leave handling the > > effect of GetHttpHandler in a virtual method in a derived class, which > > should be fairly straightforward for the "end-user". > > > namespace Castle.MonoRail.Framework.Routing.MSFT > > { > > using System.Web; > > using System.Web.Routing; > > > public class MonoRailRoutehandler : IHttpHandler, IRouteHandler > > { > > string Controller { get; set; } > > string Action { get; set; } > > private object[] Parmeteres; > > > #region IRouteHandler Members > > public IHttpHandler GetHttpHandler(RequestContext requestContext) > > { > > // use requestContext to initialize Controller, Action, > > and Parameter fields > > return this; > > } > > #endregion > > > #region IHttpHandler Members > > > public bool IsReusable > > { > > get { return false; } // Until a better answer is determined. > > } > > > public void ProcessRequest(HttpContext context) > > { > > // Instaniated Controller, and call Action with Paramaters. > > } > > #endregion > > } > > } > > > On Tue, Oct 13, 2009 at 9:33 AM, James Curran <[email protected]> > > wrote: > > > Not without some effort. > > > > Here's an article on using it in ASP.NET without MVC: > > >http://aspnet.4guysfromrolla.com/articles/051309-1.aspx > > > > Essentially, you would have to create a class which implements the > > > IRouteHandler interface, which mainly involves a method which returns > > > a IHttpHandler object. In ASP.NET, that would be the Page object that > > > you want to run. Hence we would need to make an adapter which would > > > wrap a Controller/Action into an IHttpHandler. > > > > On Tue, Oct 13, 2009 at 6:22 AM, c.sokun <[email protected]> wrote: > > > >> Recently I notice there is no improvement over the MonoRail built-in > > >> routing engine. > > >> Is it possible to use ASP.NET MVC routing engine with MonoRail ? > > > > -- > > > Truth, > > > James > > > -- > > Truth, > > James > > -- > Ken > Egozi.http://www.kenegozi.com/bloghttp://www.delver.comhttp://www.musicglue.comhttp://www.castleproject.orghttp://www.idcc.co.il- > הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
