🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
11 messages
11 total messages Started by Tony Thu, 26 May 2005 15:43
what is wrong with XY layout
#459
Author: Tony
Date: Thu, 26 May 2005 15:43
34 lines
2312 bytes
Hi,

I wonder if anybody would care to share your view on the XY layout and how 
appropriate
it is to use it in business GUI applications. From time to time I notice 
people say that it is
not appropriate to use it. For some time I have successfully employed the 
following approach
for our GUI applications and found it both fast, simple, _predictable_ and 
aesthetically pleasing:

- Main window has a fixed size for which the business application is 
designed (normally based on
  the lowest supported resolution)
- Forms that are visualized on the main window and forms that appear in 
dialogs all use XYLayout
   with alignment, sizing and positioning done in JBuilder designer.

I have found that Layout managers do very little to help application 
programmers when it comes
to forms layout. As a rule there IS always a minimum resolution with 
anything lower than minimum
not making sense and no layout manager in the world can fix that. For 
resolutions higher than what
the application was desined for in the best case you end up with huge empty 
spaces which normally
look ugly and can get in the way of functional design.

I am not trying to say that one can not design good UI with the proper usage 
of Layout managers,
my point is that it takes a lot of effort to do that and the end result in 
my opinion is not worth it.

Tony.
Re: what is wrong with XY layout
#460
Author: Lori M Olson [TeamB]
Date: Thu, 26 May 2005 16:12
97 lines
5075 bytes
Tony wrote:
> Hi,
> 
> I wonder if anybody would care to share your view on the XY layout and how 
> appropriate
> it is to use it in business GUI applications. From time to time I notice 
> people say that it is
> not appropriate to use it. For some time I have successfully employed the 
> following approach
> for our GUI applications and found it both fast, simple, _predictable_ and 
> aesthetically pleasing:
> 
> - Main window has a fixed size for which the business application is 
> designed (normally based on
>   the lowest supported resolution)
> - Forms that are visualized on the main window and forms that appear in 
> dialogs all use XYLayout
>    with alignment, sizing and positioning done in JBuilder designer.
> 
> I have found that Layout managers do very little to help application 
> programmers when it comes
> to forms layout. As a rule there IS always a minimum resolution with 
> anything lower than minimum
> not making sense and no layout manager in the world can fix that. For 
> resolutions higher than what
> the application was desined for in the best case you end up with huge empty 
> spaces which normally
> look ugly and can get in the way of functional design.
> 
> I am not trying to say that one can not design good UI with the proper usage 
> of Layout managers,
> my point is that it takes a lot of effort to do that and the end result in 
> my opinion is not worth it.
> 
> Tony.
> 
> 
> 

One thing you need to consider is the target audience for your 
application.  You need to come up with REQUIREMENTS that match your 
target audience.  And you can hope that this will let you limit one or 
more of the display variables, so that you don't have to make sure that 
your application looks as good at 1600x1200 as it does at 800x600, and 
that every window and dialog is completely flexible and resizeable. 
Nailing down those requirements up front will save you a lot of grief at 
design time.

Long before Java existed, I worked on cross-platform GUI development 
tools in C... and I can tell you that layout problems pre-date Java by 
quite a bit.

Layout for applications that need to work on screens of varying 
resolution, with user-customizable font sizes, is a *nightmare*.

Layout Managers in Java attempt to help you solve problems in layout. 
And they don't all help you solve the same problem.  You should know 
exactly what problem each layout manager is designed to solve.  You 
should break your complex dialogs down into separate panels, and let 
each panel use the layout manager which is most appropriate.

Something like XYLayout solves the problem of "need to throw something 
together quickly that looks good".  I'd use it for prototyping, but not 
a lot else.  As soon as you change any of the display variables, 
resolution, font size, aspect ratio, XYLayout will break.  That's why 
most of us keep harping about not using it.

The hands-down winner for flexibility in layout managers is 
GridBagLayout.  But you have to sit down with it and learn it properly. 
  All that flexibility means that it's very difficult to start, but once 
you "become one" with it, you will find it possible to layout anything 
very quickly.  And GridBag is one of the layout managers that solves the 
"needs to be resizable" problem very effectively.

I think it is worth the effort to learn the proper usages of all the 
layout managers, and then to use them appropriately.  If you don't do 
that learning, then using layout managers will always be a frustrating 
experience.

-- 

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: what is wrong with XY layout
#516
Author: Paul Nichols (TeamB)
Date: Sun, 29 May 2005 16:57
92 lines
5374 bytes
"Tony" <aoganesi_a^t_yahoo_._com> wrote:

