[The Java Posse] Re: Componentized Designs

2008-09-17 Thread Alexey Zinger
Kawasaki EX500 http://azinger.blogspot.com http://bsheet.sourceforge.net http://wcollage.sourceforge.net --- On Wed, 9/17/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Subject: [The Java Posse] Re: Componentized Designs > To: "The Java Po

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread [EMAIL PROTECTED]
Hi Craig, Fair enough...the tooling point is a good one. I can only think of a work-around (maybe an adapter class) to the issue you raise. -Ken On Sep 17, 2:21 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi Ken, > > Yes, but as someone pointed out in the comments on your blog, the > i

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread [EMAIL PROTECTED]
ed, 9/17/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > Subject: [The Java Posse] Re: Componentized Designs > > To: "The Java Posse" > > Date: Wednesday, September 17, 2008, 3:31 AM > > Hi Al

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread Alexey Zinger
--- On Wed, 9/17/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Subject: [The Java Posse] Re: Componentized Designs > To: "The Java Posse" > Date: Wednesday, September 17, 2008, 3:31 AM > Hi Alexey, > &g

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread [EMAIL PROTECTED]
Hi Joshua, Even if you sub-classed JComponent, couldn't you achieve the same result by making your class final? Craig On Sep 17, 4:34 pm, Joshua Marinacci <[EMAIL PROTECTED]> wrote: > By using this factory system it means that the client developer cannot   > subclass the component. They can onl

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread [EMAIL PROTECTED]
Hi Ken, Yes, but as someone pointed out in the comments on your blog, the improved API has come at the expense of tooling. Since the class is no longer a Swing component, Swing GUI builders like Matisse can no longer use them. As I said in my original post, what you gain on the swings you lose on

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread [EMAIL PROTECTED]
Exactly. On Sep 17, 11:34 am, Joshua Marinacci <[EMAIL PROTECTED]> wrote: > By using this factory system it means that the client developer cannot   > subclass the component. They can only instantiate and configure it. > > On Sep 17, 2008, at 12:31 AM, [EMAIL PROTECTED] wrote: > > > > > Hi Alexey

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread Joshua Marinacci
By using this factory system it means that the client developer cannot subclass the component. They can only instantiate and configure it. On Sep 17, 2008, at 12:31 AM, [EMAIL PROTECTED] wrote: > > Hi Alexey, > > In the end, don't you expose exactly the same API whether you derive > from JComp

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread [EMAIL PROTECTED]
Hi Craig, At some level you have to expose the actual visual components, so yes, there is that constant. What is much cleaner though, is the presentation of the API when it is isolated. When you extend JComponent, your API is muddled with that of JComponent. I find that componentized design make

[The Java Posse] Re: Componentized Designs

2008-09-17 Thread [EMAIL PROTECTED]
Hi Alexey, In the end, don't you expose exactly the same API whether you derive from JComponent or return JComponent via an accessor method? I'm not necessarily arguing against doing it, I'm just playing devil's advocate! Craig. On Sep 17, 3:54 am, Alexey <[EMAIL PROTECTED]> wrote: > The compo

[The Java Posse] Re: Componentized Designs

2008-09-16 Thread Alexey
The component may very well return a JComponent object, but that would be all that's known by the client, unless it resorts to reflection. So by only guaranteeing the bare minimum of API necessary for a layout manager to handle the resulting object, Ken allows himself the freedom to completely cha

[The Java Posse] Re: Componentized Designs

2008-09-16 Thread Casper Bang
> An example I gave in a comment on my blog as to the peril of inheritance was > JButton Yeah, another example is that of a JFrame extending Windows which itself extends Component, giving the illusion that you can add a JFrame to say a JComponent. > I like your Keep It Simple attitude - refresh

[The Java Posse] Re: Componentized Designs

2008-09-16 Thread Michael Neale
I like your Keep It Simple attitude - refreshing. The java community could do with a lot more of that attitude and less worrying about silly overengineering issues (sure, someone has to worry about it, but not EVERYONE). Keep it simple and small. On Sep 16, 11:40 pm, "[EMAIL PROTECTED]" <[EMAIL P

[The Java Posse] Re: Componentized Designs

2008-09-16 Thread [EMAIL PROTECTED]
Hi Ken, First things first, congratulations on doing a great job with the Mac widgets and thank you for releasing them under a commerically friendly open source license! I guess the question I would ask is what benefit do you think you are getting by not deriving from JComponent? Since getCompon