473,378 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

gui design

Hi
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?
I am trying to port swing to c++, is there any thing i should be
careful?
thanks
from Peter (cm****@hotmail.com)

Sep 25 '06 #1
12 2739
cm****@hotmail.com wrote:
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?
Correct in what? That you found it? Probably not. Other folks had
probably "found" the same thing before you. That it is "the most
easiest to use"? Probably not. "Ease" is part of perception, so it
cannot be objectively "the most".
I am trying to port swing to c++, is there any thing i should be
careful?
Be careful not to waste your time on something that nobody needs.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 25 '06 #2
cmk128 wrote:
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?
Swing is a very poor architecture, and Java is not a good library for GUIs
in general.

Why are you developing a new GUI library? What's wrong with the dozens of
existing ones?
I am trying to port swing to c++, is there any thing i should be
careful?
I would research Qt or wxWidgets, in C++. But I would also investigate using
a softer language. C++ is for high-performance situations, and GUIs only
need to respond in user-time. And softer languages like Python, Ruby,
Smalltalk, etc. support "block closures". They make GUI events absurdly easy
to code, whereas C++ makes them absurdly hard.

That's the main reason Java is a poor language for GUIs. To compete with
C++, Java did not start with any advanced OO concepts, just _some_ aspects
of C++-style static typing. So yet another irony of our industry is the
majority of GUI projects are written in languages promoted as being good for
GUIs when they are actually very bad!

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 25 '06 #3

cm****@hotmail.com wrote:
Hi
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?
'Overdesigned' would probably be a better term.

Regards,
Bart.

Sep 25 '06 #4

Phlip wrote:
cmk128 wrote:
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?

Swing is a very poor architecture, and Java is not a good library for GUIs
in general.

Why are you developing a new GUI library? What's wrong with the dozens of
existing ones?
Given that he's an OS developer, perhaps he really meant that he is
implementing a GUI library, not developing one.
I am trying to port swing to c++, is there any thing i should be
careful?

I would research Qt or wxWidgets, in C++. But I would also investigate using
a softer language. C++ is for high-performance situations, and GUIs only
need to respond in user-time. And softer languages like Python, Ruby,
Smalltalk, etc. support "block closures". They make GUI events absurdly easy
to code, whereas C++ makes them absurdly hard.

That's the main reason Java is a poor language for GUIs. To compete with
C++, Java did not start with any advanced OO concepts, just _some_ aspects
of C++-style static typing. So yet another irony of our industry is the
majority of GUI projects are written in languages promoted as being good for
GUIs when they are actually very bad!
I have to agree here. You can use C++ or Java for application
infrastructure and a scripting language for the UI. It's a very
flexible approach that has merits. However, given the note about OS
development perhaps the intent is to provide the actual low-level GUI
support of the OS, like the Win32 API in Windows.

Regards,
Bart.

Sep 25 '06 #5
"Phlip" <ph******@yahoo.comwrites:
C++ is for high-performance situations, and GUIs only
need to respond in user-time.
Now I realise why most UI applications take ages to respond! They
respond in user time!

Apparantly this is even possible in C++.

Regards,

Jens
Sep 25 '06 #6

Phlip 寫道:
cmk128 wrote:
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?

Swing is a very poor architecture, and Java is not a good library for GUIs
in general.

Why are you developing a new GUI library? What's wrong with the dozens of
existing ones?
I am trying to port swing to c++, is there any thing i should be
careful?

I would research Qt or wxWidgets, in C++. But I would also investigate using
a softer language. C++ is for high-performance situations, and GUIs only
need to respond in user-time. And softer languages like Python, Ruby,
Smalltalk, etc. support "block closures". They make GUI events absurdly easy
to code, whereas C++ makes them absurdly hard.

That's the main reason Java is a poor language for GUIs. To compete with
C++, Java did not start with any advanced OO concepts, just _some_ aspects
of C++-style static typing. So yet another irony of our industry is the
majority of GUI projects are written in languages promoted as being good for
GUIs when they are actually very bad!

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Hi Phlip
What is "block closures"?
thanks
from Peter

Sep 26 '06 #7

Phlip 寫道:
cmk128 wrote:
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?

Swing is a very poor architecture, and Java is not a good library for GUIs
in general.

Why are you developing a new GUI library? What's wrong with the dozens of
existing ones?
I am trying to port swing to c++, is there any thing i should be
careful?

I would research Qt or wxWidgets, in C++. But I would also investigate using
a softer language. C++ is for high-performance situations, and GUIs only
need to respond in user-time. And softer languages like Python, Ruby,
Smalltalk, etc. support "block closures". They make GUI events absurdly easy
to code, whereas C++ makes them absurdly hard.

