As I said - the non-template functionality is per the target viewengine. You won't expect to be using MVC's html helpers in a Nancy application, so the supplied base class (WebViewPage or whatever) is irrelevant. It is also likely that Blade will also not fit an environment that abstracts (or does not use) ASP.NET's Response object, so you will not be resuing these parts anyway.
The view-engine code itself (deal with partials, layouts, sections etc.) is not a difficult task. IMO the web framework should supply that part (as well as the base-class functionality) and have view-engines implementors generate compatible codedom out of templates. AspView for example have a rather good separation between these parts, and the runtime part is almost ASP.NET free (it currently loads Request parameters into the PropertyBag and is aware of MonoRail's ControllerContext, but the first could be discarded and the latter abstracted to IDictionary) I once wanted to generalize AspView to be a generic view-engine runtime, and then plug Brail and Razor syntaxes into it, but never got the time for that. Other frameworks (fubu, rasta, Monorail, Nancy, even MVC3 assuming one wants to optimise view execution) could enjoy an optimized runtime (the thing that given compiled views, a PropertyBag and a TextWriter can render the templates), with pluggable compilers (on one side) and framework-to-property-bag-and-text-writer adapters on the other. If only I had some free time I'd have loved to work on this. Not in the coming couple of months - that's for sure Ken Egozi. http://kenegozi.com/blog http://social.sears.com http://www.musicglue.com http://www.castleproject.org http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם On Tue, Oct 4, 2011 at 7:59 PM, Sebastien Lambla <[email protected]> wrote: > The template language itself has its code in one assembly, but then most of > the functionality is actually in webpages, which is not open-source and hard > to extend, and have a non-windows platform restriction in the license. It’s > also causing a whole bunch of issues with the need to have custom build > managers in some scenarios.**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Ken Egozi > *Sent:* 04 October 2011 18:43 > *To:* [email protected] > *Subject:* Re: Castle Blade**** > > ** ** > > What parts of razor did you find troublesome to use outside of aspnet?**** > > ** ** > > It actually is made of two things. **** > > First a compiler that transforms cshtml files to codedom classes, and then > a viewengine runtime (which takes care of layouts partials and writing to > the response stream). The latter is aspnet specific however you can > customize the compiler to generate classes that would fit a custom view > engine. **** > > ** ** > > I did a proof of concept a while back for using razor files and feed them > to a monorail view engine (aspview) and it was surprisingly easy. . There > is also a project that uses razor syntax to create class templates (like > t4) **** > > ** ** > > ** ** > > > On 4 באוק 2011, at 19:21, hammett <[email protected]> wrote:**** > > git pull [email protected]:castleproject/Castle.MonoRail3.git > > And go to /src/Castle.Blade > > > > On Tue, Oct 4, 2011 at 9:13 AM, Mike Murray <[email protected]> > wrote: > > **** > > In talking with the Nancy Framework guys and Sebastien Lambla of OpenRasta, > **** > > it is a nightmare to try and support the Razor view engine on any open**** > > source web framework because of its tight coupling to ASP.NET. It's > becoming**** > > clear you can't just rip it out and use it elsewhere (thanks Microsoft). In > **** > > the FubuMVC project, we have stonewalled anyone asking for Razor support. > We**** > > would like to support the syntax, as many interested in using the framework > **** > > are asking for it and we know it would increase adoption because**** > > transitioning would be easier for most teams/companies if it were > supported.**** > > Somebody mentioned Blade, and so here I am inquiring more. :)**** > > The promise of Blade sounds enticing, 100% compatibility with Razor, some* > *** > > extra nice syntax additions, and that the quality of the codebase has got > to**** > > be in better shape than what is coming from MS. What is the current state > of**** > > Blade? Is Blade available as a standalone download separate from MonoRail? > **** > > Is it ready to be utilized in another web framework? Anything else I should > **** > > know before embarking?**** > > The vision I have is for a user to be able to download FubuMVC (from**** > > something like NuGet) and also go download Blade and have them work > together**** > > seamlessly because of a FubuMVC adapter for Blade that lets it work as one > **** > > of many possible view engines for FubuMVC.**** > > Thanks in advance.**** > > Mike Murray**** > > @mkmurray**** > > http://murrayon.net/**** > > ** ** > > --**** > > You received this message because you are subscribed to the Google Groups* > *** > > "Castle Project Development List" group.**** > > To view this discussion on the web visit**** > > https://groups.google.com/d/msg/castle-project-devel/-/T79kaSYiJY0J.**** > > 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-devel?hl=en.**** > > ** ** > > > > > -- > Cheers, > hammett > http://hammett.castleproject.org/ > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Development List" 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-devel?hl=en.**** > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Development List" 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-devel?hl=en.**** > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Development List" 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-devel?hl=en. > -- You received this message because you are subscribed to the Google Groups "Castle Project Development List" 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-devel?hl=en.
