[Hippo-cms7-user] Mounts configuration

Ard Schrijvers a.schrijvers at onehippo.com
Mon Oct 3 14:15:14 CEST 2011

On Mon, Oct 3, 2011 at 2:07 PM, Jasha Joachimsthal
<j.joachimsthal at onehippo.com> wrote:

>> @Jasha and Mike : Introducing static helper classes in the HST for
>> this kind of functionality is not something that improves the HST. You
>> can find many articles on the evilness of static helper classes. It is
>> not that the HST does not contain any, however, introducing new ones
>> for this kind of look up does not make the HST more comprehensible. As
>> a matter of fact, the backing model is
>> req.getRequestContext()
>>                       .getResolvedMount()
>>                       .getMount()
>>                       .getMountProperties()
>>                       .get('propertyname')
>> It is much easier and better to have clear javadocs (which the HST
>> has), and documentation about the HST model, instead of providing
>> hundreds of facility methods (I can think of so many more. And I even
>> regret sometimes that I already added already so many to the
>> BaseHstComponent)
> I disagree with you on this point. If you want to write unit tests, it's
> easier to mock the (expected) outcome of the static helper method than
> mocking the 5 getters. Also why should I have knowledge of this (long) path
> to get a property form a request?

Because it is not a property from a request but a property from a
mount. Also note, that for the 7.7 as I already wrote before, we'll
have the general concept of channel properties, which won't replace
the mount properties but can rather be used instead of mount

Regards Ard

> Jasha Joachimsthal

More information about the Hippo-cms7-user mailing list