That's the main reason Java is a poor language for GUIs. To compete with
C++, Java did not start with any advanced OO concepts, just _some_ aspects
of C++-style static typing. So yet another irony of our industry is the
majority of GUI projects are written in languages promoted as being good for
GUIs when they are actually very bad!

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Why swing is poor architecture? i think swing is very easy to use, and
all its components are OO concept. I know some people saying swing is
slow, but it is nothing to do with swing, it is the performance problem
of the VM, not the problem of the GUI library itself.

In swing, you will never get a segmentation fault, everything is
neither working or not-working. Java is a very safety langauge, unlike
c++, some code look like working, but will generate a segmentation
fault after running a long time.

I want to avoid this in the GUI library, but not very clear how i can
do it :(
thanks
from Peter

Sep 26 '06 #8
cmk128 wrote:
Why swing is poor architecture?
Because I have experience with the best OO GUI toolkits, and Swing can't do
what they do, at the level of the language itself.

Beyond that, I have almost no experience with Swing itself, and I do not
doubt that a Java expert can use it elegantly, reliably, and robustly.
In swing, you will never get a segmentation fault, everything is
neither working or not-working. Java is a very safety langauge, unlike
c++, some code look like working, but will generate a segmentation
fault after running a long time.
That's because Sun invented Java by removing the features from C++ that make
it fast. I can easily write programs that never fault (modulo whatever
compiler and platform they use). And I can crash a Java program with one arm
tied behind my back.
I want to avoid this in the GUI library, but not very clear how i can
do it :(
Download and run many GUI libraries, in many languages. You must learn much
more than Swing before you even start your project. Even download Amulet (if
you can find it), Frog, FLTK, and Fox. And run them in different languages.

If you design a library when all you know is Swing and C++, you will make
many mistakes that other libraries show the fixes for.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 26 '06 #9

<cm****@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...

Phlip ??:
cmk128 wrote:
I am an os developer, i am developing a gui library. I found that
java swing is the most easiest to use gui library , am i correct?

Swing is a very poor architecture, and Java is not a good library for GUIs
in general.

Why are you developing a new GUI library? What's wrong with the dozens of
existing ones?
I am trying to port swing to c++, is there any thing i should be
careful?

I would research Qt or wxWidgets, in C++. But I would also investigate
using
a softer language. C++ is for high-performance situations, and GUIs only
need to respond in user-time. And softer languages like Python, Ruby,
Smalltalk, etc. support "block closures". They make GUI events absurdly
easy
to code, whereas C++ makes them absurdly hard.

That's the main reason Java is a poor language for GUIs. To compete with
C++, Java did not start with any advanced OO concepts, just _some_ aspects
of C++-style static typing. So yet another irony of our industry is the
majority of GUI projects are written in languages promoted as being good
for
GUIs when they are actually very bad!

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Why swing is poor architecture? i think swing is very easy to use, and
all its components are OO concept. I know some people saying swing is
slow, but it is nothing to do with swing, it is the performance problem
of the VM, not the problem of the GUI library itself.

In swing, you will never get a segmentation fault, everything is
neither working or not-working. Java is a very safety langauge, unlike
c++, some code look like working, but will generate a segmentation
fault after running a long time.

I want to avoid this in the GUI library, but not very clear how i can
do it :(
thanks
from Peter

You don't see segmentation faults very much in the Java/SWING environment
because they
are often trapped.. The same thing can be done in C++ to stop segV's
although that's
a bad practice since it hides the underlying problem, resulting in incorrect
behavior.

Sep 26 '06 #10

Phlip wrote:
cmk128 wrote:
Why swing is poor architecture?

Because I have experience with the best OO GUI toolkits, and Swing can't do
what they do, at the level of the language itself.

Beyond that, I have almost no experience with Swing itself, and I do not
doubt that a Java expert can use it elegantly, reliably, and robustly.
In swing, you will never get a segmentation fault, everything is
neither working or not-working. Java is a very safety langauge, unlike
c++, some code look like working, but will generate a segmentation
fault after running a long time.

That's because Sun invented Java by removing the features from C++ that make
it fast. I can easily write programs that never fault (modulo whatever
compiler and platform they use). And I can crash a Java program with one arm
tied behind my back.
I want to avoid this in the GUI library, but not very clear how i can
do it :(

Download and run many GUI libraries, in many languages. You must learn much
more than Swing before you even start your project. Even download Amulet (if
you can find it), Frog, FLTK, and Fox. And run them in different languages.

If you design a library when all you know is Swing and C++, you will make
many mistakes that other libraries show the fixes for.

--
Swing is one of the best designed library (The next is Qt ofcourse). I
had worked with a vast range of gui library, like Swing, AWT, SWT from
Java, Qt, wxWidgets , VCF, FLTK, UCPP, GTK+, Motif etc from C++ world
as well as TCL/TK & Python from script world. If one want to have some
heavy GUI based application , scripting is just not possible (I wil
definitely stop using OpenOffice or MS Office if they make the GUI
using TCL/TK). Moreover they have very poor look on many platform (
check Ansys on Windows) and have incomplete functionality. Even most of
the time they are actually wrapper for C/C++ library. Note that major
GUI library are C/C++ or Java only. However scripting language has
their place. When I have some academic signal procesing application and
just want to show the result in some GUI I use TCL/TK for that.
Moreover with advanced C++/Java framework and so beautifule editors &
form designers, there is no disadvantage of the heavyweight language
based GUI. Now it is much faster to design an very sophisticated GUI
with Netbeans or Ecplice than to design it in Python or TCL/TK or
Python.
Secondly, If you want to get best design for GUI framework look at
Swing, Java and VCF. They gives absolutely flexibility to implement
whatever you like, in minimum time.
GTK+ is very well designed C library (not OO library). wxWidgets is the
worst designed (after Motif & MFC !) but vastly supported GUI
framework. It runs in very old to very new PC. If there is a partial
implemented C++ compiler for a platform , it is going to support it.
Thus it never use standard OO concepts, and standard C++ concepts
(which has both advantage & disadvantage). Most modern GUI framework
for C++ after Qt is VCF , which looks much like Swing, but still under
development. And it integrates AGG , thus one can have very fast
beautifull 2D graphics. One can look at its existing Windows & Mac
port.
The other C++ framework like UCPP and smooth (and few other) has a
different stack based approach for GUI , thus they seems to be little
faster. However they lacks flexibility (they are new one and yet under
development). However as they do some most mordern way to design it
(and do many static compilation based on template, they may have a
larger exe size and compilation time, but have faster runtime response,
and may be smaller memory footprint). If one is going to develop some
C++ GUI framework, one should look at this approach also before
starting anything.
And finally Swing is the library for standard design. It has best
design no doubt. If you sit with a GOF book and Swing library, you can
look how beautifully the whole thing fits into it (even much better
that its own ET++ or PresentationManager examples). And if anyone says
it is not possible to do something with Swing, they are either saying
false, or don't know Swing. Other than doing something platform
specific (which can anyway be implemented with a platform API binding)
Swing can do everything. One can create stunning effect, large scale UI
based application and what not? Look the Sun JavaONE Show examples, or
Project Looking Glass, or Swing Hacks book to see what Swing can do.
They can have better effect than Vista Aero (MS has done it with 6
years development with such a huge team).
So in my suggestion the way Swing, Qt and VCF works is beautiful and
very flexible. C framework GTK+ is no doubt the king. The different
kinds of framework like UCPP also needs some attention. And apart from
small UI, scripting language do not give any advantage over C++ or Java
or Delphi (Pascal) . They are based on the wapped C++ api.

abir
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 26 '06 #11
cm****@hotmail.com wrote:
I am trying to port swing to c++, is there any thing i should be
careful?
Lots probably, but OTOH Go for it!

regards
Andy Little

Sep 26 '06 #12
cm****@hotmail.com wrote:
Phlip 寫道:
I would research Qt or wxWidgets, in C++. But I would also investigate using
a softer language. C++ is for high-performance situations, and GUIs only
need to respond in user-time. And softer languages like Python, Ruby,
Smalltalk, etc. support "block closures". They make GUI events absurdlyeasy
to code, whereas C++ makes them absurdly hard.
<...>
>
Hi Phlip
What is "block closures"?
http://en.wikipedia.org/wiki/Closure_(computer_science)

Basically it's little more than an obscure and vague term for a fancy
function object, and AFAICS use of the term in preference to functor
or function object in a C++ newsgroup just leads to unnecesary
confusion..

But C++ handles function objects very nicely thankyou.

Sure there are a lot of C++ GUI's around, but many are old and don't
make much use of modern C++ features, and none of them is standard.
Whether Swing is good is practically irrelevent. The Point is its Java
standard, well documented, well featured and widely used.

Go for it :-)

regards
Andy Little

Sep 26 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: adb | last post by:
I came up with a replication configuration that is basically the result of all the restrictions of replication as well as the restrictions of allowable software on work PC's and I was curious if...
3
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
0
by: Edward Diener | last post by:
In Borland's VCL it was possible to divide a component into design time and run time DLLs. The design time DLL would only be necessary when the programmer was setting a component's properties or...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
by: Paul Cheetham | last post by:
Hi, I have moved an application from VS2003 to VS2005, and I am now unable to view most of my forms in the designer. The majority of the forms in my project are derived from class PACForm,...
1
by: Nogusta123 | last post by:
Hi, I have had a lot of problems getting web pages, master pages and content pages to render in VS2005 design view the same as they would in Internet Explorer. I did a lot of looking on the...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
19
by: neelsmail | last post by:
Hi, I have been working on C++ for some time now, and I think I have a flair for design (which just might be only my imagination over- stretched.. :) ). So, I tried to find a design...
10
by: vital | last post by:
Hi, I am designing the middle tier of a project. It has 6 classes and microsoft application data access block. The six classes are DBServices, Logger, ProjectServices ... etc. and all these...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.