The test sites are for testing. Putting the test site there would mean adding it to the build process etc. Now I can test views rendering, without having a full site in place (see AspView.Tests/RenderingTests). As for serving as a feature showcase - that's a whole other thing. I'm thinking to put it back in the contrib for that purpose. Make sense? (btw - now that Contrib is publicly open, anyone can do that ...)
04:22AM Monday, Jul 21, 2008
Igor Loginov
Said:
Ken,
Sorry, I don't know the right place to ask this my question - is AspView available as a standalone template engine, outside Castle Monorail ? I am not a big fan of MVC but would like to try AspView in some simple scenario.
@Igor: Every place is good for questions. That's the way to share knowledge.
Now, to your question: AspView is actually two separate things: 1. A compiler turning template code into a CLR classes that can render some text output given ProperyBag data
2. A runtime for making the said classes act as views on behalf of MonoRail.
Generally speaking, you should be able to take the compiled views, new() them with mocked context, and have them spit the output for your inspection. Something like this is being done in the test suite for AspView. take a look at http://svn.castleproject.org:8080/svn/castle/trunk/MonoRail/Castle.MonoRail.Views.AspView.Tests/RenderingTests/IntegrationViewTestFixture.cs
03:43PM Saturday, Aug 23, 2008
Igor Loginov
Said:
Ken,
I have made a first try - AspView claims dependencies on Castle.Core and Castle.Monorail.Framework. Does it mean that I cannot avoid referencing part of Castle? Package I used is AspView-1.0.4.400-Release.zip from aspview.com
@Igor - That's an oldie :) It'd be better for you to look up the newest version from castle's trunk.
Anyway, it is dependant on Castle, and there's nothing you can do about it as it is. However, what you are actually looking for is the compiler bit only. And the compiler is pretty straight forward thing, converting the template into a series of Output(string) methods. You can take out the compiler bits, remove the stuff that has to do with MonoRail (like dealing with view components, subviews, layouts etc.) and keep the bits that transform the <% %> directives etc. into a c# code.
12:10PM Sunday, Aug 24, 2008
Satswap
Said:
Does ASPview has paging support with Repeater/GridComponent? Do you have samples of how to use the pagination section in the views?
The paging support is in MonoRail and in the Components. AspView, as a view-engine, is just about specifying that in the template file, just as in Brail and NVelocity. just follow the default samples for the components, and switch brail syntax to AspView's
Hello, Sorry about de off topic. I tried to download aspview from http://www.kenegozi.com/Blog/Files/download.aspx?filename=AspView-1.0.3.386-Release.zip and y recibed a file not found error, can you tell from where can I get the last version for castle RC3 please?, thanks.
@Leonardo: I'm sorry but it looks like the file has been removed. you can fetch the source from http://svn.castleproject.org:8080/svn/castlecontrib/viewengines/aspview/trunk/, revision 386, and build yourself a release bin.