473,772 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
12 2799

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 PresentationMan ager 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
2115
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 anyone would point out any flaws or possible problems with the design. I'm limited to Access 2000 professional edition (Thus I cannot use indirect sync or internet sync) and cannot install anythird party controls (i.e.
3
4142
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. The User Experience, or how the user experiences the end product, is the key to acceptance. And that is where User Interface Design enters the design process. While product engineers focus on the technology, usability specialists focus on the user...
0
1915
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 events in the Object Inspector, the equivalent to the VS .NET Windows form designer. The run-time DLL would only contain the code necessary at run-time. The design time DLL referenced the run-time DLL, but not vice-versa. This allowed the run-time...
7
3019
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
2377
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, (which itself derives from System.Windows.Forms.Form) Whenever I try to open on of these forms in the designer, I get an error, stating it is unable to load one or more of the requested types. (Full text at the bottom of this message)
1
6341
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 internet for answers but didn't have much luck. Anyway I believe I have found the causes of the problems and thought I should share them in case any one else is feeling the pain and also to find out what other peoples opinions are, on whether these...
0
2510
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 don't work nearly as well as they should, even for analysts and power users. The reason they haven't reached the masses is because most of the tools are so difficult to use and reveal so little
19
3174
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 certification, possibly that involves C++, but, if not, C++ and UML. All I could find was Java + UML design certifications (one such is detailed on http://www.objectsbydesign.com/tools/certification.html). Although UML is expected to be language independent,...
10
3677
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 classes talk to front-end directly. Do I need to use any design pattern in this? or what kind of design pattern is this?
4
2468
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 suspect some permissions problem. I'm running VS.NET 2008 in Vista. Symptoms and observations: * ASP.NET's native ImageMap and Image controls work just fine and provide a design-time preview of images that are referenced via the ImageUrl property *...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.