-
You can use C++ for .NET development, but it'll be a somewhat modified version of C++ (C++/CLI). You might as well just learn C#, to be honest. (Personally I think C# is a beautiful language, but there we go.)
There's much more to learn in terms of the framework itself than languages - even though the languages have been gaining features, the libraries have been growing even more quickly.
All of this is still simpler (IMO) than learning the Win32 native API though.
For essential reading, I'd recommend "C# 3.0 in a Nutshell" and "CLR via C#". (Links coming when I'm not overdue laying the table for dinner...)
-
Should I learn .Net?
Depends on whether or not you feel this would be advantageous to the niche your are looking at. For instance, if your niche is a desktop application it's probably a good idea to get started because, IMHO, it's so much easier to develop a WinForms,WPF GUI than a C++ version,
Do I need to learn C# in order to use .Net, or can I stick with C++?
C# is not a requirement and using C++/CLI allows you to take advantage of .Net while still using C++. However, I tend ot only use C++/CLI for components which are heavily focused on interop between managed and native code. It is particularly good at that kind of development. If you switch to more mainstream applications I think you'll find that C# or VB.Net will suite you better. Most of the online samples are geared towards these languages. In particular a good portion of the tooling is heavily geared to these languages (WinForms and WPF designers to start).
Worried about writing non-portable code and being tied to VC++
I'm sure this opinion will be slightly unpopular. But you've already mentioned that the niche you're looing at is Windows specific. What is the point of writing portable code if you will only ever run it on Windows? This is not a Windows bias coming out, I would make the exact same argument if the platforms were reversed.
I'm not saying portable code is a bad thing. It is in fact a very good thing. But if there is no potential for using the portability why not take advantage of the platform instead?
-
The answer depends on the type of program you would like to implement.
If you would like to implement some system utility then the answer is pretty much the same as on *nx world: you will have to programm in C for best results and to know Win API very well.
For other things, C# is probably the way to go today. Its the best language, IMO, from the existing dotNet languages.
Learning Windows API is definitelly good thing to do, but I suggest using some of the scripting languages for that for faster experimenting (Lua with Alien library, Python , AutoIt etc..). The good thing about it is that you probably know some of them, coming from *nx community.
Since you are worried about portability I suggest you using C# with special care about OS specific things like path separator, file name case sensitivity etc.. you can find some nice articles about it on MonoDeveloper site. Java is also good way to go - I am not an expert but from what I know its trading some language sophistication and speed and native feel (looking from C# perspective) for better portability.
Latest MonoDevelop makes you even load Visual Studio projects, although I never personaly did that.
-
If you're interested in portability of your code, you must produce both a Linux version and a Windows version at the same time. If you try to write Windows code while just thinking about being portable you will invariably end up with Windows specific elements to your code.
If you're going to use Windows, you might as well learn C#. C# is actually pretty cool; it's pulled more Lisp features in than C++ has. Learning it is straight forward. Your best learning resource is Google, although if you're a book learner, go buy any book on C#.
-
It all depends. Should you choose to use C++ and you're developing a GUI application, there are several GUI frameworks to choose from (wxWidgets, GTK), most of which are also platform-portable. If you're just specifically targeting Windows, having the .NET libraries as a dependancy isn't a problem, and you don't mind the time involved in learning a new (but still familiar) language, then C# might be better in your case.
-
I faced exactly the same questions and I am so happy I tried .NET. I hope this info can help you:
Should I learn .NET?
I would highly recomment it.
Do I need to learn C# in order to use .NET, or can I stick with C++?
You can stick with C++ but I am sure you will love to learn C#, please try it. You will be able to mix them too. The main challenge with .NET is to learn all the libraries that are out there to help you out (so you do not need to reinvent the wheel). Use msdn often and try to get a map of the fundamental classes and assemblies.
It is a fun experience if you come from C++ you should not have major problems.
Where is a good place to do my essential reading?
I would start with something light, check the free Visual Studio tools, software and examples here, go to the MSDN documentation and compile some of the examples in MSDN (how to access files,...). As you can see you will find C# and C++ examples side by side.
Then of course books like C# via CLR will eventually need to be read.
Portability
Be sure you run your code in Mono and multiple platforms.
Future investment
Investing on learning the .NET framework will pay back. Today is costly to learn all the new tools out there, with .NET you know you can evolve. New features and languages appear but the fundamental classes remain so your time/effort investment is more under control.
-
This is a great question. The firs thing you need to determine is if you need to write cross platform code. If you do, then C/C++ is the best path using some cross platform UI libraries.
If not, then I highly recommend .NET 3.5 using Visual Studio 2008 SP1. I also recomned using WPF instead of WinForms for your UI.
By no means is MSFT de-investing in native code development; but C# .NET 3.5 WPF and related tools are the future for application development - especially for Line Of Business kinds of things.
I believe you will find this very productive and easy to learn. You can also get good development tools for free here.
-
What Linux-based GUI libraries do you use? QT? GTK? Chances are there are Windows ports of these libraries. If you need to stay platform independent, stick with what you know. If you see yourself needing to be Windows only, only then should you switch a .NET solution.
-
Do I need to learn C# in order to use
.NET, or can I stick with C++?
Go with C#. C# and .net is a great combination.
Also, not strictly programming related, but a bit Unix vs Windows. Unix have always had an excellent shell that have made life easier for a programmer. Windows now also have that. Learn a bit about Powershell and how to write cmd-lets, it will save you lots of time.
Powershell is one of the best things that have come out of Redmond in a while.
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx
-
Should I learn .NET?
Yes.
Do I need to learn C# in order to use .NET, or can I stick with C++?
Technically, no, you don't have to learn C# for .NET.
if I start writing for VC++, I might get bound to Windows.
It's a Windows shop, right? Who cares if Windows programs are portable, if your only target is Windows?
Where is a good place to do my essential reading?
Stackoverflow.
What else can you tell me about transitioning from Linux to Windows programming?
Buy a Windows machine and Visual Studio. Don't try to half-Unix it. Spend the quality time and effort on learning the Microsoft Way. Just like there is a Unix Way, there is a MS Way. Both apply to their respective systems.
Good luck and have fun!
-
Lots of people seem to be ignoring the original question of "Differences between UNIX and Windows development" and so I will talk a little about that.
Regarding should I learn C#:
I think you need to learn a language like C# [1] at some point. The question is not a matter of if you should learn it but when when you will learn it.
Regarding alternative similar languages to C#:
Java is another language that is very similar to C#. Java IMO is the father of C# and IMO I prefer Java.
I offer you a metaphor to explain my predilection towards Java. Java had this son C# who saw all the success of his father. The son got jealous and tried to do the same thing his father was doing.
In the this case, MS is the upstart son trying to upstage the older father. However the upstart C# is missing a couple of key things IMO:
- truly cross-platform
- smaller library of tricks owning to the shorter lifespan of C# ( or as I like to call it a smaller box of pre-built legos )
- I prefer Java for the above two bullet points.
[1 - footnote ] When I say "a language like C#" I am referring to the fact that there are other languages with similar features. Specifically features like: garbage collection, 100% object oriented from the start ( vs C++ hacking in OO ), built in xml-type-documentation ( think of javadoc ) and flexible to do many different things.
Regarding should I learn .NET:
I have only done a small/intermediate amount of C# but from that small amount I noticed that .NET is pretty much required when you do anything C#. ( I understand that C# is very very incestuous with .NET and hard to peel apart. ) The way I understand it and I may be wrong... most/all of C#'s standard main library's are C# and therefore you need to have .NET if you are doing C#.
Back to the original question "Differences between UNIX and Windows development":
- Windows development is not as diverse IMO... there is only one development environment and that environment is MS compiler and MS IDE both packaged as one in their Visual Studio product line.
- Windows development focuses on GUI driven tools.
- Linux development is more diverse with hundreds of compilers/text editors/IDEs/etc. ( I say it is diverse but in reality the majority of Linux development is actually very similar using a collection of common tools: GCC/GDB/GREP/FIND/VIM/EMACS/CTAGS/CSCOPE and some source repository of choice ).
- Linux development focuses on command-line-interface driven tools.
-
You're going to be selling commercial Windows software to businesses. Check out the businesses. Figure out what else they buy, and check the recommended platform information. That will give you a good idea of what they have, and what to aim for.
You probably want to learn .NET (hey, you're going to have to learn a new framework anyway), and C# isn't going to be difficult to learn if you're good at C++. That seems to be the standard development environment nowadays, probably for good reasons.
If you're worried about portability, write the back end in C++ and isolate the system-dependent parts. If you're going to sell Windows software to businesses, it has to look like Windows software. It has to behave as they expect. Do not compromise the UI for any advantage in being cross-platform; instead, separate the UI logically. You can always rewrite it later for other platforms.
Similarly, go ahead and use Visual Studio. It's a nice environment, although I sometimes miss gcc, gdb, and make, but it's likely to make you more aware that you're writing a Windows program. If you use Cygwin and gcc, you're likely to not think like a Windows programmer, meaning it won't look like a Windows program, meaning your potential customers are going to have problems with it, meaning less money and more chance for a late mover to capture the market.
I found that moving to Windows programming wasn't difficult. Just be aware that you are learning something new, and that some things are standard in Windows that aren't in Unix. If you aren't afraid of learning new stuff, you'll do fine.
One more thing: Unix applications are frequently notorious for clunky UIs. Unix users tend to be more technical people, who don't pay as much attention to how things look and are much more forgiving of ugly interfaces. In the Windows commercial software world, looks and ease of use matter, and the actual users are likely to be people with a wildly inaccurate mental model of the computer, who wouldn't recognize a line of Python code if it bit them in the face.
You are going to need a reasonably attractive UI that can be easily used by people who don't care about computers per se. This is a stretch for a lot of us. If you don't think there's anything special about an iPhone, you badly need another point of view. Read up on user interfaces, find somebody else with some artistic sense and some idea of usability, anything. UI design is a different skill from programming, and many people have only one of them (around here, people tend to be skilled programmers, and may have some UI skill).