Thread: 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 |
From: James G S. <JG...@TA...> - 2001-06-11 22:09:48
|
"Jay Lawrence" <Ja...@La...> wrote: >I've gotta claim ignorance on what you guys are talking about when you're >refering to factories and controllers. Controller is just a specific name for a factory in this case, except the controller has certain configuration information the widgets can reference. For example, the controller knows what rendering environment to use or which state object to use by default. At least in my email, I use the two terms controller and factory interchangably. >Personally - I expected that I'd instanciate what ever widgets I the app >developer wanted, fill their properties at instanciation or afterwards, and >then call their methods when I needed something from them. The controller/factory does some of this for you when you use it to create widgets. >I guess the purpose of having a controller or factory is to aid in this >process? Possibly provide other services? Maybe I am thinking that >controller code is slightly beyond scope of widgets. -nod- The controller/factory handles configuration issues that are pan-widget, basically. The dictionary, state object, and rendering environment are controlled by the controller/factory in my code. The factory also knows where to find the widget classes (Widget::* or some other configurable base module name). -- James Smith <JG...@TA...>, 979-862-3725 Texas A&M CIS Operating Systems Group, Unix |
From: Jay L. <Ja...@La...> - 2001-06-11 21:50:51
|
I've gotta claim ignorance on what you guys are talking about when you're refering to factories and controllers. Personally - I expected that I'd instanciate what ever widgets I the app developer wanted, fill their properties at instanciation or afterwards, and then call their methods when I needed something from them. I guess the purpose of having a controller or factory is to aid in this process? Possibly provide other services? Maybe I am thinking that controller code is slightly beyond scope of widgets. Perhaps more detail on what you guys see happening here would be of value not just to me but us all. Jay From: "James G Smith" <JG...@TA...> > 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 > > > > _______________________________________________ > Perl-widget-developer mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-widget-developer > |
From: Stephen A. <ste...@of...> - 2001-06-12 02:49:48
|
At 05:52 PM 6/11/2001 -0400, you wrote: >I've gotta claim ignorance on what you guys are talking about when you're >refering to factories and controllers. > >Personally - I expected that I'd instanciate what ever widgets I the app >developer wanted, fill their properties at instanciation or afterwards, and >then call their methods when I needed something from them. > >I guess the purpose of having a controller or factory is to aid in this >process? Possibly provide other services? Maybe I am thinking that >controller code is slightly beyond scope of widgets. > >Perhaps more detail on what you guys see happening here would be of value >not just to me but us all. > >Jay > Jay, This is a good question... even a Frequently Asked Question. Thus, I have answered it in the FAQ that I am writing. http://www.officevision.com/pub/Widget/FAQ.html Please look it over. Stephen |
From: Jay L. <Ja...@La...> - 2001-06-11 21:55:00
|
James and Stephen, Could you please expand on what you mean by static methods? Jay From: "James G Smith" <JG...@TA...> > 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 > > > > _______________________________________________ > Perl-widget-developer mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-widget-developer > |
From: Stephen A. <ste...@of...> - 2001-06-11 21:57:13
|
At 04:32 PM 6/11/2001 -0500, James G Smith wrote: >Stephen Adkins <ste...@of...> wrote: >>At 01:43 PM 6/11/2001 -0500, you wrote: >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. ... >Well, I've seen us be inconsistant as a group, so I wanted to make sure >everyone was on the same page. OK. Thanks for helping us get straight. No globals! >James Smith <JG...@TA...>, 979-862-3725 >Texas A&M CIS Operating Systems Group, Unix Stephen |