hough there were no big surprises and no major announcements, VSLive! San Francisco was notable this year for several reasons. First, despite the dismal economy, the conference was full, showing that even if organizations aren't hiring, they're at least still training their existing developers. A large number of the attendees have either already migrated to .NET or are planning to do so in the near future.
|
Productivity Enhancements
Code snippets: Visual Studio Whidbey provides numerous productivity enhancements, starting with the built-in "code snippets" available from the right-click context menu in the code editor, which now displays an "Insert Snippets" menu item. According to Jay Roxe, VB Product Manager for Microsoft, Whidbey will ship with around 500 pre-built snippets arranged in categories that match common programming needs, such as string, file, and registry manipulation. You're not limited to using Microsoft-supplied snippetsyou can easily add custom categories and snippets that meet your needs. The presenters used the snipped feature extensively. There have been numerous ways to package and reuse code over the years, and certainly, integrating the capability directly into the IDE is a big step forward. However, I suspect that the usefulness of the feature is in inverse proportion to the number of snippets availableand I fully expect the feature to be abused. It's one thing to select a snippet you already know is appropriate from a list of hundreds, and quite another to try to select an unfamiliar snippet to perform a known task. In other words, the power of having snippets wanes when developers end up spending more time hunting for the right snippet than it would take to simply write the code.
Edit and Continue: Yes, edit and continue is back. That's not a new announcement, but Microsoft speakers proudly highlighted it in their presentationsand it finally seems to have moved past the promise stage into working code. E&C was the most-requested feature for the next version of VB.NET. Although the capability for E&C is baked into the framework, each language group has to choose whether to surface it for that language. Edit and continue was one of my favorite VB classic language features and even though I've had to forego E&C for the last few years in .NET, I still feel strongly that it's one of the best productivity features ever invented.
The "My" abstraction: Visual Basic developers have long used the keyword "Me" to refer to the currently executing form or class (the equivalent in C# is "this"), but they'll soon become just as familiar with the new "My" designation for the root of a namespace. Characterized by Microsoft speakers as a "speed dial into the framework," the My namespace contains classes that give you fast access to commonly used features of the system, the user, and the framework, making them both easier to find and far easier to use. In addition, former VB developers will be happy to note that the My feature brings back the concept of a global forms collection. For example, in VB.NET 2003, if you have a form in your project called "frmMain," you must first create an instance of it and assign that to a variable before you can use the form. In contrast, VB6and now VB.NET Whidbeyautomatically create a global list of forms that you can use without first creating an instance variable.
VB6
frmMain.Text1 = "Hello World"
VB.NET 2003
Dim fMain As New frmMain
fMain.Text1.Text = "Hello World"
VB.NET WHIDBEY
My. Forms.frmMain.Text1.Text = "Hello World"
Similarly, you can get a list of printers using "My.Computer.Printers", or trap global application events such Startup and Shutdown exposed by the My.Application class. And for the first time, it's easy to add a global exception handler by handling errors at the application level via an Error event. The My.User class gives you fast access to the logged-on user. The sidebar "Exploring the My Namespace" contains a more complete list of the available functionality.
Better Exception Information: Rather obviously, developers spend a good deal of time fixing errors in their code, so any assistance an IDE can offer there will pay high dividends. Rather than simply showing you the exception, VS now also analyzes the surrounding code, and in many cases can not only offer possible solutions, but also includes clickable links in the exception display that fix the code for you. While more error information is often good, it remains to be seen how much time developers will actually save with this feature.
Smart Code Generation: Visual Studio provides extensive code-generation features, such as creating fully functioning "smart" forms. In one demonstration, selecting an object type caused VS to analyze the object's schema and produce a fully working, type-aware data-entry form suitable for editing the object.
Enterprise Extensibility
In the 2003 version of the framework, some of the base functionality was "baked in," making it very difficult to change without extensive work. For example, the ASP.NET out-of-process Session manager worked very nicely with SQL Server, but if you wanted to use Oracle, you couldn't simply switch out the databaseyou had to write your own Session manager. Because Enterprise customers often need to swap out such functionality, the Whidbey version lets you do so at very high levels quite easily. In ASP.NET, for example, you can use the My.User class to determine whether a user is authenticated. The default implementation uses Windows authentication, but you can easily write a different authentication provider. You might think that writing a custom authentication provider would interfere with other built-in functionality, such as My.User, but it works seamlessly; the My.User class will reflect the results of the custom authentication rather than the Windows authentication.
Such extensibility makes the framework far more flexible than previous versions, and extends its reach into the enterprise levels where applications must play more nicely with others.
Security
A new security calculator analyzes your code for security requirements. To use it, you set the permission level at which your application needs to run, and then the tool warns you about code needed to run the application successfully that would not run without additional permissions. In addition, you can set a permission level and then run your application in different "modes" to determine how it will act when running in different target security permission levels.
Bill Gates mentioned a PREFast tool that Microsoft has been using internally to find potential security problems with code. PREFast looks for known code patterns that can lead to problems or that are vulnerable to malicious attacks. Gates said the tool has proved to be so successful that Microsoft will include it in Visual Studio.
New Web services security standards, such as WS-Security will appear with Indigo, which should ship somewhere between this Whidbey release and the Longhorn release.
New Controls/Templates
Whidbey contains a huge number of new controls and templates for both Web and Windows developmentfar too many to mention here. You can see more in-depth information on some of the new controls and other Whidbey features in:
Exploring New WinForm Controls in VS .NET Whidbey
Simplifies Browser Client Script Callbacks
Touring Whidbey's Base Class Library Enhancements
Whidbey's New Wizard Control Adds Navigational Power
ASP.NET gets "visual inheritance for the Web" in the form of Master Pages. A Master Page may contain the overall layout, design, and base behavior for a set of pages, while individual page using that Master page provide the logic and content. At design-time, the Master Page displays as a transparent background layer over which you can drag and drop the controls appropriate for the current page. You can read more about Web site development in Whidbey in Creating Web Sites with ASP.NET Whidbey.
New application and form templates, such as a login page fully connected to Windows authentication, can significantly speed up common types of developer tasks.
In another popular move, Microsoft has finally created a managed-code WebBrowser control, which fixes the problems that dogged the ActiveX version when running in COM Interop mode in .NET, such as the BeforeNavigate2 Event Not Firing.
New Project Properties
The Project properties settings have been greatly extended, giving you access to a set of tabbed pages that let you control every aspect of your application, including adding, and editing settings that appear in the application configuration file. ASP.NET gets a new Web Application Administration tool that lets you configure security, personalization, and configuration settings, among other features.
One welcome new project property for Windows Forms applications is a "Run as Single-Instance" option. When you select that option, if a user tries to launch more than one instance of your application, they instead get switched to the instance that's already running. Of course, if you don't like that behavior, you can override itthe already-running version of the application raises an event, which you can use to provide a custom message or take special actions.
Promised Language Enhancements Are Real, But Delayed
Finally, despite the new focus on productivity, Microsoft has not neglected language evolution, nor has it lost track of performance. The list of language enhancements that Microsoft announced last year, such as generics, iterators, partial types, and anonymous methods, have all found their way into the Whidbey language versions. Microsoft remains committed to performance, and maintains that they won't let efforts toward productivity at design time interfere with performance at run time.
Despite the still-long wait until Whidbey's release, developers seemed both optimistic and pleased with the new features. Most of the developers I talked to were still either experimenting with .NET or deep in the throes of implementing it. That's particularly true for Windows Forms developers, because it seems that rollout of ASP.NET is already well under way, and in many cases, complete. That's only natural, because installing the framework and running ASP.NET on a Web server is far simpler, strategically, than rolling out the .NET framework to every potential user. I seriously doubt that the additional few months' delay will cause many developers to jump ship. If the delay results in a better product, the wait will have been well worthwhile.
| DevX is a division of Jupitermedia Corporation © Copyright 2007 Jupitermedia Corporation. All Rights Reserved. Legal Notices |