开始接触.NET - ASP.NET,WPF,Silverlight的或命令行C#?命令行、ASP、NET、Silverlight

2023-09-04 08:10:12 作者:未曾深吻

如果有人在使用.NET Framework开始了,什么是先从最可行的模板?而到了可行的我指的是一个具有最低的学习曲线和最高收益。

If someone were starting out with the .NET framework, what is the most feasible template to start with? And by the feasible I mean the one that has the lowest learning curve and the highest gains.

首先:

在命令提示符应用 在C#? 在使用ASP.NET Web应用程序? 在XAML / C#Silverlight应用程序? 在WPF /的WinForms桌面应用程序? Command Prompt applications in C#? Web applications using ASP.NET? Silverlight applications in XAML/C#? WPF/Winforms Desktop applications?

我不想过多地关注到,目前一个特定的领域,而是学会在.NET Framework 4.0中的一切一点点。以何种顺序会是更好地学习.NET?

I don't want to focus too much into one particular domain at the moment, instead learn a little bit of everything in .NET Framework 4.0. In which order would it be better to learn .NET?

推荐答案

控制台应用是显然的出发点:用户界面是一个广阔的森林,而且也没有意义试图打通它,直到你开发找到的能力小径在旷野。此外,没有什么,你将学会做控制台应用程序,这不是适用于一切在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#.

之后,下一步就是要学会如何建立用户界面。我想借此问题与建议你拿起的WinForms:是的,有很多的信息,在那里有关如何使用它,并有大量的工具,并在其最简单的是pretty的容易理解的。但有两个问题的WinForms。

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.

首先,很多的事情的WinForms让那么容易,实际上非常差的编程实践。在同一类混合的业务和presentation逻辑在的WinForms编程规范,这需要努力了相当数量打破这种习惯,尤其是数据绑定 - 一个重要的工具,从$ P $解耦的数据模型psentation - 是的WinForms相当边缘,而它的核心WPF的体系结构。还有很多东西要学用WPF - 一个的很多的更多 - 但是你最终可以编写更好的程序

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.

其次,WinForms的接近其寿命的结束。你不会看到微软注入更多的资源投入到改进它。他们就大功告成了。这几乎意味着它不会有用到未来 - 这是 - ,但其在软件开发生态系统的整体普及率,现在,大,因为它是有史以来将是

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.

另一个原因去与WPF的是,大多数的你将学习WPF的工作内容也适用于Silverlight的,它打开了一扇门,是要永远封闭的WinForms。

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.

至于ASP.NET而言,它的东西,你不想学,直到您需要。

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