Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am going to program a GUI under windows (will be about 10,000 line code with my estimates) and don't know C# or C++ (QT library) to choose for my needs. Please help me to choose.
If you have to debate on using C# or C++ then the correct answer is probably C#. I would stay away from a low level language like C++ unless you absolutely have to as the amount of time required to develop/debug with it will be much greater. C# has a lot of GUI functionality that it harnesses from the .NET framework. There isn't a lot you can't do with it right out of the box as opposed to C++ which you'll have to hand code a lot of functionality.
If you are developing a Windows application I'd suggest using C# and the .Net Framework as they are the 'native' solution. Using QT is just going to add complexity as it's a cross-platform library and has additional concerns therein. I'd also suspect the support for the .Net Framework is likely to be greater and more widespread.
The overarching question would be, which programming language are you most familiar with. If there is a Windows compiler for it then use that!
Use .NET if your only target is Windows. It is much more productive and you have better IDE support for development of GUI. The disadvantage is that you need to have .NET framework installed on the machine your application will run on.
If you consider going cross platform, or you think you master Qt (and C++) more than .NET, then go on with Qt.
I'd prefer C#.. In some cases is easier to distribute (windows 7 comes with .NET). Microsoft showed that the future is in WPF, so why wait to adopt it
Choose the GUI toolkit based on your requirements, then choose the language.
if QT fits the bill, then C++, if WinForms looks good, C#, if MFC (and the new feature pack) is good enough, C++ ....
Also, depending on your skill (and the skill of your team) of one language or the other, your decision might be easier.
What are the requirements? If the performance is not an issue then I would go with C#.
I think the question should be using c++, .net winforms or wpf.
You will never use c# lonely to build it, you will use the IDE.
If you need something visual I should use wpf, otherwise I would use .net winforms. You can mix them too.
Regards.
One other option you may want to consider is gtksharp if you want to use c# but would like to target multiple platforms.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm making a multitouch-screen app that for its function will just have to get positions of objects on the screen, have them ordered, be able to select them and drag them (sounds basic). I will also have to have a kind of history of actions so I could press the typical "Ctrl+z" and get X number of actions undone
The only language I know is C++ and I have made two simple GUI programs for Windows 7 in the past. For the porpoise of my app which is meant to be used by professionals, the screen should be 14inchs or bigger, considering there are 2 O.S. that support touch-screen events: W8 and Android, and how the app needs to be (explained in the first paragraph):
Should I have to learn another language to get this done?
If yes, what should it be: C# or Java? By what reasons?
If no, could you recommend any C++ libraries to: manage touch-events, make the GUI (both libraries should be free for commercial use).
Have you considered using libgdx to write multiplatform stuff: http://libgdx.badlogicgames.com/features.html
there is a C++ plugin for it here:
http://aevumlab.com/libgdx-cpp/
The beauty of libraries like this (and there are quite a lot when you google them) is that if you haven't got the time to learn a new language you can work around it this way. That being said if you see yourself working closely with Android in the future it wouldn't hurtto dip your toe in Java.
First of all, what do you mean there are two operating systems that support touch-screen events? What about iPhone and Blackberry? Or Google Chrome OS?
In any case, I think you've got your question backwards, or I don't understand it. You do not choose a programming language and then decide your target platform. That hardly makes sense. You will usually have requirements by customers dictating the target platform, and only then you start to think about programming languages.
If there are multiple target platforms, then you may choose to reimplement the same application in different programming languages for each system. Or it may turn out better to use shared native C++ or C code which can be reused, at least partially, on several platforms. These are classical software-engineering tradeoffs, and it's impossible to tell you in general what's easier or more efficient.
You've tagged your question as "Android". For an Android app, you will usually want to implement as much as possible in Java and resort to native C++ or C code only if necessary. You do not use C# on Android. Mind that the often-heard assumption that native code is automatically faster is typically wrong and is made by people who do not measure but guess. Native code may be faster, but it may also be slower because of the extra indirection. However, as I said, reusability of native code on other platforms may be an important advantage and beat related disadvantages, such as reduced robustness or harder development.
C# does have some nice support for touch screen, and it is a great next step from C++. Learning an extremely object oriented language such as C# or Java is almost a must these days. Though a touch screen application isn't exactly 'Hello World', making a small, touch-based app is a good way to get into the WPF side of C#.
To get you started, see this MSDN article: http://msdn.microsoft.com/en-us/library/ee649090(v=vs.110).aspx
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am looking to make a data visualization tool that will visualize biological data. I am used to being a C# and .net coder. However, as I understand it, you can run into trouble if you are running a C# app in ubuntu. Any suggestions for a language to use with these specifications in mind? I was thinking Java but am happy to take suggestions.
C# is a solid choice, especially if you already know the language. C# and the .NET framework have a solid cross-platform port with the Mono project and you can create Gnome UIs using the Gtk# bindings.
As an alternative, Java is used for a lot of bioinformatics applications. Though personally I have to say that most of those have horrible user interfaces and Java’s memory management seems ill-suited to deal with the data sizes that are common in bioinformatics – tools routinely run out of memory or become extremely slow. This isn’t necessarily an inherent problem of Java as much as sloppy programming, but Java certainly doesn’t help.
An alternative to Java would also be Python with a suitable GUI library (there are some good ones), especially since Python offers a much nicer, more polished syntax.
Yet another alternative that’s worthwhile especially if you’re really dealing with big data or if performance is important, would be C++ with Qt to build the GUI. Note that this will make development vastly more complicated if you’re not already proficient in C++.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How can I make an interface for console applications to make them look like edit.com under Microsoft's operating systems. Target languages are C, C++ and C#.NET.
Have a look at curses:
e.g.:
http://sourceforge.net/projects/curses-sharp/
That would be based on a very simple framework which writes directly to the video to draw the underlying shadows, drop down menus, etc, not alone that, since 'Edit.com` would be written in assembler for speed in relation to drawing, this is quite ancient by today's standards, you can however take a look at PDCurses which will enable you to do this kind of thing.
The neat beauty is, PDCurses is compatible with the unix equivalent of Curses.
But, really, today, it is all about GUI and Windows....
What kind of application are you trying to do?
IIRC, from my old days, there was an object orientated framework for this using TurboVision, which has a port available with open source now, see this wikipedia entry on this TurboVision.
Today, console applications are either old DOS applications emulated more and less in Windows, or command-line interpreters.
Anyway, if you really want to do an editor, use the System.Console class in the System NameSpace and use the SetCursorPosition method to write what you want where you want
The edit.com window you are showing appear to be developed with Turbo Vision, an old console gui library written by Borland many years ago.
Borland put the software in public domain and release its C++ sources. There is also a porting to Pascal, developed by the community, called Free Vision.
Unfortunately ,I don't think there is a porting or a wrapper to dot.net, so you have to write your own. Or, at least, you can look at the sources to get inspired...
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Apologies in advance for the possible flame thread, but that's not what I'm going for.
I've only ever done serious development in Linux using C and C++, and I'm looking to take the plunge into Windows. I've been doing some reading and asking around, and it seems to me that .NET with C# is the way to go for developing commercial user-oriented business applications for Windows.
A big consideration for me is the integration of the user interface into the desktop, since this is what the user ultimately interacts with. Is it possible to recreate the look of the Office 2007 GUI in Java, for example, or is this only possible with .NET?
I'm also concerned about portability. In the future, I may want to port the application to Linux. I know about the mono project, but I'm wondering if it wouldn't be better to go with Java.
In short, what are the trade offs between Java and C# when developing commercial, user-oriented business applications primarily intended for Windows?
The most important bit is in "primarily intended for Windows".
If you only need to work on Windows, C# is likely to be a much better bet than Java. There's a better variety of visual styles which blend in well with Windows. It also makes interoperating with native code (e.g. bits of the Win32 API or COM libraries) easier than Java. Personally I prefer it as a language, but that's a different matter.
If you need to run on other platforms, I'd seriously consider Java. While Mono has quite a lot of momentum, it doesn't have the same degree of compatibility with .NET as Java does on the various platforms it supports.
So basically, weigh up the "may want to port" aspect very carefully - it's the driving factor in the decision, from my point of view. Once you've decided to do a port, it doesn't matter much if 90% of your customers are on Windows - it'll still need to work, and work well, for the remaining 10%.
First off, whether or not your GUI will look good on windows will depend more on your skill with GUI design than it will on your choice of language or toolkit.
Windows Forms doesn't really give you full access to the Windows GUI functionality using the documented API. You'll have to make calls to native API functions or at least use windows-specific messages to achieve some effects. Also, I don't think there is a built-in way to access the Office 2007-style ribbon control. You'll need a 3rd party component for that.
A lot of .Net apps rely on 3rd party widget sets to achieve nice looking GUIs. Be warned that these frequently rely on P/Invoke or other windows-specific functionaly and thus don't work on mono. So if you really want a cross platform GUI, .Net is not the best choice.
You can also do .Net GUIs in Windows Presentation Foundation, but again this is not supported in mono.
GTK# works well on Unix and windows, though it looks slightly less native on Windows.
Java Swing is very cross platform and is looks pretty good with a platform native look and feel. You could download Netbeans to see it in action.
SWT is an alternate toolkit for Java that has slightly less cross-platform compatibility than Swing, but is still popular nonetheless. Eclipse uses this toolkit, so download that to see it in use.
Since you have an expirence with C++, you can go with C++ plus Qt for GUI. It's a good cross platform GUI library, and you can recompile the code to work in Windows, Mac, and Linux with consistent look.
Sure you can make nice interfaces with it, but maybe not as cool as MS Office interface (Microsoft blend).
You may consider it as an option.
http://www.qtsoftware.com/products/
Examples
http://www.qtsoftware.com/qt-in-use
If application is primarily for Windows - use .NET.
If you're serious about porting later - avoid use of P/Invoke, .NET above 2.0 features and 3rd party toolkits with rich GUI (which aren't running on Mono)
There are present nice and commercial .NET cross-platform apps including nice http://www.codicesoftware.com/xpfront.aspx
plastic scm UI http://www.plasticscm.com/screenshots/gui27/visual/brexplorer04.png
and many others - http://www.mono-project.com/Companies_Using_Mono
Also many developers prefer VS IDE over Eclipse and C# over Java. But if your application primarily Windows - I bet it's better to use .NET. ESPECIALLY if GUI integration is main concern, because making Java applications look like native Windows still painful. Under .NET there are LOTS of controls for Ribbon interface (inluding native one). Try to find same for Java with proper look and you'll understand what I mean
With Mono (if you will keep the main rules) most of the time you won't have a problem of porting and embedding Mono itself inside your application.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Is it possible to do CAD/CAM software without having to use C++? My company developed their software with c/C++ but that was more than 10 years ago. Today,there is a lot of legacy code that switching would force us to get rid of but i was wondering what the actual risks are. We have a lot of mathematical algorithms for toolpath calculations, feature recognition and simulation and 3D Rendering and i was wondering if C# can handles all of that without great performance loss.
Is it a utopia to rewrite such algorithms in c# or should that language only deal with UI.
We are not talking about game development here (Halo 3 or Call Of Duty) so how much processing does CAD/CAM really need?
Can anybody enlighten me on this matter? Most of my colleagues are hardcore C++ programmers and although i program in c++ i love .NET but i am having a hard time selling .NET to them other than basic UI. Does it make sense to consider switching to .NET in such a field, or is it just not a wise idea?
Thank you
If you have a lot of legacy code that would need to be rewritten, I don't see it making business sense to switch to a different language. Even if there were gains to be had from using a different language (which is questionable), the cost of testing and debugging the new code would more than overcome them. You also have a development team that are experts in C++. There would be a big productivity drop while they came up to speed on the new language.
C# Can interop with C++ code. You can start writing new code in C# and have it call existing c++ code when needed. It wouldn't have to be just for UI. Look into C++/CLI and the C# Interop methods for information on how to use existing c++ code with new C# code.
Also, I asked a similar question here:
C# Performance For Proxy Server (vs C++)
CAD/CAM applications are fairly calculation intensive, and speed will definitely be one of the criteria for selecting a package, so I would be wary of moving to a slower language.
You need to think very carefully about the reasons for switching language. Is it because you don't like C++, or because C# will bring real benefits. It is quite likely to slow your application down. Check out the C++ C# speed comparisons.
Computer Language Benchmarks Game C++ vs C#
In my humble opinion, you'd be better off keeping all of the toolpath calculations in C++, and if you really must move any code over to another language, move it over to a scripting language which the user can easily edit, without re-compiling.
I use CAD/CAM applications every day at work, and there are a number of things in the UI which get on my nerves. They would be simple fixes if only I could get at the source.
If your company makes a CAD/CAM application which has a UI written in a scripting language which I can tweak (Lua, Python etc), I'll buy a copy.
Hugo
Have a look at pythonocc. Its provides you with a python module that wraps the OpenCASCADE CAD kernel. OpenCASCADE is the sole industry strength open source kernel I'm aware of. Nice features are STEP and IGES support and the ability to generate FEM meshes from BRep data.
Another thing you need to consider is platform independence - if there is a possibility that you/you company need to migrate your CAD software to Linux/Unix (Of course, for bussiness decision), it will be quite painful. Currently, even C++ with MFC/Win32 calls gave us many headache...
The Open Design Alliance library is cross-platform. They have recently introduced a beta of the .NET version of their library. See my answer to Open source cad drawing (dwg) library in C# for more details.
Having said that I concur with the other answers here - if it ain't broken, don't fix it, both the code and the coders. MSFT still use C++, as does the ODA - their codebase originates in C++ & is wrapped for .NET.