Developer .NET UPDATE—brought to you by the Windows & .NET Magazine Network
This Issue Sponsored By
DevConnections-- Early Bird Discount to Expire
DevConnections Tour--The Conference Comes to You
July 15, 2003--In this issue:
1. Editor’s Note
- New Day, Same Great Newsletter
2. Developer .NET Perspectives
- Reverse Engineering Visual Studio .NET to Visio UML
- Exchange 2003: Do You Plan to Migrate or Wait?
- Attention Visitors to SSMU Business Intelligence Online Mini-Series
- New Active Directory Web Seminar!
5. New and Improved
- Prepare for the Visual C# .NET Exam
6. Contact Us
- See this section for a list of ways to contact us.
Sponsor: DevConnections--Early Bird Discount to Expire
DevConnections = Microsoft ASP.NET Connections + Visual Studio Connections + SQL Server Magazine Connections + Microsoft Office System Conference. Four conferences for the price of one and over 170 sessions.
The $300 Super Early Bird discount expires soon so hurry and lock in your savings by registering right now. All session and speaker information plus the conference brochure are online.
This is your chance to get the latest roadmap from Microsoft, learn practical tips and insights that you'll use on the job immediately, and network with the top gurus in the industry. Plus, you may win a brand new Harley Davidson motorcycle at the prize drawing held in the exhibit hall.
DevConnections is held Oct 12 - 15 in Palm Springs at the beautiful
La Quinta Resort and Club. Don't miss this opportunity to attend at the lowest possible registration fee. Simply the best training value available for today's developer. Register now online or call 800-438-6720 or 203-268-3204.
1. Editor’s Note
Starting in August, we'll be sending out Developer .NET UPDATE on the first and third Friday of each month. So, look for your next issue of Developer .NET UPDATE on Friday, August 1. Thank you for reading Developer .NET UPDATE.
2. Developer .NET Perspectives
In the past few columns, I've been using the Community Starter Kit, one of five sample ASP.NET implementations available on the Microsoft ASP.NET Web site ( http://www.asp.net ), as a baseline for a custom application. In the last column, I discussed how Visual Studio .NET 2003 provides an interface for reverse engineering source code into Microsoft Visio. As the last column showed, you can use this interface with most Visual Studio .NET solutions to gain insight into the structure of their code.
Unfortunately, the generated Unified Modeling Language (UML) representation of the Community Starter Kit isn't too informative. In many ways, the reverse-engineering interface in Visual Studio .NET 2003 seems more like a beta option within the released product than a feature that's ready for production use. Still, understanding the UML representation offers some value. More important, the UML representation serves as a guide for the direction in which Visual Studio .NET is heading.
In its current form, Visio's UML Reverse Engineering tool is most useful for traditional class libraries. So, let's use a simple class library project to examine what's available in the interface between Visio and Visual Studio .NET 2003.
One item that the UML representation displays is inheritance relationships. For example, suppose you create a Class Library project in Visual Basic .NET, then add a second class, Class2, which inherits from the default Class1. Your code would look like
Public Class Class1
Public Class Class2
Following the steps I described in the previous column, reverse engineer this project. After you have the UML representation, you can place icons that represent the project's initial classes (i.e., objects) in the display area to illustrate the relationships between the different objects. However, Visio recognizes few object relationships.
One relationship that Visio recognizes is the inheritance relationship. If you drag the icon associated with each class into the display area, Visio automatically creates the link between the classes. (Admittedly, this example is somewhat contrived because you already knew in advance about this relationship.)
In addition to placing icons in the display area, you can double-click a class to review and edit its properties. The class's Properties dialog box will have many tabs, including the Operations and Code Generation Options tabs.
The Operations tab contains information related to the methods that are available in a class. In this case, you can see not only the current class (Class2) methods but also the parent class's (Class1) methods by switching tabs. Similar to a Microsoft Excel spreadsheet, in which you can have multiple sheets in a spreadsheet, Visio lets you have multiple pages in this display. You use the page tabs at the bottom left of the display to select the class. For Class2, notice that the class's New method is under the available operations. If you click the Properties button, a Properties dialog box associated with the method appears. These drilldown dialog boxes let you further define the various elements of your application. At the design level, you can specify details related to the function specifications associated with an application.
The Code Generation Options section provides a drop-down list in which you can select your object's implementation language. You can change the language so that you can preview the code associated with an object in any of the available target languages. For your project's converted classes, the default is Visual Basic (VB), but you can select C# or C++, then click Preview to open the Code Preview dialog box. In the Code Preview dialog box, you can see the implementation of your class in the selected language. However, seeing the implementation and being able to use it are two different beasts. Fortunately, Visio has the initial capabilities for generating code based on the object model. Unfortunately, like the reverse-engineering feature, the code-generation feature is more like a beta option than a feature that's ready for production use.
To generate code from your UML diagram, go to the UML menu and select Code, Generate. In the Generate dialog box, you can select the target language. Although you reverse engineered this diagram from a Visual Basic .NET project, most of the settings related to the original project are unavailable by default, including the setting for the Visual Basic .NET language. So, change the target language to C#. Make sure that the "Add Classes to Visual Studio Project" check box is selected. For the project name, I suggest that you replace Top Project with My Class Library, then adjust the location so that the project is at the top level of your Visual Studio Project directory. Because you're attempting to recreate your original project, which was a Class Library, change the Template option to the Class Library template. Next, select the "Create directory for solution" check box and provide a new name for the solution. Finally, select the classes you want to generate, then click OK.
Visio creates the new Visual C# .NET project and adds it to the list of existing projects available from your start page in Visual Studio .NET. You might need to restart Visual Studio .NET to see the updated list. When you open the project, notice that a new Class1 has been created. Instead of being at the top level of the project directory, your classes are in a subdirectory named after your project, which in this case is My Class Library. This nesting of generated classes seems to occur regardless of the language you select during the class-generation process. As I noted previously, the code-generation feature isn't quite up to my expectations for class generation, but it's Microsoft's first step in letting Visual Studio .NET developers link their design and implementation code.
Having the ability to link design and implementation code is valuable. Although Microsoft's current implementation of the reverse-engineering and code-generation features are more like beta options than ready-for-production tools, these features show that Microsoft is committed to creating a common project that goes from the design and requirements phase through the implementation and deployment of Visual Studio .NET applications.
Sponsor: DevConnections Tour--The Conference Comes to You
Can't make it to one of our major conferences? We will bring the conference to you. Join Paul Litwin and Carl Franklin for 2 days of solid, in-depth training in ASP.NET and VB .NET. Special keynote by Microsoft's Rob Howard.
Attend either the ASP or VB track for the entire two days or move from one track to the other as you desire. Don't miss this chance to get in-depth training from the experts in a highly interactive environment. Bring your questions and get the answers you need. You'll discover new tips and shortcuts to help you build better and more secure applications and web services faster.
Coming to a city near you. Get ready for the transition in development by learning from the best and keep your competitive edge.
Register today before these events sell out:
(brought to you by Windows & .NET Magazine and its partners)
Windows & .NET Magazine and Aelita Software would like to know about your organization's plans to migrate to Exchange Server 2003. Take our brief survey, "Windows & .NET Magazine: The State of Exchange Migration," and sign up to receive a free white paper titled, "Upgrade or Migrate? Deployment Options for Exchange 2000/2003." Give us your feedback today!
Don’t miss the Business Intelligence Mini-Series, an advanced-level online training course for SQL Server professionals. This four-part Web seminar series will be August 6, 13, 20, and 27, 2003, from 1:00 P.M. to 2:00 P.M. Eastern time and taught by business technology professional Scot Reagin. Get complete details, including early-bird pricing info at
(brought to you by Windows & .NET Magazine)
Discover how to securely manage Active Directory in a multiforest environment, establish attribute-level auditing without affecting AD performance, and more! Space is limited--register today!
5. New and Improved
by Sue Cooper, [email protected]
Transcender released TransTrainer for C# .Net/Windows, the company's first video computer-based training (CBT) for Microsoft Exam 70-316: Developing and Implementing Windows-based Applications with Microsoft Visual C# .NET and Microsoft Visual Studio .NET.. TransTrainer products combine video clips of instructor-led explanations with onscreen demonstrations and real-world examples. More than 6 hours of video clips are indexed and searchable. TransTrainer for C# .Net/Windows gives you comprehensive instructions for developing and implementing Windows-based applications and comes with Transcender's "pass the exam the first time" guarantee. Pricing for a single-user license for this CD-ROM is $129. Contact Transcender at 615-726-8779 or [email protected]
Jerry Honeycutt Desktop Deployment Whitepaper
6. Contact Us
This email newsletter is brought to you by Windows & .NET Magazine, the leading publication for IT professionals deploying Windows and related technologies. Subscribe today.
Copyright 2003, Penton Media, Inc.