Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #12243
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Lew <noone@lewscanon.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Hairy generics question |
| Date | Tue, 21 Feb 2012 18:31:41 -0800 |
| Organization | albasani.net |
| Lines | 25 |
| Message-ID | <ji1k2c$cn1$1@news.albasani.net> (permalink) |
| References | <3c65271e-a388-49c9-bcc6-ca3bf274e74f@e27g2000vbu.googlegroups.com> <v2Y0r.9874$yb.2452@newsfe20.iad> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net ghJAhR3zJTldLqdV4Dfo/tG+0kTBZVzyYKXz68DYXRUFZNlfOr7F6Q9nVzdiMBkxwyZs/TFV+u4C82FaEKDLRsWxfREp5HPq14HyjMZaAiFW3QqtxqKZ2cRdIVXNQUM8 |
| NNTP-Posting-Date | Wed, 22 Feb 2012 02:31:41 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="c3sg6ctAkntkSo4ADlSgWodqGt25IefIzeE5j3ncFxdpLHxG0SO7SSiv9gEJR/yQ22jrwV1+wPxHmwh+bsPJQe+Ck3fAQKhhCfsdPMOTDX0VBhgi47/qc5WUF75txJQO"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
| In-Reply-To | <v2Y0r.9874$yb.2452@newsfe20.iad> |
| Cancel-Lock | sha1:a0lxY1IjHvpxRnCdLm7IAZvZQ8M= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12243 |
Show key headers only | View raw
Daniel Pitts wrote: > The better suggestion that I have for you is to try to find a better way of > handling this generic-type interdependency. I once wrote something very > similar, and it is a headache to maintain. Especially when I needed to add in > (I'm making up names to match your example) CompItemAccessor. And then later > CompItemValidator. And so on. I eventually ended up with one class > ContentTypeMetadata<X,Y,Z,A,B,C> which contained all the basic information for > each content type, and the class types didn't really have to know much about > each other. > > Ask yourself, do all these objects really need to know the exact type of all > the other objects, or can they just know about some shared base interface? Or some bunch of non-generic interfaces? And do they really all need to implement all these interfaces, or can they compose elements that do? "Favor composition over inheritance". - Joshua Bloch, /Effective Java/ -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Hairy generics question sclaflin <steve@steveclaflin.com> - 2012-02-21 06:30 -0800
Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-21 09:24 -0800
Re: Hairy generics question Roedy Green <see_website@mindprod.com.invalid> - 2012-02-21 11:05 -0800
Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-21 12:09 -0800
Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-21 18:04 -0800
Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-21 18:31 -0800
Re: Hairy generics question Steven Simpson <ss@domain.invalid> - 2012-02-22 08:31 +0000
Re: Hairy generics question sclaflin@webucator.com - 2012-02-24 11:12 -0800
Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-24 12:03 -0800
Re: Hairy generics question sclaflin@webucator.com - 2012-02-24 14:07 -0800
Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-24 15:36 -0800
Re: Hairy generics question sclaflin@webucator.com - 2012-02-25 10:27 -0800
Re: Hairy generics question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-26 13:13 -0400
What is Model View Presenter. (Was: Hairy generics question) Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-26 10:22 -0800
Re: What is Model View Presenter. (Was: Hairy generics question) Lew <noone@lewscanon.com> - 2012-02-26 13:08 -0800
Re: What is Model View Presenter. (Was: Hairy generics question) Arne Vajhøj <arne@vajhoej.dk> - 2012-02-26 18:17 -0500
Re: What is Model View Presenter. (Was: Hairy generics question) sclaflin@webucator.com - 2012-02-28 06:22 -0800
Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-28 09:46 -0800
Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-28 09:49 -0800
Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-28 12:45 -0800
Re: Hairy generics question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-29 19:37 -0400
Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-29 22:32 -0800
csiph-web