Saturday, May 9, 2009

Which language is best for GUI programming?

I want to write a fast, efficient GUI application but I'm confused as to which language I should learn. I did some research but couldn't come to a conclusion.





* Java - performance too slow, takes up much memory





* wxWidgets - corss-platform is nice, and it is relatively fast and efficient but knowing this language won't get me a decent job as it's rarely used out there





* WTL - very fast but it's an open source that is seldom updated.. and is used very little in real life. Like wxWidgets I am not excited about learning it if it's of little value to put on my resume





* C++/CLI or C# (or any .NET language for that matter) - GUI performance is crappy just like java





* MFC - I would've used it if it is not being obsoleted by MS. What's the point of learning a soon-to-be-dead language?





* Qt - slow like java and .NET because it does not use native controls. The GUI even looks non-native and non-professional





I can't believe there's lack of an obvious choice in 2007? Common!

Which language is best for GUI programming?
You are mixing up laguages and libraries / frameworks.





Java / C++ / C# are languages.





wxWidgets / Qt / WTL are platform independent libraries (partly for Java and C++)





It depends on your target platform and on your knowledge.





Target platform only windows:





I would use C++.NET or C#.NET. It provides the best Windows integration and performance. I don't know why you think that .NET programs have a slow GUI. I cannot confirm.





Target Platform Windows / Linux/....





I yould use a platform independent library like Qt or wxWidgets. Ot is the base for KDE desktop.





Java 6 has very good interfaces and it's almost near to native windows GUI.





I cannot agree with your statement that in 07 is a lack of choice.


But:





Good luck.


M.
Reply:Qt Library is available for Java as well. Good luck and thx for your choice ;-) Report It

Reply:I would use JAva
Reply:Simple Direct Layer and C++.........Boo and Sharp Develop more options........simple direct layer is more for menus but you can use it with C++ to make a pretty sweet GUI and Boo and Mono Develop multi-platform .Net frame framework
Reply:You answered the question for yourself. If you are looking to get reliable work out of learning a language stick with C++/C# and the .NET languages. The big 3 consulting firms and most medium to large size companies are utilizing those resources with the Microsoft skill-set


Can anyone help me with Visual C++ runtime error? - "The application has terminated in an unusual way."

I had a problem with the VirusBurst and was up all night trying to fix it, which eventually, thankfully, I did. However upon reboot, I kept getting a CLI application error (Failed to initialise properly - 0xc0000135) which after some Googling, I found was a problem with the ATI Catalyst and needed an installation of .Net Framework so I decided to install V1.1. So far so good. Installed dotnetfx.exe quickly and easily. BUT (why does there *always* have to be a "but"? That would make a good question on its own methinks! lol) when I try to install the SP1 security fix, I keep getting:-





"Microsoft Visual Basic C++ Runtime error! - The application has requested the runtime to terminate in an unusual way."





I've been Googling and searching and reading for what seems like HOURS and I'm sure others must have had this problem so can anyone PLEASE advise me how I can solve this, either by posting the answer here or giving me a helpful link - or links?





Thanks a lot.

Can anyone help me with Visual C++ runtime error? - "The application has terminated in an unusual way."
sound like your Visual C++ installed is corrupted try re-installing Visual C++.
Reply:reinstall it again.
Reply:The error messages is a bit odd, Visual Basic and C++ are seperate products. Is there not a number or can you provide the whole message.


Help needed on C# for negating an integer using bit shift/Two's component?

Hi there,


I have an integer say 30 and i want to make it -30 (minus thirty) but i dont wanna use this :-





int a = 30;


a = a * (-1);





I wanna make use of bit operators .. can any one please help me on this. The code i need is in c#.NET.


Is it so that using the multiplication method (with -1) dosent make any difference, as the final assembly code (CLI) generated for this code will be efficient and take care of this ??


I hope u understood the problem.


Thanks in advance, appriciate you help.





.[]\[].[].[]\[].

Help needed on C# for negating an integer using bit shift/Two's component?
int a=7;


a = ~a;


a++;





That should do it.

bouquet

Can someone answer these questions reguarding MS Visual C++?

1. How to enter strings (i.e. a name, address ect) while program is running?