> Lori,
> 
> Thanks a lot for chiming in on this topic. It's always
> a pleasure to read your posts.
> 
> First of all, I fully agree with you on the topic of
> having solid requirements before one embarks on the
> journey of UI building (or any software task for that
> matter).

That is only way anyone will have a successful application.
Failure to properly plan =failure to implement

> 
> 
> However, what I am trying to suggest is that in my experience
> designing a good number of _business_  (and I do want to stress the
> word business) applications for many users for the last 10 years
> this need for creating " ... screens that look good at various
> resultions with user-customizable font sizes ..." is highly overhyped.
>
Disagree and I agree with Lori. Not all fonts are going to be enabled or
available for all alternate systems.

True, you need to use the best as possible type scenario, but TTFs do look
somewhat different on divergent platforms. Pixel counts for fonts are
approximates in the TTF or Adobe categories, not exact.
 

> With all these great tools at our disposal we tend to marginalize the
> XY layout and delegate to it the tasks of "throwing something together
> quickly that looks good". I disagree. I think all other Layout Managers
> should be marginalized because they solve the problem of a 0.1% of
> business users who want to use a different font size or a non-standard
> resolution.
> 
Hate to be the sounder of contrary opinion :), but XYLayout is, IMHO, almost
useless except for quick prototypes. XYLayout is even going to appear
differently using the same OS but different graphic systems.

 
> This is exactly the issue worth discussing. I have supervised several
> programmers who were re-training themselves from VB to Java and Layout
> Managers have always been the hard part to grasp and apply. 

Agreed.. Most difficult for any developers who have used tools like Delphi
or VB to grasp initially. Part of this problem is that they are used to
working on one and only one OS.

> Now let us 
> stop for a minute and think why it is the case... not because these
> people are not as bright as the Java codes ... certainly not because
> Layout Managers are rocket science, -- in my opinion it is because the
> benefit of usage is _not apparent_. Now once you put on the glasses
> of "solving the problem of various resolutions and font sizes" Layout
> Managers start to make sense. :-)
> 
If someone is using Java to create Platform specific apps, then perhaps Java
is not the best to use (unless Web based, where Java is superb). J2SE's
real benefit is xplatform. Now we could discuss the benefits of XPlatform
development (I think especially in this age, is it foolish to hedge ones
bets on a single OS target, even if you are targeting only one today). If
your developers need to learn that we do not live in a one OS fits all
world, perhaps a real IT world course might help. :)

Once the developers learn that they are NOT writing for one OS either now or
for the future, then they should come to understand the reason(s) for
Layout Managers. If they do not see why they exist after learning the
nuances of XPlatform GUIs, then perhaps they are not the best candidates
for XPlatform development to begin with, without further instruction or
real world Enterprise experience.

Seriously, my users do not use one OS, nor do they desire to. I work as a
Tech/Team Lead for a 48,000 employee/user community. Many of them resent
having to be forced to use just Windows, or just Mac, or just Linux. Can't
say I blame them either. Personally, Linux makes more sense for my corp
desktop, since all of my development will be deployed to Unix servers. 
Linux to Unix = much better deployment than Windows to Unix. However, we
also have some developers doing DOT.NEt development. Windows works better
for them. We have some graphics and advertising people who swear by Mac.


When you consider the Internet world, it is a BAD BAD choice to target one
OS, generally. It is OK to target one OS when you are doing utility or
platform specific low level stuff, but again IMHO, foolish for general
business or consumer app development.

Of course you or anyone else is free to disagree :)

   
Re: what is wrong with XY layout
#515
Author: Tony
Date: Sun, 29 May 2005 20:07
56 lines
3375 bytes
Lori,

Thanks a lot for chiming in on this topic. It's always
a pleasure to read your posts.

First of all, I fully agree with you on the topic of
having solid requirements before one embarks on the
journey of UI building (or any software task for that
matter).

I cannot agree more with the fact that

> layout problems pre-date Java by quite a bit.

and

> Layout for applications that need to work on screens of varying 
> resolution, with user-customizable font sizes, is a *nightmare*.

However, what I am trying to suggest is that in my experience
designing a good number of _business_  (and I do want to stress the
word business) applications for many users for the last 10 years
this need for creating " ... screens that look good at various
resultions with user-customizable font sizes ..." is highly overhyped.

Basically, in my opinion this need is marginal at best. Now to solve
this imagined problem you do needs certain tools. I fully agree that
LayoutManagers are great tools with GridBag layout being the powertool.
I also know a couple of 3d party layout tools (e.g. jGoodies, etc ...)
that can help a lot with good form design.

