Starting out with .NET - ASP.NET, WPF, Silverlight or Command Line C#? Starting out with .NET - ASP.NET, WPF, Silverlight or Command Line C#? wpf wpf

Starting out with .NET - ASP.NET, WPF, Silverlight or Command Line C#?


Console applications are obviously the starting point: user interface is a vast forest, and there's no sense trying to get through it until you've developed the ability to find trails in the wilderness. Also, there's nothing that you will learn doing console applications that's not applicable in everything else you do in C#.

The next step after that is to learn how to build user interfaces. I would take issue with those suggesting that you pick up WinForms: Yes, there's a lot of information out there about how to use it, and there are plenty of tools, and at its simplest it's pretty easy to understand. But there are two problems with WinForms.

First, a lot of the things that WinForms makes so easy are actually extremely poor programming practice. Mixing business and presentation logic in the same class is the norm in WinForms programming, and it takes a fair amount of effort to break that habit, especially since data binding - a key tool in decoupling the data model from the presentation - is fairly marginal in WinForms, while it's central to the architecture of WPF. There's a lot more to learn with WPF - a lot more - but you end up writing much better programs.

Second, WinForms is approaching the end of its life. You're not going to see Microsoft pouring more resources into improving it. They're done. This hardly means that it's not going to be useful well into the future - it is - but its overall penetration in the software-development ecosystem is, right now, as large as it's ever going to be.

Another reason to go with WPF is that most of what you learn working with WPF is also applicable to Silverlight, which opens up a door that is going to be forever closed to WinForms.

As far as ASP.NET is concerned, it's something that you don't want to learn until you need to.


Command prompt is probably the very easiest since you can ignore messages and similar things but you're of course very limited. Next would be WinForms which is fairly easy since you can easily keep track of the state.

But it probably depends on your current experience, if you already have some web experience, WebForms might make more sense to you than WinForms for example


Do you have an application you need or would like to develop?

If you have, try to define it in some detail and then you'll have a set of goals you need to achieve.

Once you have these goals you can then work out what's the best technology that will solve the problem.

For example if you've got a fairly static UI WinForms will probably be OK, but if you want to incorporate animations and other visual effects the you should be looking at WPF/Silverlight.