> I don't think specifying the layout files beforehand is a good way to
> go. This would eliminate the possibility of doing things like
> dynamically selecting a layout file from the controller (as a way of
> implementing skinning on a site for instance).
> I think it would make more sense to have the layout view generate a
> separate class from the view that is using it. That way, it wouldn't
> be an issue to dynamically mix and match them after they are compiled.
> Also, as a personal preference, I would want the views compiled into a
> separate assembly rather than have the CS files generated and become
> part of the project.
> On Aug 4, 2:00 am, "Louis DeJardin" <louis.dejar...@gmail.com> wrote:
> > Yeah, that would be ideal. I believe pre-generating all of the view cs
> > files is something nhaml does as well.
> > But the big question is how do you know what set of view/master
> > combinations need to be generated? You could have an inventory xml
> > file list them all, but that seems out of step with "don't repeat
> > yourself".
> > Though maybe that could just be the nature of the thing. You have to
> > name what you want to precompile.
> > Or instead of an inventory xml file maybe the spark view files could
> > have a <precompile master="blah"/> element? That way you could spin
> > through all of the files on startup.
> > After that you could have a compile-time tool that generates the all
> > of the view cs files to include in the web project. Or would it be
> > better to compile a different assembly to contain all of the view
> > classes rather than assuming they'll be compiled directly into the web
> > app?
> > On 8/3/08, Chadly <chadl...@gmail.com> wrote:
> > > One thing that I think would be nice would be to have all Spark views
> > > compile at once at application start -- rather than having each view
> > > compiled only when it is requested. That way, when there is a
> > > compilation error in one of your views, you would know about it as
> > > soon as you ran the site -- since no pages would work until all views
> > > successfully compiled.
> > > This could also open the door for precompilation options for when you
> > > are deploying a site?