1、 外文翻译 Visual Studio 2005 Premieres MaterialSource:Visual Studio Magazine Author:Peter Varhol The question of whether to upgrade to Visual Studio 2005 is a no-brainer for many of us. When MSDN releases the new version, we will exercise our subscriptions and install the new IDE. You can import existin
2、g Visual Studio 2003 projects and have them ready for use within minutes (but dont try going back to your old IDE at that point). For others the decision is not as easy. Its not so much a question of whether to upgrade, but when. Most software development groups are unwilling to change IDEs in the m
3、iddle of a major project. Others believe that if their current tools of the trade are not broken, there is no reason to upgrade them. And the rest are looking for reasons to move to .NET to begin with Does Visual Studio 2005 provide these reasons? Further, does Visual Studio 2005 better support the
4、development of high-quality software and the ability to work as a team, out of the box? To answer these questions, I put Visual Studio 2005 to the test, importing projects, creating others from scratch, coding, testing, and prepping for deployment. I also took a look at the various flavors of VS 200
5、5 that Microsoft will offer, with an eye toward which audience the specific versions will serve (see the sidebar, “A Word About Versions“). Microsoft serves a lot of audiences with Visual Studio, and VS 2005 pushes the reach of the tool both farther up into the enterprise with its Team editions, and
6、 simultaneously down into areas typically occupied by hobbyist, departmental, and education-centered developers and would-be developers. In the latter case, Microsoft isnt so much charting new territory as much as it is reestablishing relationships with a group of programmers it by and large left be
7、hind with the introduction of .NET. I confined my exploration of Visual Studio 2005 to C# and Visual Basic. Im a strong believer in managed code as a quality and productivity enhancer, and a primary reason Visual Studio is what it is today is because it supports development with managed code. That i
8、s not to say that C+, managed or unmanaged, doesnt have a role in application development today, but it continues to be a diminishing role. Visual Studio 2005 will be readily recognizable and easily adopted by veteran developers today. One of the true gifts of the development environment across vers
9、ions is that developers can pick it up and use it immediately, while learning the new features over time. If you open an existing Visual Studio 2003 project, a conversion wizard opens automatically to bring it into the new version and ready it for use. There are some small differences in the menus,
10、but any Visual Studio developer will be productive within minutes. However, new features abound, and it will take developers a while to find and use many of them. Visual Studio now features the ability to refactor classes and types. While refactoring is an environment rather than a language feature,
11、 some of the capability is available only for C#. The refactorings available include renaming, moving, and overriding type members; reordering parameters; implementing an interface and extracting from a type to an interface; and implementing an abstract class. You accomplish these activities and muc
12、h more with the Class Designer, a new and unique modeling tool that enables you to view the class structure of an existing application or create an application by defining its classes visually. You right-click on the class diagrams in the Class Designer to select the type of refactoring you want to
13、implement. The Class Designer makes the appropriate changes in the diagram, and reflects those changes automatically in the code. It is worthwhile to note that refactoring is done only through the diagram and not through the code itself. The Class Designer can also serve as a starting point for appl
14、ication development, minimizing manual coding while making the most from a visual design process. Build a new application by placing classes from the toolbox onto the Designer form, where you can visually add methods, establish class relationships, define interfaces, and create structures and delega
15、tes. The Class Designer makes switching back and forth between visual modeling and coding seamless, with the code and model complementing each other. It is unfortunate that Microsoft has chosen to support a modeling approach different than the widely accepted Unified Modeling Language (UML). Microso
16、fts class-only approach is an easy and highly usable method of creating class diagrams that would complement any UML implementation. However, the Class Designer requires you to have a much deeper understanding of your application before beginning. In other words, you might as well use UML as your st
17、arting point anyway, and simply implement your UML class diagrams using the Class Designer. Using the Class Designer is not the only way you can view a Visual Studio application. The document outline view, available in ASP.NET applications, provides a treeview of HTML documents that makes it easier
18、to navigate complex Web applications. The Design view shows the elements in the body of the HTML file, and the Source view shows the body elements as well as elements in the head, the page directive, the script, and code elements. Visual Studio 2005s Object Browser lets you examine and expand system
19、 objects in a treeview. In addition to understanding and working with the class structure and methods within each class, it displays the description for all Framework classes and where they reside within the class hierarchy. And it now lets you filter and sort data by namespace, object type, alphabe
20、tically, and other characteristics. Framework Enhancements While the .NET Framework is not a formal part of Visual Studio, the IDE provides easy access to its features. The Framework 2.0 has a number of incremental features, including new controls, new databinding, support for generics (implemented
21、in both languages), improved FTP and HTTP support, ClickOnce deployment, a variety of improvements to ASP.NET, and many more. In fact, there are too many additions and improvements to detail at any length. Instead, Ill pull out a few for specific mention. The BindingSource class improves the manipul
22、ation of data. It simplifies the process of databinding between control and data, sitting in between the bound control and the target data source. It helps in managing many databinding issues such as currency, data-related events, and target data source changes. The DataGridView control provides a u
23、seful and flexible way to display data in a tabular format. ToolStrip controls are toolbars that can host menus, controls, and user controls in WinForms applications. And the WinForms SplitContainer is two panels separated by a movable bar, useful for displaying and browsing information. For anyone
24、who has to take their application out of Visual Studio and deploy it independently, ClickOnce deployment tries to address issues with versioning of common files, updating of specific files within applications, and permissions issues during application installation. ClickOnce is based on an applicati
25、on manifest and a deployment manifest, both of which are implemented as XML files. As the names imply, the application manifest describes the characteristics of the application itself, and the deployment manifest describes the location and versioning of files. Developers often wonder about applicati
26、on compatibility across versions of the Framework. Microsoft claims to try to maintain both forward and backward compatibility across Framework versions, but it occasionally makes changes or deprecates APIs in the name of security, function, or simply because it didnt work right the first time. For
27、Framework 2.0, Microsoft has made some APIs obsolete, and makes available a reference for those interfaces. However, to be on the safe side, it makes sense to install the Framework version with which your application was built. Ive run both the Framework 2.0 and 1.0 for almost a year with no difficu
28、lty in compatibility between applications using different versions. Of course, Visual Studio 2005 goes hand in hand with Visual Studio Team System (VSTS), the application development lifecycle platform that complements and integrates with Visual Studio in a team development environment. VSTS adds so
29、urce-code control (not Visual SourceSafe), static code analysis (FxCop), performance analysis, load testing, and other features to smooth the development process and improve quality. One innovation is the use of the rules engine in conjunction with the source-code control system. This makes it possi
30、ble to enforce best practices as a part of the development process. For example, you can require team members to perform a static code review with FxCop prior to checking in a file. While the client portion of VSTS will be available at the same time as Visual Studio, the all-important Team Foundatio
31、n Server wont ship until next spring. Those seeking to integrate their existing development processes with VSTS will have to wait for the arrival of the server. Looking Ahead to Orcas and Beyond Microsoft could conceivably take future versions of Visual Studio in many directions. Support for new ope
32、rating system features is almost a given. And based on some presentations given at Microsoft Professional Developers Conference 2005, it appears that the company has chosen working with data as the next mountain to climb. Orcas (the code name for an upcoming version of Visual Studio that will provid
33、e support for Windows Vista) will have a pretty quick cycle as far as enterprise development tool sets go. In order to take advantage of some of the new features available in Windows Vista, Orcas must come out at around the same time, now projected for the second half of 2006. This means that there
34、is perhaps as little as a 12-month turnaround time for Orcas (although there is no doubt that it is already under development), so dont expect too much. Windows Vista (or Longhorn, for those of us who identify more readily with its sobriquet) will introduce a declarative programming model called Ext
35、ensible Application Markup Language (XAML) that will complement existing programming languages and Windows Forms by enabling developers to use the Avalon presentation layer to build the sophisticated mix of Web-like rich-client user interfaces available with the new operating system. Avalon user int
36、erfaces written with XAML employ some stunning visual effects, including three-dimensional objects, subtle shading, and transparent and overlapping objects. Orcas will also deliver more support for Indigo, Microsofts new programming model for building Web services. Indigo introduces a unified model
37、for developing connected applications on the Windows platform that makes it easier to build service components employing remote procedure calls, messaging, and remote object invocation. Indigo has few fundamentally new Web service capabilities, but Orcas will provide a far easier way to implement so
38、me capabilities, such as security and reliable transactions. Demonstrations of Indigo technology indicate that using Orcas with Indigo can reduce many complex tasks requiring tens of thousands of lines of code to just a few. From the standpoint of language, the use of data in applications appears to
39、 be some low-hanging fruit Microsoft can exploit in that limited amount of time. Many developers write data-driven applications, yet there is little in Visual Studio beyond ADO.NET to make such development easy. In particular, while it is possible to build a state-of-the-art graphical user interface
40、 visually by selecting from a vast set of user interface components, and write processing logic in VB.NET or C# using conventional programming skills supplemented by a comprehensive help system, database access requires intimate knowledge of the database structure, plus the ability to work in SQL. O
41、rcas seeks to improve on that experience by adding language features to C# that make data handling more seamless. If C# were a data-aware language, for example, you could easily and seamlessly transfer data between the user interface and the database entirely in C#, without necessarily knowing the d
42、etails of the database tables and fields you are accessing. Consider the improvement in developer productivity and application reliability if you could take a data item directly from a screen object and write it to the database without any intermediary structures. This goal, in fact, might have been
43、 one of the fundamental reasons that Visual Studio and SQL Server have been made available at the same time. The first step in achieving such transparency is to provide the same managed execution environment for both the database and the language. Other projected features for C# include extension me
44、thods, lambda expressions, type inference, and anonymous type for expressing queries and interacting with objects, XML, and databases in a strongly typed, natural way. For example, the next version of C# ties in with the .NET Language Integrated Query (LINQ) framework, which will allow you to build
45、queryable APIs. Much of these projections are speculation at this time, although C# architect Anders Hejlsberg and others at Microsoft have done some speaking on the subject. It is also likely that Visual Basic will continue to return to its roots as a rapid application development language for busi
46、ness-oriented developers. And because software development as a whole is moving in this direction, expect a greater ability to build application models graphically in both languages. 译文 Visual Studio 2005 的首映 资料来源 : Visual Studio 杂志 作者: Peter Varhol 是否升级至 visual studio 2005对我们许多人来说是显而易见的。当 MSDN发布新的版
47、本 , 我们将会行使我们的订阅并安装新的 IDE。你可以导入现有的visual studio 2003项目 , 并让他们在几分钟之内就可以使用 ( 但不要回到你的旧 IDE这一点上 ) 。 对其 他人的决定并不是件很容易的事。但对于是否升级没有太多的问题。大部分的软件开发小组不愿意在开发一个大项目的过程中改变开发环境。有些人则认为 , 如果他们的现有工具没有被破损 , 也没有理由去升级。其余的是正在寻找原因迁移到 .net中开始。 visual studio 2005是否提供这些原因吗 ? 此外 , visual studio 2005是否提供更加高质量的软件和作为一个团队拥有创造性地工作能力
48、 ? 为了回答这些问题 ,我用 visual studio 2005来测试,引进项目 ,从头开始创建编码 , 测试和部署。我也查看了微软提供 的各种 VS 2005, 瞄准向大众服务的特定版本。微软提供visual studio的对象很广 , VS 2005工具更加推动它所涉及的领域有企业团队版本,同时被分解成地区典型的业余爱好者,部门和教育为中心的开发和未来的开发商。在后者的情形中 , 微软实在没那么多计划制定新领域像重建一组程序员的关系那么多并且留下大量的 .NET介绍。 我只限于对 visual studio 2005中的 c#和 Visual Basic 的探究。我坚信托管代码作为一个
49、质量和生产力的增强剂 , 主要的一个原因就是 visual studio有现在的 发展是因为它支持使用托管代码开发。这并不是说 C+,托管或非托管在应用发展的今天没有了一个角色 , 但它仍然是一个逐渐衰弱的角色。 Visual Studio 2005将很容易识别并且很容易被资深开发商采用。跨版本的开发环境中真正的礼物之一是 , 随着时间的推移而学习的新功能,开发人员可以捡起来 ,立即使用它。如果你打开一个现有的 Visual Studio 2003项目 , 转换向导将自动打开新的版本,并准备使用它。在菜单中有一定的差异 , 但任何 visual studio开发者在数分钟内可提高效率。 然而 , 新功能比比皆是 , 开发者需要一段时间去寻找和使用它们。 visual studio现在的特点是重构类和类型的 功能 。重构是一个环境而不是语言特征 ,一些性能只适用于 C#。可用的重构包括重命名 , 移动和突出的类型参数 ; 重新排序参数 ; 执行一个接口和从一个类型提取一个接口 ; 实现一个抽象类。你完成这些活动并多使用类设计器 , 作为一种新型的 、 独特的建模工具 , 可以查看现有应用程序类的结构或创建一个类来确定其视