Now I see what you meant with autonomous.

I believe that vc can receive parameters, but in many situations, I
think that is pretty usefull to vc load the data itself. Like a Latest
Post Widget for example.

Cheers,
Henry Conceição



On Thu, Dec 2, 2010 at 5:51 AM, Symon Rottem <[email protected]> wrote:
> If a VC is to be autonomous then any data its going to use should be passed
> in as parameters.  This makes sense if a VC is to be reusable.
>
> Cheers.
> Symon.
> Symon Rottem
> http://blog.symbiotic-development.com
>
>
> On Thu, Dec 2, 2010 at 1:15 AM, John Simons <[email protected]>
> wrote:
>>
>>  Henry,
>> What do u mean by " In fact, they should be able to handle actions" ?
>>
>> Also,
>> You mention that VCs should be autonomous, but then you also say that they
>> need to be aware of httpcontext and the parent controller and view context,
>> IMO you can't have both, they negate each other!
>>
>> >Imo, the ActionHelper approach is an alternative, for simpler scenarios
>> > that you want only to render a partial view.
>> Isn't this what VCs do?
>>
>>
>> I do understand there is a requirement to pass data to VCs, however I do
>> not agree with using PropertyBag or the VC accessing the parent Controller
>> to retrieve this data, to me the VC should be unaware of the host.
>> Anyway, just my view.
>>
>> Cheers
>> John
>>
>>
>> ________________________________
>> From: Henry Conceição <[email protected]>
>> To: [email protected]
>> Sent: Thu, 2 December, 2010 1:12:30 AM
>> Subject: Re: ViewComponents
>>
>> Jonh,
>>
>> I do think that VC should be an autonomous component. In fact, they
>> should be able to handle actions, but to do so we probably end up
>> creating a monster. And it should be aware of the httpcontext and the
>> parent controller and view context.
>>
>> For example: I can came up with a Searchable Grid VC that builds the
>> search based on some convention (like properties or a method exposed
>> by the Controller).
>>
>> Imo, the ActionHelper approach is an alternative, for simpler
>> scenarios that you want only to render a partial view.
>>
>> Cheers,
>> Henry Conceição
>>
>>
>>
>> On Wed, Dec 1, 2010 at 2:49 AM, John Simons <[email protected]>
>> wrote:
>> > Henry,
>> >
>> > Can we first draw the boundaries of a VC?
>> > And what exactly is trying to solve?
>> >
>> > Should a VC be an autonomous component? (you can d/l a VS and just use
>> > it in your website)
>> > Should it be aware of the request context or the parent that hosts
>> > it?
>> >
>> > These are just a few question that I think we need to have answered
>> > before going any further.
>> >
>> > In MR2 a VC is just another controller/action  being executed and its
>> > output rendered, so why have this separation at all, we could just use
>> > ActionHelper - see
>> >
>> > http://github.com/castleproject/Castle.MonoRail/blob/master/src/Castle.MonoRail.Framework/Helpers/ActionHelper.cs
>> >
>> >
>> > On Nov 30, 3:28 am, Henry Conceição <[email protected]> wrote:
>> >> Hi,
>> >>
>> >> I'm starting to scratch the View Component feature, and would like to
>> >> hear from the people here what do you think about the current (mr2)
>> >> implementation of it. What do you think that needs to be improved,
>> >> removed or maintained?
>> >>
>> >> Cheers,
>> >> Henry Conceição
>> >
>> > --
>> > 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.
>

-- 
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.

Reply via email to