With all these great tools at our disposal we tend to marginalize the
XY layout and delegate to it the tasks of "throwing something together
quickly that looks good". I disagree. I think all other Layout Managers
should be marginalized because they solve the problem of a 0.1% of
business users who want to use a different font size or a non-standard
resolution.

> I think it is worth the effort to learn the proper usages of all the 
> layout managers, and then to use them appropriately.  If you don't do that 
> learning, then using layout managers will always be a frustrating 
> experience.

This is exactly the issue worth discussing. I have supervised several
programmers who were re-training themselves from VB to Java and Layout
Managers have always been the hard part to grasp and apply. Now let us
stop for a minute and think why it is the case... not because these
people are not as bright as the Java codes ... certainly not because
Layout Managers are rocket science, -- in my opinion it is because the
benefit of usage is _not apparent_. Now once you put on the glasses
of "solving the problem of various resolutions and font sizes" Layout
Managers start to make sense. :-)

Would be happy to hear other opinions.

Tony.
Re: what is wrong with XY layout
#521
Author: Tony
Date: Wed, 01 Jun 2005 19:08
85 lines
4904 bytes
Paul,

We all fully understand and completely agree on the topic of limitations
of the XYLayout and the power of LayoutManagers and I suggest that
we should not burn cycles explaining them to each other :-). I appreciate
that you have steered the conversation towards XPlatform application
deployment. Your feedback helped me understand my position better.
I would like to attempt to create a little scenario matrix of applicability
of the XYLayout. Please comment if you find me going in the wrong direction.

First, assumptions. I understand that they might be wrong as they are
based only on my experience.

1. I am suggesting that we abstract from the fact that the application
    can be developed on one platform and deployed on the other.

2. Enterprises do use different operating systems (as in your example),
    but more often than not there is no need to run the SAME application
    on all of these systems. Business applications (and maybe I need to 
narrow
    down my definition of a business application as an application that 
supports
    a business workflow, business operations. They mainly consist of various
    data entry forms, reports and/or some "operations control" UI) are 
normally
    deployed on the same platform to make support and maintenance possible.
    I am not suggesting that this is always the case. I am suggesting that 
this is
    a typical deployment scenario. Creative people that "swear by Mac" 
normally
    have nothing to do with 100 phone sales operators that all sit in front 
of the
    same exact machine and use the same exact OS. And in my opinion it is
    not practical to design the phone sales operator application with the 
goal
    that it should look good on the Mac. These people are not getting a Mac,
    nor are they getting an X-Window system of their choice. They are 
probably
    getting the same Terminal Server client or a SunRay appliance. Now as a 
manager
    who is responsible for the development of the applications for the sales 
operator
    you have a choice of spending X amount of time to develop the app using
    XY Layout or spending k*X amount of time to develop a truly XPlatform
    applications that will look good on various 
resolutions/platforms/X-systems, etc ...
    First of all, as Lori wrote, true XPlatform UI development is 
unattainable.
    You are bound to make some compromises. (e.g. I doubt that when you
    are designing a form, you are planning to accommodate fonts over a 
certain size).
    It's a question of how far you are ready to compromise and what you are
    getting in return.

    Now (k) depends on many factors: skills in your dev. team., experience,
    complexity of the UI, but common sense tells us that k > 1 is a fair 
assumption.
    In my opinion if you choose to go with the kX, you are wasting (k-1)X 
amount
    of time which could have been spent elsewhere.

    Also, I can't buy your argument that Java is the wrong language for
    platform-specific applications. Precisely for the same reason that 
Enterprises
   do use different operating systems and it is very costly to have dev. 
teams
   working with different languages and toolsets. I am sure you would gladly
   move a programmer from the project of developing a phone sales app on
   Windows to the project of developing a shipping control application on 
X-Windows,
   or to a project of developing a time-tracking application for your 
creative folk
   on the Mac if you need to reinforce either team.

My intent was to attempt to come up with the applicability matrix, but I am 
afraid
I am running out of time today. I still want to post what I have written so 
far to
stimulate the discussion. If anybody has examples of applicability beyond 
quick
prototyping, please post.

To be continued ... :-)

