Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10074 > unrolled thread

Re: Baseline GUI Architecture

Started bymarkspace <-@.>
First post2011-11-19 15:27 -0800
Last post2011-11-19 21:18 -0500
Articles 4 — 3 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Baseline GUI Architecture markspace <-@.> - 2011-11-19 15:27 -0800
    Re: Baseline GUI Architecture Steve Sobol <sjsobol@JustThe.net> - 2011-11-19 15:35 -0800
      Re: Baseline GUI Architecture markspace <-@.> - 2011-11-19 15:58 -0800
    Re: Baseline GUI Architecture Arne Vajhøj <arne@vajhoej.dk> - 2011-11-19 21:18 -0500

#10074 — Re: Baseline GUI Architecture

Frommarkspace <-@.>
Date2011-11-19 15:27 -0800
SubjectRe: Baseline GUI Architecture
Message-ID<ja9e0e$v1e$1@dont-email.me>
On 11/19/2011 2:32 PM, Stefan Ram wrote:
> Newsgroups: comp.lang.java.help,comp.lang.java.programmer
> Followup-To: comp.lang.java.programmer
>
> Davej<galt_57@hotmail.com>  writes:
>> Ok, I've written command line code that way, but surely you don't
>> begin a desktop GUI project with nothing but an empty Main class. What
>> do you start with? Is there a standardized prototype? Thanks.
>
>    I have an approach, that seems natural to me, but then also
>    has some problems:


This seems like normal object orient analysis and design to me.  You 
don't have to call those concepts appjects, calling them objects would 
be a perfectly workable term.

I'll also add that for Java, there's some consensus that the NetBeans 
platform makes a good start for larger application.  (For small ones, 
roll-your-own seems the preferred approach.)


>    This is straightforward, but there also is a problem: I would like to
>    add commands for the sub-component to the main application menu. So I
>    need to define how a components menu is merged into an application's
>    menu. I need to specify interfaces for this.


I believe a Mediator pattern could help here.  Mediator simplifies 
interaction between objects, and also loosens coupling.  The basic idea 
imo is to make an object that injected into each large subsystem or 
"appject" in your application, which that system or appject then uses to 
communicate with the rest of the app.

I call this Mediator object an ApplicationContext.  It provides services 
such as access to the GUI, persistence, command line 
properties/configuration, etc. whatever the app needs.  It's all in one 
place and it's injected so testing is now much easier.  I think this 
works better than using static factory methods, which get embedded into 
your code and can represent undesirable "global" objects.

The ApplicationContext can get unwieldy and turn into a God Object if 
you're not careful;  keep it's interaction at a high level and push all 
of the functionality into the services that it just hands around to 
different objects.

[toc] | [next] | [standalone]


#10075

FromSteve Sobol <sjsobol@JustThe.net>
Date2011-11-19 15:35 -0800
Message-ID<MPG.2931dd1043214b10989872@news.justthe.net>
In reply to#10074
In article <ja9e0e$v1e$1@dont-email.me>, markspace says...


> I'll also add that for Java, there's some consensus that the NetBeans 
> platform makes a good start for larger application.  (For small ones, 
> roll-your-own seems the preferred approach.)


I'm sure it does, but I'm building a couple side projects on top of 
Eclipse and it's very robust and extensible too, plus NetBeans used to 
be really slow. (Don't know if it still is.)



-- 
Steve Sobol - Programming/WebDev/IT Support
sjsobol@JustThe.net

[toc] | [prev] | [next] | [standalone]


#10076

Frommarkspace <-@.>
Date2011-11-19 15:58 -0800
Message-ID<ja9fri$9cc$1@dont-email.me>
In reply to#10075
On 11/19/2011 3:35 PM, Steve Sobol wrote:

> I'm sure it does, but I'm building a couple side projects on top of
> Eclipse and it's very robust and extensible too, plus NetBeans used to
> be really slow. (Don't know if it still is.)


Just to be clear, there's a difference between NetBeans the IDE, and 
NetBeans Platform.  The latter is a large API of classes that go beyond 
the Swing API.  NetBeans Platform seems to be popular and well 
respected.  I haven't used it personally however.

Moar infos:

<http://netbeans.org/features/platform/>

[toc] | [prev] | [next] | [standalone]


#10081

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-11-19 21:18 -0500
Message-ID<4ec86376$0$288$14726298@news.sunsite.dk>
In reply to#10074
On 11/19/2011 6:27 PM, markspace wrote:
> I'll also add that for Java, there's some consensus that the NetBeans
> platform makes a good start for larger application. (For small ones,
> roll-your-own seems the preferred approach.)

Really?

My impression is that custom on top of Swing - Eclispe RCP - NetBeans 
Platform goes about 100:10:1 in usage.

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web