java vs MFC

  • Follow


Java/Swing or C++/MFC on windows ?

Anything better ?




0
Reply ralph 8/24/2003 7:04:03 AM

Hi,
it depends on what you want. The GUI-logic of the MFC is better because it
is mature. But Java with Swing runs also on other machines.

Ralf Schneewei�
www.oop-trainer.de


<ralph@conexoscomponentes.com.br> schrieb im Newsbeitrag
news:bi9nv7$9eg$8@news-reader1.wanadoo.fr...
> Java/Swing or C++/MFC on windows ?
>
> Anything better ?
>
>
>
>


0
Reply Ralf 8/25/2003 1:48:11 AM


Programmed on MFC/C++ for Years, then Java/Swing for 4 years and now
C#/WinForms for 1 year.  Anything is better than MFC/C++!  Java/Swing and
C#/WinForms are about equals in what they do and how they do it, just do it
a wee bit different from each other but are both nice.

Todd Blackley
"Ralf Schneewei�" <ralf.schneeweiss@onlinehome.de> wrote in message
news:bibpru$7a1f1$1@ID-204215.news.uni-berlin.de...
> Hi,
> it depends on what you want. The GUI-logic of the MFC is better because it
> is mature. But Java with Swing runs also on other machines.
>
> Ralf Schneewei�
> www.oop-trainer.de
>
>
> <ralph@conexoscomponentes.com.br> schrieb im Newsbeitrag
> news:bi9nv7$9eg$8@news-reader1.wanadoo.fr...
> > Java/Swing or C++/MFC on windows ?
> >
> > Anything better ?
> >
> >
> >
> >
>
>


0
Reply Todd 8/25/2003 2:21:51 AM

ralph@conexoscomponentes.com.br wrote:

> Anything better ?

Qt: http://www.trolltech.com

0
Reply Jacob 8/25/2003 4:11:44 PM

> Programmed on MFC/C++ for Years, then Java/Swing for 4 years and now
> C#/WinForms for 1 year.  Anything is better than MFC/C++!  Java/Swing and
> C#/WinForms are about equals in what they do and how they do it, just do
it
> a wee bit different from each other but are both nice.

C#/WinForms still ships with no layout managers at all. It's all absolute
positioning. I still have not figured out how to do a form with lots of
labels and text fields that all line up nicely and grow as you resize the
window - without calculating the position and size of every widget
individually.

If you program Java/Swing applications for Windows platforms, I suggest you
look at an alternate Windows look-and-feel class. The Windows look-and-feel
that comes with the JDK leaves a lot to be desired. There's a really nice
one called JGoodies Looks available at
   http://community.java.net/javadesktop/


Tilman



0
Reply Tilman 8/25/2003 5:45:40 PM

"Tilman Sporkert" <t.sporkert@attbi.com> writes:

> C#/WinForms still ships with no layout managers at all. It's all absolute
> positioning. I still have not figured out how to do a form with lots of
> labels and text fields that all line up nicely and grow as you resize the
> window - without calculating the position and size of every widget
> individually.

