MR3/Blade quickstart?

31 views
Skip to first unread message

Tomek Pluskiewicz

unread,
Aug 13, 2011, 1:50:07 PM8/13/11
to castle-pro...@googlegroups.com
Hi

We are starting a new project and at the moment MonoRail 2 is our MVC of choice.

But I see that MR3 is on the way which raises a few questions I'm having hard time finding an answer for;

1. How ready it is for production? I know it has been asked already but I would like a more in-depth answer.
2. What are the key differences between MR2 and MR3? Is there any MR3 or Blade quickstart/tutorial (or at least some kind of draft of such)
3. We will be using Spark, which we find much more productive than Razor, not to mention Brail or NVelocity. Would it be possible to use Spark with MR3?
4. Also what good reasons are there to use Blade and not Spark?
5. I've read on Hammett's blog about MR3's RESTfulness. We are looking forward to implementing REST services over our app in some way. Frankly we don't yet have any good idea how to best get it done with Monorail. How would it be done with MR3?

That's enough for now. I'm looking forward to constructive answeres :)

Regards
Tomasz

Tomek Pluskiewicz

unread,
Aug 13, 2011, 1:57:18 PM8/13/11
to castle-pro...@googlegroups.com
Oh I'd almost forgotten.

What about DI? Hammett wrote that MEF is the default. How much work would be required to use Windsor instead? And are there any good reasons not to?

Regards
Tomasz

hammett

unread,
Aug 13, 2011, 3:14:58 PM8/13/11
to castle-pro...@googlegroups.com
> 1. How ready it is for production? I know it has been asked already but I
> would like a more in-depth answer.

All I can say is that we're using it in a very complex project that
should go online soon. We are very aware of a few to-dos and missing
features, and we're working on them as needed.

> 2. What are the key differences between MR2 and MR3? Is there any MR3 or
> Blade quickstart/tutorial (or at least some kind of draft of such)

The differences goes back to their goal. MR1/2 was a web framework.
MR3 should make your life easier if you want to deal with REST, and
compose applications from smaller apps.

> 3. We will be using Spark, which we find much more productive than Razor,
> not to mention Brail or NVelocity. Would it be possible to use Spark with
> MR3?

It depends on whether Spark supports closures/lambdas.

> 4. Also what good reasons are there to use Blade and not Spark?

The Helper API makes heavy use of lambdas.

> 5. I've read on Hammett's blog about MR3's RESTfulness. We are looking
> forward to implementing REST services over our app in some way. Frankly we
> don't yet have any good idea how to best get it done with Monorail. How
> would it be done with MR3?

Check the ContentNegotiatedResult [1], the serialization
infrastructure [2] and the hypertext processors [3]. Do you have
requirements you can share about the Restfulness of your website?

[1] https://github.com/castleproject/Castle.MonoRail3/blob/master/src/Castle.MonoRail/Mvc/Mvc.ActionResults.fs
[2] https://github.com/castleproject/Castle.MonoRail3/blob/master/src/Castle.MonoRail/Mvc/Mvc.Serializers.fs
[3] https://github.com/castleproject/Castle.MonoRail3/blob/master/src/Castle.MonoRail/Mvc/Mvc.Rest.fs


With regard to IoC Containers, it's a common misinterpretation. MR3
does use MEF internally. It uses it at framework level. You app is
*not* running at the framework level, so it's completely independent.
At the moment we're using Windsor with our app, and it should be quite
easy to support others.


--
Cheers,
hammett
http://hammett.castleproject.org/

hammett

unread,
Aug 13, 2011, 3:17:39 PM8/13/11
to castle-pro...@googlegroups.com
One more thing. With all that said, I'm not comfortable encouraging
using MR3, unless you're ok with F#.

Btw, I'll be doing a presentation on MR3 Tuesday. Keep an eye at
http://www.communityforfsharp.net/

Tomek Pluskiewicz

unread,
Aug 13, 2011, 4:32:45 PM8/13/11
to castle-pro...@googlegroups.com
Thank you for your quick reply.

Regarding MR3 presentation. Do you mean Tuesday, 16th? The link you provided says the website moved to fpish.net, but I didn't see anything about MR3 presentation...

hammett

unread,
Aug 13, 2011, 7:24:46 PM8/13/11
to castle-pro...@googlegroups.com, Ryan Riley
Yep, at 1PM PST. But I'm considering cancelling since I'll be working
this weekend and wont be able to prepare anything.

> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/castle-project-users/-/VzjcuznnWmYJ.
> To post to this group, send email to castle-pro...@googlegroups.com.
> To unsubscribe from this group, send email to
> castle-project-u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.

Tomek Pluskiewicz

unread,
Aug 14, 2011, 1:57:30 PM8/14/11
to castle-pro...@googlegroups.com, Ryan Riley
Another quick question.

Will MR3 support View Components with sections like MonoRail does?

Regards,
Tomasz

hammett

unread,
Aug 14, 2011, 2:01:51 PM8/14/11
to castle-pro...@googlegroups.com
It already does.

> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/castle-project-users/-/jQjmmunmO5MJ.

Tomek Pluskiewicz

unread,
Aug 14, 2011, 2:04:46 PM8/14/11
to castle-pro...@googlegroups.com
Could you please give some more insight on that? Or point in the right direction in code?

hammett

unread,
Aug 14, 2011, 2:16:36 PM8/14/11
to castle-pro...@googlegroups.com
I'll leave this one to Henry. Also, could we move this discussion to
the development list?

On Sun, Aug 14, 2011 at 11:04 AM, Tomek Pluskiewicz <ploo...@gmail.com> wrote:
> Could you please give some more insight on that? Or point in the right
> direction in code?
>

> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/castle-project-users/-/lagrvB_q9OcJ.

Tomek Pluskiewicz

unread,
Aug 14, 2011, 2:21:07 PM8/14/11
to castle-pro...@googlegroups.com
Sure, I have already posted to dev list, but am awaiting moderation.

Henry Conceição

unread,
Aug 15, 2011, 3:01:25 PM8/15/11
to Castle Project Users
It don't requires any special pumbling with blade or alikes. A
property that receives a inline template will do the job:

ViewComponent.Render<Foo>(vc => vc.SomeSection = @<td> @item.Name </
td>)

And on your vc view you must invoke the property supplying the desired
arguments. With the blade support for lambdas, the sky is the limit.

It's important to note that this approach isn't restricted to blade
(or razor) views. If you can declare a inline template function with
your ve, you should be done.
Reply all
Reply to author
Forward
0 new messages