(Data type "char" isn't work. It allows to enter only one character)





2. How to execute a program (Win32 Console Applications) without C++ environment?


The exe inside the "Debug" folder can be executed without C++ environment.


After some commands have been executing, the program suddenly vanish.


I've written the C++ command "return 0;" at end of the code. Is that the case?


What is the command / code I should write to stop that disappearence?





Note : Win32 Console Application executes in CLI (command line interface).








3. How to make a stand-alone in C++? (i.e. An exe without debuging information. It should execute without C++ environment)

Can someone answer these questions reguarding MS Visual C++?
1. scanf or fgets





2. when the program completes the console closes. add a System.pause or another read in statement to keep the console from closing.





3. compile a release version.


Where can I learn to build a CLI in Linux?

I want to build a CLI program with a command prompt in Linux, preferably using C++ (or maybe even Tcl). Where can I find resources? I need a good starting point, but whenever I search for answers I get other programs with their own CLI or prompts.





Something that I could also make work in DOS eventually would be great, but Linux is more important right now.

Where can I learn to build a CLI in Linux?
Not sure what exactly you're asking for. Are you experienced in C++ or Tcl? A C++ program with a command line interface is very easy to write. You just read input from stdin and write output to stdout. A very simplified example:


...


int input;


cout %26lt;%26lt; "Main Menu" %26lt;%26lt; endl %26lt;%26lt; "1) option 1" %26lt;%26lt; endl %26lt;%26lt; "2) option 2" %26lt;%26lt; endl %26lt;%26lt; "Choice? ";


cin %26gt;%26gt; input;


...





You can take command arguments at run time using the standard argv and argc notation. For example where foo is your program: "$foo -a 50" the command line arguments are "-a 50".





Suggested things to search for "c++ argv" for run time arguments and "c++ read input", "c++ I/O", etc etc for building a command line interface to your program. If this doesn't answer your question, perhaps you could clarify what you wish to accomplish?


What's the different between these C++/CLI , C++ , C# and what's the best?

The real answer for the main part of that question is probably "it's up to you."





C was invented at Bell Labs in the early 70's (started in 69). The design initially was based on the "B" programming language which has since died. It was initially developed on/for Unix systems but it obviously turned out way more valuable and advanced from there.





C++ is "Object Oriented C." Essentially, there's extra language constructs and implicit background stuff to make it object oriented. It's still pretty much always used to compile raw native CPU bytecode. So when you have "int a = 5;" the compiler will still compile that into the cpu instruction to assign 5 into a register (and possibly other things so that it all fits or to prepare for upcoming calls, enhancing performance). This is why Microsoft distinguishes "native code" from "managed code"





In the case of both C++/CLI that native code is wrapped like crazy in MetaData and Library code so it can be accessed by other languages. So a call like that might do a lot more on lower levels. In other words, the performance of this one is inferior to the native C++. But there's definitely a tradeoff. The point of managed code is convenience. It is quite easy to write applications in C++/CLI relative to native C++. And more complex facets of things like memory management and such are automated. So it makes it less error prone.





C# just another language entirely that looks like (I'm not sure if it really is) a combination of Java and C++. Like java, it's quite simple to write in. An advantage over Java is that it uses better methods of garbage collection and implements native code (it can because it's not marketed to create cross-platform binaries). So while slower than native C++, it is much faster than Java. But the tradeoff is then your binaries will only work on Windows. But then again, none of these three languages provide cross-platform binaries.





In all managed code, you get a very large library of predefined functionality that in native C++, you would have to manually write or search for and download whlie worrying about licensing. Pretty much any everyday coding can be done using the .NET CLR builtin API without any of these kinds of concerns.





C++/CLI and C# would theoretically have no performance differences. I haven't tested, but if there are, it's not because of the technology itself (like in Java). It would more likely be just because the MS C# compiler has had less life and thus less fine-tuning.





...





In summary, C++ is what is better if you are looking for speed and at least a little (and it is only a little as opposed to none) portability. If you want to pop out your application fast, C++/CLI or C# is the way to go. C# is actually probably easier to code with while C++/CLI is a good intermediate between native C++ and C#. I personally am of the speed-demon result types, so prefer native C++. But in business, the "pop-it-out-quick" type is probably more useful.

What's the different between these C++/CLI , C++ , C# and what's the best?
c* is the best
Reply:C was the original. C++ wasa later version. not sure about C++/CLI, but C# is the most recent incarnation of the C language. It is used for making web based applications.


Can you run a C++/CLI application on .NET 1.1?

Can you somehow target a C++/CLI application developed on VS 2005 for .NET 1.1?

Can you run a C++/CLI application on .NET 1.1?
I think it's not possible. I would try to compile it with earlier VS. If you found other way - please share it.

gift

Excel automation using C++/CLI?

How can we automate Microsoft Excel using C++/CLI. Is "Adding refernce" the only way to do it? I wanted to write a generic wrapper class for this.

Excel automation using C++/CLI?
If you are thinking about inserting the reference into Excel object in your C++ project, then you can not access Excel object.





Did you tried the VBA of Excel?





It is simple, easy to learn





VBAXLMan


C++/CLI Compilers?

What C++/CLI (ECMA 372) compilers exist besides Microsoft's?

C++/CLI Compilers?
BORLAND!!!


(No, actually, they're not bad, so I've heard)
Reply:Do a search on g++, which is the GNU C++ compiler. It is free, but is is console based so AFAIK it still runs under a command window. I don't know if it will help you, but you never know.


C++/CLI versus unmanaged C++?

Is C++ / CLI popular with commercial software developers? or do many still work with unmanaged C++ code?

C++/CLI versus unmanaged C++?
Generally speaking, C++ is faster and more versitile than C#, although it tends to be less safe. But if you're planning to write code in a managed environment, C++/CLI is a pain in the neck. It's complicated, non-portable, and hard to read when you're done.





So why do it? Basically, there are times when you want to write in C++ for a variety of reasons (flexibility, speed, control, etc) but you need to write code that can interact directly with managed code. Let's say you're writing the bulk of your UI in C# or Visual Basic, but you have a somewhat low-level layer you're hoping to write in C++.





I wouldn't say it's "popular" among commercial software developers (I've been writing software professionally for 15 years) because nobody I know really *wants* to write C++ this way. But it's another tool in the toolbox that you can pull out and use when it's appropriate.





The vast majority of "shrink-wrapped" code these days is written in unmanaged C++, although C# is making big inroads. By shrink-wrapped, I mean code that isn't part of a web site or web service, or that isn't custom developped. If you're writing code and selling it to end users, it's likely unmanaged code.





Good luck.
Reply:The problems with C++/CLI come from a couple of different directions.





First, it is Windows only and that turns a good portion of developers off right from the start. Even something like Mono, basically .Net for linux, does not support C++/CLI as far as I know.





Second, and not so much important as irritating, is that managed C++ is in some respects non-standard. C++ is already difficult enough to learn and use properly without piling on a bunch of non-standard additions. (For fairness I would extend that criticism to things like gcc language extentions as well.)





Thrid, C++/CLI doesn't seem to have a genuinely compelling use case. There are some *very* minor things it can do that C# can't within the confines of .Net but on the whole C# is an easier language and if it can do 99% of what manage C++ can do it is stupid not to use it.