I think they want your IDE (VS.Net, C#Builder) to do it for you. :P
0
Reply Tor 8/25/2003 7:56:10 PM

Hum, Yes C#/WinFlorm do not have layouts, but they do have other positioning
/ layout tools that do work great.  I've found that I can produce the same
results in both Java/C# with nested panels that use their respective
positioning tools.

Todd
"Tilman Sporkert" <t.sporkert@attbi.com> wrote in message
news:8Xr2b.255687$o%2.117270@sccrnsc02...
> > Programmed on MFC/C++ for Years, then Java/Swing for 4 years and now
> > C#/WinForms for 1 year.  Anything is better than MFC/C++!  Java/Swing
and
> > C#/WinForms are about equals in what they do and how they do it, just do
> it
> > a wee bit different from each other but are both nice.
>
> C#/WinForms still ships with no layout managers at all. It's all absolute
> positioning. I still have not figured out how to do a form with lots of
> labels and text fields that all line up nicely and grow as you resize the
> window - without calculating the position and size of every widget
> individually.
>
> If you program Java/Swing applications for Windows platforms, I suggest
you
> look at an alternate Windows look-and-feel class. The Windows
look-and-feel
> that comes with the JDK leaves a lot to be desired. There's a really nice
> one called JGoodies Looks available at
>    http://community.java.net/javadesktop/
>
>
> Tilman
>
>
>


0
Reply Todd 8/27/2003 2:17:04 AM

Jacob wrote:

> ralph@conexoscomponentes.com.br wrote:
> 
>> Anything better ?
> 
> Qt: http://www.trolltech.com


My suggestion also.   It is cross platform with a minimum of tweaking, free
under Linux but costs $ under WinXX
-- 

-
GrayGeek
0
Reply GrayGeek 8/29/2003 11:31:12 AM

Mark Thornton wrote:

> 
> But how well does C#/WinForms work with resizing or with significant
> changes in the size of (text) labels as may occur with
> internationalization. Java's LayoutManager's can handle these problems
> very well (if properly used).
> 
Well I am currently in layout heaven, I found the form layout manager by
Karsten Lentsch, and I have the feeling this one is the one which covers
around 95% of all layouts. Karsten managed to combined sort of the easyness
of absolute positioning and resizing into a grid like layout manager where
you can alter cell distances you can make groups of cells with same width
and height and you can define the resizing behavior of cells. It is sort of
like gridbag layout but very easy to use and relayout if you have ot make
changes like adding a row or column.


0
Reply Werner 9/12/2003 9:33:29 PM

On Fri, 12 Sep 2003 23:33:29 +0200, Werner Purrer
<werpu@operamail.com> wrote or quoted :


>Well I am currently in layout heaven,

I layout heaven would work like this:

I prepare a list of thing things I need to put somewhere in the
layout.

It plops them in labeled with their field names aligned in columns.

I drag them around, create panels.

I adjust things as if I were doing an absolute layout.

Then I drag the window bigger or smaller, and again readjust things as
if I were doing an absolute layout.

When I make smaller, some fields may lose their labels to conserve
space.  Some fields may disappear entirely.

I adjust the layout when the preferred font is not available.

The intelligence looks at all these specific examples and  generates
code that makes this work at any size, with any size fonts etc. 

Now when I add another field, I just plop it in where it belongs and
everything flows harmoniously to make room for it in the "Style" I
have defined by my examples.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
0
Reply Roedy 9/12/2003 9:47:56 PM

Roedy Green wrote:

> >Well I am currently in layout heaven,
>
> I layout heaven would work like this: [...]

Great :)

I'm interested in understanding how different
sorts of developers image a layout heaven.

The Forms layout system is meant as a starting point
and I'd be glad if it will be replaced by a superior
system in the future. Forms just reflects my findings
about layout and how to assist developers.

I encourage everyone to speak up and publish ideas
around layout. I'd like to provide the ideal process
how to find, design and implement well designed UIs
quickly and consistently.

The Forms system is primarily intended to implement
a layout that has been found and designed before.
The FormLayout is the low-level foundation for this;
builders help you save time and get consistent UIs;
factories further improve the consistency.

I've outlined two other layers how to come closer
to my layout heaven: visual editors and a design library.
You can find a diagram that shows this at the end
of the "Layout and Panel Building" article at
http://www.jgoodies.com/articles/

How can we assist the average developer in finding
good design? I envision a large design library that
consists of hundreds of panels that implement
frequently used layouts.
A visual editor shall help designers to modify and
extend the prebuilt design templates. Such an editor
may have two modes: one to find a layout, another
to construct it: align, equalize, adjust, etc.

Roedy, regarding your layout heaven I'd say that
you oversimplify the design tasks, where a designer
adds meaning to a layout - things a layout system
can hardly infer from the components itself.
Anyway, you described the heaven, not earth ;)
In other words, what you described may indicate
good defaults that can be overridden - if necessary.

Thanks for your input. Have a nice weekend,
Karsten



0
Reply Karsten 9/13/2003 9:14:17 AM

Roedy Green wrote:

> On Sat, 13 Sep 2003 11:14:17 +0200, "Karsten Lentzsch"
> <Karsten@JGoodies.com> wrote or quoted :
> 
>>In other words, what you described may indicate
>>good defaults that can be overridden - if necessary.
> 
> The key features which I implemented back in 1980 in Abundance are:
> 
> 1. components know their names (internationalised), and so can be
> asked to label themselves.  In Abundance, there is a layout "mood"
> that describes  the compass point where subsequent fields should
> display their label, including nowhere.
> 
> 2. The components know their alignment so the know if they should
> align the left or right end with the one above them in columnar
> layouts.
> 

you basically ask for a labled textfield for instance :-) can be done
easily, and I've done it numerous times, but why nobody has done it
within swing is beyound me either.

Snip some parts about labels.

> The really hard part:
> 
> Taking what amount to several absolute layouts and creating from it a
> variable layout that will interpolate sensibly.  It could almost be
> looked on a search problem through the tree of all possible layouts to
> find a one that uses standard techniques to create an effect most
> closely approximating the layouts pinned down.

I think you take too much mechanisms out of the designers hand, I think
Karsten has done a good job in this regard with the forms example at the
end, where he layouted the columns and used a factory to fill it with
components in a semi automatic way.
Doing everything automatically is not good, I have yet to see a single
layout where an automated layouting mechanism does the job as good as a
designer or even would fullfill the most basic needs of a modern layout. 


