[Seaside-dev] WABuilder and Render Context

Maximilian Bareis max.bareis at me.com
Fri Aug 29 07:23:52 UTC 2014


Hi Stephan,

Actually I stumbled over this and was able to sail around, but in my opinion it is a design fault. The method WABuilder>>render: is no place to create objects, it is a place to pick together everything necessary for rendering and starting the process.

There has to be a big reason why it should be forbidden to use one main part of the rendering process (the WARenderContext) only in new state. I am still asking, what is the reason to forbid using a WARenderContext with different attributes than a plain new one?
WARenderContext has a property-attribute where you may store a lot of different properties that change the state of the context. Why is it forbidden to use them when using WABuilder?

My first change suggestion was to create a second method with 
WABuilder>>render:withContext:

and to change the current WABuilder>>render: to
	self render:html withContext:WARenderContext new.

This would not change the current status. But it would enable Builder to accept also non-virgin WARenderContext and would move away a design fault.

Regards

Max


Am 28.08.2014 um 12:39 schrieb Stephan Eggermont <stephan at stack.nl>:

> Hi Max,
> 
> Are you just trying to improve testability here?
> Or do you need a different kind of rendering context?
> And do you need to be able to change it in a builder, 
> or is it sufficient to have a 
> WABuilder>>renderContextClass
>  ^WARenderContext
> that you can override in a WABuilder subclass,
> similar to the rendererClass?
> 
> Stephan
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev



More information about the seaside-dev mailing list