"Pit Capitain" <pit / capitain.de> schrieb im Newsbeitrag
news:3ECA8A4E.10891.1BF8A8FC / localhost...
> On 20 May 2003 at 2:28, Mauricio FernŠŌdez wrote:
>
> > Crap, I don't remember what should be done w/ shared attributes.
> > I'll see if I can get my book sent here :)
> >
> > Ummm, now I remember something about internalizing information and
> > the applicability of the State DP... really need the book.
>
> Why not use the internet? A quick Google search revealed
>
>   http://www.dofactory.com/Patterns/Patterns.aspx
>
> which has code in C# but should be helpful to you. I'm sure there's
> lots of other sites too.

Thanks for the link.  But honestly, I don't like the examples - not just
because method names start with uppercase letters and thus decrease
readability.  I find it awful that all relevant state info (balance) must be
transferred to the next state instance.

The non realworld example used the "yield the context with every method
call".  But both change the state instance of the Context (Account)
directly.  And the state is a public member, which doesn't fit my
understanding: the state logic should be completely internal IMHO.

Regards

    robert