Tony
Re: what is wrong with XY layout
#528
Author: Lori M Olson [TeamB]
Date: Fri, 03 Jun 2005 04:38
42 lines
2803 bytes
Paul Nichols [TeamB] wrote:
> I understand your scenario here. But the problem with XY layout remains.
> Even on the same OS, you are going to have inconsistencies with different
> machines that use different monitors and/or Graphics cards. XY uses an
> layout that arranged pixels according to the grid. That grid will be drawn
> differently, under the restrictions of resolution and/or graphic matrix (at
> least that is my experience). Grid bag makes sense, since it adapts to
> these changes (also my experience). However, there are several
> Layoutmanagers in the open source world that can approximate XY and give
> you better results. However, you may lose some of the GUI designer if you
> use them. But it might be worthwhile to see how they work.
> 
> Here are some of interest:
> 
> http://www.softbear.com/people/larry/javalm.htm
> 
> Good luck!!
> 

And I'll chime in with one more extremely common and simple GUI change 
on Windows that immediately breaks XYLayout.

Go into your display settings, and choose "Use Large Fonts".  You get a 
lot of 40-somethings refusing to get reading glasses using this.
-- 

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: what is wrong with XY layout
#530
Author: Magnus
Date: Fri, 03 Jun 2005 14:21
55 lines
3533 bytes
More input:

I develop an application and have about 20 screens with trees, graphics 
and regular text fields.

I looked in to the the different layout managers and found XYLayout to 
best fit my needs (for some of the screens I used Cardlayout, and 
BorderLayout). If this discussion was started a little bit earlier, I 
would probably have worked with GridBagLayout instead.

I have only seen a font problem on a Win98 system when tested it there 
and several people have tried it on their systems (different laptops and 
desktops but still winXP though.) and none have reported anything strange.

Now, when Lori wrote the test of "Use Large Fonts" I got worried I have 
to redo my layout.

Amazingly though - the app actually looked a lot better on my desktop. 
Earlier I didn't see any lines in my trees but now the show. I tried all 
screens and none showed up with any problems. I will continue using 
"large fonts" when working ...

I then tried "Use Extra Large Fonts" but still no problem.



Lori M Olson [TeamB] wrote:

> Paul Nichols [TeamB] wrote:
> 
>> I understand your scenario here. But the problem with XY layout remains.
>> Even on the same OS, you are going to have inconsistencies with different
>> machines that use different monitors and/or Graphics cards. XY uses an
>> layout that arranged pixels according to the grid. That grid will be 
>> drawn
>> differently, under the restrictions of resolution and/or graphic 
>> matrix (at
>> least that is my experience). Grid bag makes sense, since it adapts to
>> these changes (also my experience). However, there are several
>> Layoutmanagers in the open source world that can approximate XY and give
>> you better results. However, you may lose some of the GUI designer if you
>> use them. But it might be worthwhile to see how they work.
>>
>> Here are some of interest:
>>
>> http://www.softbear.com/people/larry/javalm.htm
>>
>> Good luck!!
>>
> 
> And I'll chime in with one more extremely common and simple GUI change 
> on Windows that immediately breaks XYLayout.
> 
> Go into your display settings, and choose "Use Large Fonts".  You get a 
> lot of 40-somethings refusing to get reading glasses using this.
Re: what is wrong with XY layout
#532
Author: Paul Furbacher [TeamB]
Date: Fri, 03 Jun 2005 22:27
25 lines
1931 bytes
Magnus wrote:

> I develop an application and have about 20 screens with trees, graphics 
> and regular text fields.

If you really knew the GBL, it would take about a day to
redo most if not all of those layouts.  That may even
be a conservative estimate depending upon how many controls
are in each frame.


-- 


Paul Furbacher (TeamB)

   Save time, search the archives:
        http://www.borland.com/newsgroups/ngsearch.html

   Is it in Joi Ellis's Faq-O-Matic?
        http://www.visi.com/~gyles19/fom-serve/cache/1.html

   Finally, please send responses to the newsgroup only.
   That means, do not send email directly to me.
   Thank you.
Re: what is wrong with XY layout
#533
Author: Paul Furbacher [TeamB]
Date: Sat, 04 Jun 2005 02:47
24 lines
1844 bytes
Paul Furbacher [TeamB] wrote:

> If you really knew the GBL, ...

Now that I read that again, it doesn't convey
what I meant.  Let me rephrase that as:

If you became adept at using the GBL, ....


-- 


Paul Furbacher (TeamB)

   Save time, search the archives:
        http://www.borland.com/newsgroups/ngsearch.html

   Is it in Joi Ellis's Faq-O-Matic?
        http://www.visi.com/~gyles19/fom-serve/cache/1.html

   Finally, please send responses to the newsgroup only.
   That means, do not send email directly to me.
   Thank you.
