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.
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 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
I have to do a web application with the framework .Net. I find three ways to build this application:
Sharepoint
Silverlight
Asp .Net
I need to make a decision and choose one of them . So i'd like to know
What are the big differences between them?
In which cases, i have to choose one not the others?
Can we make a comparison between them on several criterias(flexibility, maintenability...)?
Thanks,
It's hard to recommend one over the other without knowing what your application is.
Choosing Technology choice can be judged by many parameters as below,
· User Experience
· Infrastructure
· Security
· Performance
· Architecture
· People
· Strategic
· Cost
· License
SilverLight
One thing you have to understand 1st and foremost is that Silverlight requires the client to download a small Plugin (just like Flash does as well) to enable all that rich-client capability and the ability to run managed code on the client. If you are in an environment where either distribution or downloading of the plugin is not possible then Silverlight is out as an option.
ASP.Net
ASP.NET on the other hand is the old trusty web platform that has been around since .NET 1.0. And now with the option between web forms and ASP.NET MVC you have many Architectural options available for building your ASP.NET app. Combine technologies like WCF into the mix, and you have serious potential for writing and creating Enterprise Applications.
If you want or need the rich UI abilities of Silverlight, then make a few controls and add them to your ASP.NET pages to give you the best of both technologies without being too heavily invested in Silverlight.
My Recommendation
If I was in your position I would probably go with an ASP.NET application (webforms or MVC is your choice.).
I say this not because ASP.NET is superior and Silverlight can't make Enterprise Apps , but because it is the safer and more reliable choice I think given what our future looks like in .NET.
I can comment largely on the general http/javascript vs. Silverlight decision, as I have no experience developing in Sharepoint.
Browser compatibility
Html/javascript used to be notorious for incompatibilities, and although this has improved a lot, Silverlight is still better in that area.
The plugin behaves mostly the same in all browsers. I use Chrome myself and my customers usually use Internet Explorer, some Firefox. In the last few years I had not one problem due to a browser incompatibility - and I know how much web developers used to fight with those. This is probably one of the main strengths, if Silverlight runs on a platform, it runs the same as on all others.
There is one subtle and not well-known caveat (bug) though, but it's not depending on the browser. There is a certain kind of memory leak that can occur on tablet devices, see this stackoverflow answer. It's the only time I experienced a Silverlight application to be dependent on an environmental factor.
Operating system compatibility
This is a major point for html/javascript, as all major browsers are ported to all major operating systems and platforms.
Obviously you are going to run Windows-only with Silverlight. There is a mac implementation, but you should test early because there Silverlight might actually do behave differently in many cases. I can't say much to how serious that implementation actually is.
Much more disappointing is Microsoft's policy on their own platform: The WinRT tablet (the non-professional, ARM-based one) doesn't support Silverlight, and of course the metro-IE doesn't either (infamously).
In a nutshell, Silverlight is still a viable option in cases where you target a corporate environment where you can estimate the hardware your customers will have, as well as in those cases where there are few technical alternatives - such as when you need a good adaptive video streaming technology.
Third party designs
One thing where html-based solutions can shine is design: Although I love Expression Blend, my love doesn't seem to be shared by most web designers. The amount of html/css templates you can find for html, even for line-of-business applications, is amazing. For Silverlight (and WPF), there is almost nothing at all. In fact I don't know a single beautiful design for Silverlight that hasn't been created by Microsoft themselves - and they too have created ugly ones as well.
As someone who loves Silverlight - the ability to just pick and buy a really beautiful theme for my next app is probably the thing I'm most envious of when I'm looking at the html world, much more so even than platform support.
Today I'd suggest html as a default unless the one of the following points apply:
You are already familiar with Silverlight (or your team is).
You need to do complex rich-text editing capabilities that go beyond an html editor.
You need to access COM interfaces or do P/Invoke on Windows (although you can also supplement a html/javascript client with Silverlight for that)
You want to provide the ability to "install" an application (out-of-browser mode).
You have complex business logic that you want to execute on the server and the client alike, and you want to write that in C# rather than Javascript.
If any of these things hold, Silverlight might be an option (as well as WPF).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I know C++ windows programming is harder than C#. Because we should Create WNDCLASS and Initalize it and using API Funcs and...
But My Question is here , for windows programming ,Is C# better than C++ ?
If yes , why large programs are created with C++ .
Its not "large programs" when C++ is favored over C# managed code.
There are limits to what can be done with managed code, for instance you cannot write hardware drivers or other programs that interface with hardware. You cannot even access all of the Win32 API from purely managed code. Some programs have high performance requirements and are therefore more suited to C++. Sometimes C++ is used simply because the company developing the software has skilled C++ developers. Sometimes C++ is used because the developers don't want the software to be dependent on the .NET framework (which isn't installed out of the box on XP and earlier Windows versions). Sometimes C++ is chosen so that a cross platform application can be developed.
In broad terms, C# is easier to learn and is a more powerful and productive language & framework than C++/MFC/COM etc. But C++ is a very broad tool, and can produce solutions to many very diverse problems, from writing operating systems, real time systems, embedded applications, databases, business software, desktop software, server software, libraries/frameworks, etc, etc.
C# is better suited to a particular class of problem. It is pretty much limited to running on Windows (with the exception of Silverlight & Mono). C# suits rapid application development, which means it is better suited to one-off custom software, such as many internal applications developed within large organizations. And as I've indicated, its more suited to developing desktop and server application software over drivers and other low level software.
If you're looking at which language to start learning, a smart choice would be: C then C++ then C#. This will give you the foundation you need to become a really good object oriented programmer, with an understanding of how lucky we are to have C#! If you don't have 10 years to spare, then go ahead and start with C#. Whatever you do, don't start with C++ or you are likely to give up your programming career in despair and join the circus where things make more sense.
If I could start from scratch all the c++ projects I have done in the past, 99% of the code would be in .NET. Especially when it comes to UI. WPF, Winforms are much more powerful than MFC.
What type of program will you develop? Please elaborate and then we can make a recomendation.
** EDIT
A good example is Visual Studio itself. VS 2010 is based on WPF now.
Better? Better how? Easier? Faster?
C++ is a monster to learn, huge and complex as it is. C# is considerably "friendlier" and easier to work with. C# often lets you complete tasks faster and easier than C++, because the language and it's framework does a lot of work for you. This is part of what makes C# better than C++, and what makes C++ better than C#.
If you let C# do the work for you, that means that you as a programmer sacrifice some control. This is what sets a high-level language apart from a low-level one. For demanding applications, programmers tend to pick a language that provides the necessary amount of abstraction while still providing the desired control. This is why many demanding applications (such as video games) are written in C++. It has a fairly large array of high-level features, while still packing the horsepower to pull really low-level code for situations where you need absolute control of the hardware. It is also why many business applications and other less demanding applications are written in a high level language such as C#, since these applications have no use for low-level features, and can safely enjoy the gains of high-level ones without worrying about performance penalties.
In C#'s case, all applications created with it run in the .NET runtime environment. This is a disadvantage for programs that need to run fast, since you want to be as close to the hardware as possible. So again, C++ wins for demanding applications where either execution speed or memory usage is crucial. Also C++ can be used on a very large amount of platforms, anything from PCs to coffee machines (okay, cell phones, then), while C# is officially limited to platforms running Microsoft Windows.
As for ease of development on Windows, C# is a clear winner. There are available frameworks for C++ too, but they are not even close to C# when it comes to getting things done fast and easy. That said, it is perfectly possible to write complex GUI applications for Windows in C++ without swearing too much.
Anyway, I hope you see how little sense it makes to compare languages like this. It's much like comparing a hammer to a screwdriver. Choosing a language is about choosing the right tool for the job. Many tools overlap - you can accomplish pretty much the same in C++ and C#, which complicates the choice. If you really want to read into this (going for an "educated choice"), I suggest you read up on the individual languages. If you just wonder which language to learn, I suggest you start with C#, and learn C++ if you ever need to (or want to).
C++ and C# both are really good languages, having said that both have their own specialities.
C++ is ideal for applications which needs to highly optimized memory and cpu usage like verly low level device driver development
C# is far superior for creating business applications like accounting and database driven applications which would take ages if you try building them in C++
In short
C++ is for applications which require highly optimized memory and CPU usage.
C# is far productivity and enterprise applications
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.
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 5 years ago.
Improve this question
I'm going to advise a company on a project soon, and I'm not too sure about what programming language I should advise.
It's a fairly straightforward (desktop based) application with a central datasource on the network, for storing and editing parts that make up a machine. The machine needs to be configured in the application, and with this configuration production documents (manuals, software, bill of material) are generated. (e.g. if part A and B are added to the configured machine, then variation X on chapter 5 of the manual has to be used, if that makes sense)
There's a few non-standard components like a tree with radio & checkboxes, and it has to have some sort of version control in it. It needs a WYSIWYG editor to edit chapters of manuals. It doesn't necessarily have to run on platforms other than Windows because it will only be used on the company network and everybody runs windows.
I was thinking Java because of it's huge numbers of useful libraries and free IDE's. I'm a Java programmer myself so I'm not very familiar with other programming languages. Any thoughts on what language I should use, and why? I believe there's a bit of VB/VBA and Delphi knowledge present in the company (it's not an IT company and I'm not likely to program it myself).
Thanks heaps!
From what your describe of your application and environment, nothing can beat Delphi!
It's the ideal case for Delphi to shine:
- native desktop application with fastest performances and development combined.
- plethora of excellent (often free) components; you'll probably find your tree
- extremely powerful yet simple for DB applications
- very active and helpful community
See also why I recommended it for another SO user.
I think if you have Delphi knowledge in your company : it is a very good choice for Desktop application and as avar says : you can find a lot's of good components here Torry's Delphi Pages.
I recommend this article
for desktop applications ( plus with database/win32 things) i'd recommend delphi. u can find many good components availabe .
You probably want to choose the language that your team has the most experience with. I personally am into Delphi, and it sounds like this might be a good choice for what you describe. Delphi is highly suited for Desktop apps talking to a database. However if your team (those writing and maintain the app) are more experienced with Java / C# / VB then you should go with that.
Well the scenario you describe is not very language specific, so
here are a few hints:
generally, java is absolutely ok but:
In a windows world, you can live easier with .net languages,
because of direct access to COM/activex for combining documentation snippets
in adobe or Word
since there's some vb knowledge about in the company, maybe the task of
maintaining the software becomes cheaper.
I would suggest c#, because via mono, you can go Linux where and if necessary.
well, that's my 2 cents.
Depends. On many things. What language are you familiar with? What database do you use (MS SQL has some advantages when used with a .NET language, but can also be used with java, or ...)?
The libraries are (at least for me) not a main decision point since there are a lot libraries for other languages too.
If you do not program yourself, ask the developer doing the job. Projects have other marks than technology such as time used and money spent. If you choose a language the developer is familiar with, it's more likely to be in time and in cost.
Your question is somehow far too open to give an exact answer. But maybe this helps you to think about it.
You should use whichever language is:
1) Most appropriate for the project
For example: If your project requires real-time processing, use a language that is conducive to performing that task.
2) You (and your team) is most comfortable with.
You would need to discuss with your team whether any languages that you currently know between you all are appropriate (keeping point 1 in mind). If none are appropriate, which language (with point 1 in mind) will all be most comfortable with in learning, developing and supporting (maintaining) throughout the life-time of your project.
This sounds like very curt advice, but I believe it's crucially important. If your project is to succeed, you need a language that you can "live" with, and will work with you rather than against you. If you were a wood-worker, you could use a hammer to put screws into a piece of wood, but wouldn't you be much more comfortable using a screwdriver?
Of the tagged languages, avoid asp.net as it's a desktop application. Other than that all the other languages would do a good job. It would come down to personal preference (more importantly the personal preference of the developer).
I'm a Java programmer myself so I'm
not very familiar with other
programming languages.
If you're going to write the software you should use Java. You're already familiar with it and your familiarity can help you delight your customer.
If you aren't writing it you need to find out who is and take their experience into consideration. Having them learn a new language just because you don't know what they are familiar with is not exactly a good way to go.
Java would work, C# would work (I would personally pic C#), it really just depends on the experience you have available.
What is this about the "non-standard" components? If there are 3rd party controls they want to use that might dictate the language/platform to work with. There are lots of free controls and examples in Java and C# as well and extending the standard Java / .NET controls might even work better that going with the 3rd party controls.
Sounds like you need to know more about the application and some other things that are out there before you can really be advising somebody else on what to do.
Well, there is a lot of wisdom with using what you know (Java).
However, just to counter the "because of it's huge numbers of useful libraries and free IDE's" - .NET also has a huge library base, and free IDEs (including the Express editions of Visual Studio). For .NET, C# would be a "closer" language to Java than VB.
I reckon you'll end up with Java, though (through familiarity - not always a bad thing).
When we build client side systems we use .Net (C# usually). We do Java on the back end, but it sounds like you may not have a traditional back end. For all the libraries and frameworks that are available for Java the vast majority of high quality UI components are in the .Net space these days.
When you are managing the development and someone else is doing the implementation and maintenance then I'd suggest to negotiate the programming language with them.
When you have to do the maintenance then focus on languages that you know.
If you do all/most of the work, just use what language you are familiar with, when you don't have enough time to learn a new language on the way. Especially if the application is important and needs to be pretty bug free. (although there is never a "last bug" as we all know) ;-)
The amount of 3rd party libraries is not a good criterion because this doesn't reflect their quality (maybe most stuff is crap) and many libraries means also a big chance to select the wrong one.
Don't forget to check if the chosen language is capable of doing the job. (Speed, platform constraints, memory footprint, ...)
I think it doesn't really matter that much in which programming language and environment you program, as long as you get to know it thoroughly. C++, Java and C# all have good libraries and all have their strengths and weaknesses. The important thing is that you know the peculiarities of the language, the development environment, the debugger, a good profiler, the standard libraries, the best third party libraries, etc... Moreover, after a while you can reuse your own code as well. For example, you mention an advanced tree widget. In our company, we have our own tree (in C++) which we can finetune as we like.