Re: [PW-dev] Widget factory
Status: Alpha
Brought to you by:
spadkins
From: James G S. <JG...@TA...> - 2001-06-11 21:30:06
|
Stephen Adkins <ste...@of...> wrote: >At 01:43 PM 6/11/2001 -0500, you wrote: >>Many of the examples have Widget -> method() for making a widget. I don't >>think this is as good an idea as creating an instance of a factory class and >>using that to create widgets. > >Can you clarify what examples you are talking about? Jay has some that I am aware of: > $widget=Widget->new( thaw => $stored_data ); for example. I think others have used a similar approach at times. I'm seeing more of the $wc->widget than Widget->new :/ I didn't do an exhaustive search for examples, so I might have missed some, esp. from earlier. >There are no globals in the code. >Perhaps you mean static methods in the Widget package? >(This doesn't suffer from any threading problems I am aware of.) Hmm... Not sure what the static methods get us then if we can't configure them any. Any configuration of the static methods would involve globals. I've seen both static and non-static approaches to this in the email. Static methods will come back to bite us, imho, because of either the lack in configurability or the presence of global information. >James, you're giving good input and obviously putting some good thought into >the topic. >I just don't know what you're talking about in this email. Well, I've seen us be inconsistant as a group, so I wanted to make sure everyone was on the same page. -- James Smith <JG...@TA...>, 979-862-3725 Texas A&M CIS Operating Systems Group, Unix |