Re: what is wrong with XY layout
#527
Author: Paul Nichols [TeamB]
Date: Sat, 04 Jun 2005 03:44
107 lines
5394 bytes
"Tony" <aoganesi_a^t_yahoo_._com> wrote:

> Paul,
> 

> 
> First, assumptions. I understand that they might be wrong as they are
> based only on my experience.
> 
> 1. I am suggesting that we abstract from the fact that the application
>     can be developed on one platform and deployed on the other.
>
OK, I'll go with you :)
 
> 2. Enterprises do use different operating systems (as in your example),
>     but more often than not there is no need to run the SAME application
>     on all of these systems. Business applications (and maybe I need to
> narrow
>     down my definition of a business application as an application that
> supports
>     a business workflow, business operations. They mainly consist of
>     various data entry forms, reports and/or some "operations control" UI)
>     are
> normally
>     deployed on the same platform to make support and maintenance
>     possible. I am not suggesting that this is always the case. I am
>     suggesting that
> this is
>     a typical deployment scenario. Creative people that "swear by Mac"
> normally
>     have nothing to do with 100 phone sales operators that all sit in
>     front
> of the
>     same exact machine and use the same exact OS. And in my opinion it is
>     not practical to design the phone sales operator application with the
> goal
>     that it should look good on the Mac. These people are not getting a
>     Mac, nor are they getting an X-Window system of their choice. They are
> probably
>     getting the same Terminal Server client or a SunRay appliance. Now as
>     a
> manager
>     who is responsible for the development of the applications for the
>     sales
> operator
>     you have a choice of spending X amount of time to develop the app
>     using XY Layout or spending k*X amount of time to develop a truly
>     XPlatform applications that will look good on various
> resolutions/platforms/X-systems, etc ...

I understand your scenario here. But the problem with XY layout remains.
Even on the same OS, you are going to have inconsistencies with different
machines that use different monitors and/or Graphics cards. XY uses an
layout that arranged pixels according to the grid. That grid will be drawn
differently, under the restrictions of resolution and/or graphic matrix (at
least that is my experience). Grid bag makes sense, since it adapts to
these changes (also my experience). However, there are several
Layoutmanagers in the open source world that can approximate XY and give
you better results. However, you may lose some of the GUI designer if you
use them. But it might be worthwhile to see how they work.

Here are some of interest:

http://www.softbear.com/people/larry/javalm.htm

Good luck!!
>     First of all, as Lori wrote, true XPlatform UI development is
> unattainable.
>     You are bound to make some compromises. (e.g. I doubt that when you
>     are designing a form, you are planning to accommodate fonts over a
> certain size).
>     It's a question of how far you are ready to compromise and what you
>     are getting in return.
> 
>     Now (k) depends on many factors: skills in your dev. team.,
>     experience, complexity of the UI, but common sense tells us that k > 1
>     is a fair
> assumption.
>     In my opinion if you choose to go with the kX, you are wasting (k-1)X
> amount
>     of time which could have been spent elsewhere.
> 
>     Also, I can't buy your argument that Java is the wrong language for
>     platform-specific applications. Precisely for the same reason that
> Enterprises
>    do use different operating systems and it is very costly to have dev.
> teams
>    working with different languages and toolsets. I am sure you would
>    gladly move a programmer from the project of developing a phone sales
>    app on Windows to the project of developing a shipping control
>    application on
> X-Windows,
>    or to a project of developing a time-tracking application for your
> creative folk
>    on the Mac if you need to reinforce either team.
> 
> My intent was to attempt to come up with the applicability matrix, but I
> am afraid
> I am running out of time today. I still want to post what I have written
> so far to
> stimulate the discussion. If anybody has examples of applicability beyond
> quick
> prototyping, please post.
> 
> To be continued ... :-)
> 
> Tony
Re: what is wrong with XY layout
#534
Author: Magnus
Date: Sat, 04 Jun 2005 14:14
24 lines
2066 bytes
Thanks Paul and that was how I read it the first time.

I did the tutorial about GBL in jBuilder (probably the best one of them) 
and since it starts to prototype in XYLayout I'm half way ;)

However, for now I focus on function. It doesn't matter how nice and 
portable it is if it doesn't work. Agreed that a "nice" looking app will 
be used even if there are minor bugs vs. something that doesn't display 
correct.

Cheers!

Paul Furbacher [TeamB] wrote:
> Paul Furbacher [TeamB] wrote:
> 
>> If you really knew the GBL, ...
> 
> 
> Now that I read that again, it doesn't convey
> what I meant.  Let me rephrase that as:
> 
> If you became adept at using the GBL, ....
> 
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads