🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18350

Re: Strategy for Object Reusing

#18350
From: Gerry Mantha
Date: Sun, 12 Jul 1998 00:00
28 lines
1980 bytes
William Yu wrote in message <35A51F85.7783B76E@Bigfoot.com>...
>Let's say you want to create AWT components that are reusable. You can't
>inherit directly from ObjectPool; otherwise, the components would no
>longer be usable.


You <could> have an AWTTextField object pool, a AWTTextArea pool, etc... why
not?  You do this my making specific pools for holding these object types by
inheriting directly from your abstract pool for each kind.

>I think I was going beyond the idea of simply inheriting reuse
>behaviors. Let's say you want to reuse a whole wide range of objects
>from AWT components to Date/Font/Color/etc. but you don't want to write
>a wrapper class for everything. Rather, have a static recycler class
>that anybody could use. (I've been looking this left and right and it
>may be unfeasible.)

I would have to say that pool reuse should be specific to types, not to
types&specific-properties.  I mean, it could be feasible if you had limited
values, but this would'nt be a very scaleable solution in my mind.  I would
reuse the types, then set the desired properties for the particular context
for which they will be used.  It's ok to get a TextField with a blue
background from the pool.... if you need it to have a red background in the
particular context, then change it to red after checking it out.


Gerry Mantha
Technical Details
Message-ID: <6ob98h$t548@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <359CBFDC.DE310722@Bigfoot.com> <6njkh0$9sj10@forums.borland.com> <35A03942.7B8BBB35@Bigfoot.com> <6nv0og$hto16@forums.borland.com> <35A51F85.7783B76E@Bigfoot.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,463db4f771a2408f
X-Google-Attributes: gidf74b3,public
From: "Gerry Mantha" <gmantha@home.com>
Subject: Re: Strategy for Object Reusing
Date: 1998/07/12
Message-ID: <6ob98h$t548@forums.borland.com>
X-Deja-AN: 370807719
References: <359CBFDC.DE310722@Bigfoot.com> <6njkh0$9sj10@forums.borland.com> <35A03942.7B8BBB35@Bigfoot.com> <6nv0og$hto16@forums.borland.com> <35A51F85.7783B76E@Bigfoot.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.1
Organization: QTECH Hybrid Systems Inc.
Newsgroups: borland.public.jbuilder.java.language