0
Reply Werner 9/15/2003 3:18:06 PM

In article <3f65d83d@e-post.inode.at>,
Werner Purrer  <werpu@operamail.com> wrote:
>
>you basically ask for a labled textfield for instance :-) can be done
>easily, and I've done it numerous times, but why nobody has done it
>within swing is beyound me either.

It's probably based on the philosophy that one component should do one
job and if you need a multiple-features component, you just use those
simple ones to make a compound one. It's a nice clean approach, but
causes a bit more implementation work at times.

Still, it might have been useful to have the following methods on
JComponent:
public void setLabel(JLabel label);
public void setLabelPosition(int position);
or somesuch.

(Of course, you might ask yourself why JCheckBox and JRadioButton _do_
have built-in labels - sorta - when nothing else does ...)

Cheers
	Bent D
-- 
Bent Dalager - bcd@pvv.org - http://www.pvv.org/~bcd
                                    powered by emacs
0
Reply bcd 9/15/2003 5:18:52 PM

On Mon, 15 Sep 2003 17:18:06 +0200, Werner Purrer
<werpu@operamail.com> wrote or quoted :

>Doing everything automatically is not good, 
 
That is always true at the beginning. But if no one ever tries, we
will be stuck doing manual layouts forever.  Surely eventually we will
find out how to create layouts visually pleasing, perhaps even
customised to every user.

If you could do automated decent layouts on demand from arbitrary
collections of data, this would greatly simplify programming.

Surely common things like international addresses could be canned
layouts, that adjust depending on the country of the person being
displayed.

Surely tables could adjust their widths based on contents and label
their columns automatically.

Think analogously that custom crafted furniture from Europe is better
than factory stuff, but the factory stuff can be had right away, is
cheaper and suffices for utilitarian purpose.  Instead of going
without furniture when you are on a budget, you go without fine
furniture.

 
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
0
Reply Roedy 9/15/2003 5:42:08 PM

Roedy Green wrote:

> 
> That is always true at the beginning. But if no one ever tries, we
> will be stuck doing manual layouts forever.��Surely�eventually�we�will
> find out how to create layouts visually pleasing, perhaps even
> customised to every user.
> 
Well I think sometumes you need both,
here is an example, if you read Carstens formlayout paper you will see
exactly one application type where an automated layout makes sense, forms.
What happened in the paper was that basically only colums where defined and
a factory got parameters which componend and the labeled text, everything
was layouted that way. This makes perfect sense since forms need a common
look and feel and have to be adjusted according to the model data which
they influence, but on the other hand I for instance see no way how an
automated layout mechanism makes sense for a specialiced general purpose
app like an imaging program.
I in fact see not too many application types where an automated approach
really makes sense, forms are the only one I can see currently.

>If you could do automated decent layouts on demand from arbitrary
>collections of data, this would greatly simplify programming.

Well Carstens approach is bascially 2/3ds of the way, your approach already
has been done often, by having business objects being parsed and the forms
to the objects are generated automatically, or by having a data xml
description where the form is generated, but again, this only works really
well with forms and nothing else. After all you always need a controller to
this approach and forms usually have a limited set of logic behind it which
can influence the model. 

> Surely common things like international addresses could be canned
> layouts, that adjust depending on the country of the person being
> displayed.

Well that is more a template mechanism problem, less a layout problem, but
maybe a combined template, layout approach is the holy grail.


>Surely tables could adjust their widths based on contents and label
>their columns automatically.

Well again this can be done easily and many business apps do that, table
handling according to the content is not that hard to implement.

>Think analogously that custom crafted furniture from Europe is better
>than factory stuff, but the factory stuff can be had right away, is
>cheaper and suffices for utilitarian purpose.��Instead�of�going
>without furniture when you are on a budget, you go without fine
>furniture.

Not really the problem I see is, that automation is with the current state
of affairs only possible with a limited set of controller related
activties, thus the form handling is a perfect example of a thing which you
can auto layout (usually the controller has following actions, load, save,
veryfiy, update, create), but a more generalized approach is not that easy
because the controller actions can increase exponentially compared to a
simply form. You might get some semi automatisms by combining the whole
layout manager thing with a template like mechanism, where you basically
combine automated layouting approaches with a given set of predefined,
manually done layouts, which are changed given the current context of the
application. 

But as I see it I see no way to find a general approach to automated layouts
for every application currently.

0
Reply Werner 9/23/2003 9:17:07 PM

14 Replies
169 Views

(page loaded in 0.246 seconds)

Similiar Articles:








7/17/2012 10:11:41 AM


Reply: