This Issue Sponsored By
This email newsletter comes to you free and is supported by the following advertisers, who offer products and services that might interest you. Please take a moment to visit these advertisers' Web sites and show your support for Scripting Central.

Double-Take Software
http://www.windowsitpro.com/go/whitepapers/doubletake/disasterrecovery/?code=DevTop0421

Macrovision
http://www.windowsitpro.com/go/whitepapers/macrovision/centralizinglicenses/?code=DevMid0421


1. Developer .NET Perspectives

  • Write Code Without Having to Type It
  • 2. Events and Resources

  • Guide to SQL Server 2005 High Availability
  • Exploit the Opportunities of a Wireless Fleet
  • Are You a SQL Server Superhero?
  • Become a Master of Messaging
  • 3. Featured White Paper

  • Secure Your Online Data Transfer with SSL
  • 4. Announcements

  • Exclusive Spring Savings
  • Save 44% off the Windows IT Security Newsletter

  • Sponsor: Double-Take Software

    Start your disaster recovery program before it's too late - including defining the right plan for you, and mistakes to avoid when planning
    http://www.windowsitpro.com/go/whitepapers/doubletake/disasterrecovery/?code=DevTop0421


    1. Developer .NET Perspectives


    by Bill Sheldon, bills@interknowlogy.com

    Write Code Without Having to Type It
    A lot of the code that developers write follows common patterns. For example, when you create a new property, you follow four steps:

    1. Declare a private variable.
    2. Declare the public property with a public name of the same type.
    3. Declare the Set logic, which sets the private variable to the parameter value.
    4. Declare the Get logic, which returns the private variable's value.

    These four steps are common to every property you want to place in a class. Manually typing all that information is not only repetitive but also time consuming and error prone (mainly typing errors).

    Visual Studio 2005 lets you avoid all that hassle. Its new code snippet feature lets you include code without typing it. For example, to include code that creates a property, you simply type "prop" if you're using Visual C# or "property" if you're using Visual Basic (VB) 2005, then press the Tab key. In your source code, you'll find a template that includes all the generic code you would normally type. The sections that you need to edit in your new property declaration (e.g., variable name, property name, type) are all highlighted. After you edit the contents of a highlighted section, you press the Tab key to go to the next section. The changes are reflected across the entire declaration for consistency. This constitutes an important difference between using this feature and uploading stock code. With this feature, you're literally pulling in a code template with active tags that specify the initial customizable properties in that template.

    Most all the keywords in VB 2005 or Visual C# have been associated with a code snippet. Can't remember the exact syntax of the For loop? No worries. Type "For", press the Tab key, and--poof--the necessary code appears. Can't remember the keyword you need to use? No problem. Right-click somewhere in your edit window and select Insert Snippet. Visual Studio 2005 first inserts a placeholder in the location where you want to include a snippet, then provides a list of snippet categories in the Code Snippet Picker.

    Visual Studio 2005's code snippet feature goes well beyond just providing templates for common language elements. Templates are also provided for common tasks, such as pinging a remote computer or connecting to a database. In addition, a template contains more than just source code. The template also includes additional information, such as the snippet's author, the namespaces that need to be imported (if applicable), a display title, keywords the user needs to edit, and which keyword should be edited first. For general information about code snippets, you can check out the Visual C# help files at http://msdn2.microsoft.com/en-US/library/f7d3wz0k.aspx.

    The good news is that Visual Studio 2005 shipped with hundreds of code snippets. The bad news is that the snippets are, as you might expect, language specific and therefore not interchangeable. For example, some of the VB 2005 snippets leverage the "My" namespace, which doesn't exist in Visual C#.

    The code snippets have their own schema, which is documented at http://msdn2.microsoft.com/en-US/library/ms171418(VS.80).aspx. As a result, you can create your own custom snippets. Step by step instructions for doing so are available at http://msdn2.microsoft.com/en-US/library/ms165392(VS.80).aspx.

    Snippet files are XML files. So, to create snippets, you must edit an XML file, which isn't much fun. Fortunately, if you use VB 2005, there's a GUI called the Visual Basic Snippet Editor that you can use. This free editor is currently in the release candidate (RC) stage. For more information, visit the Microsoft Developer Network (MSDN) Web page at http://msdn.microsoft.com/vbasic/downloads/tools/snippeteditor. Or for the most recent version, bypass MSDN and look in the GotDotNet Workspace at http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=a927f4e7-8e7f-45ce-8b72-f3b9384a3eab.


    Sponsor: Macrovision

    Strategically manage your organization's software licenses with a 5-step program to help save time and cut costs by centralizing licensing operations.
    http://www.windowsitpro.com/go/whitepapers/macrovision/centralizinglicenses/?code=DevMid0421


    2. Events and Resources


    (brought to you by SQL Server Magazine)

    Guide to SQL Server 2005 High Availability
    Learn the essentials of high availability for SQL Server 2005--including cluster services, replication, and log shipping.
    http://www.windowsitpro.com/go/essential/xosoft/sqlserverha/?code=0412emailannc

    Exploit the Opportunities of a Wireless Fleet
    Industry guru Randy Franklin Smith helps you identify what you should do to leverage your mobile and wireless infrastructure, how to pick devices that are right for you, and more!
    http://www.windowsitpro.com/go/seminars/mobileandwireless/?partnerref=0419emailannc

    Are You a SQL Server Superhero?
    Gain control of your messaging data with step-by-step instructions for complying with the law, ensuring your systems are working properly, and ultimately making your job easier.
    http://popquiz.sqlmag.com/idera

    Become a Master of Messaging
    Gain control of your messaging data with step-by-step instructions for complying with the law, ensuring your systems are working properly, and ultimately making your job easier.
    http://www.windowsitpro.com/toolkits/ilumin/index.cfm?code=0419emailannc

    3. Featured White Paper


    Secure Your Online Data Transfer with SSL
    Increase your customers' confidence and your business by securely collecting sensitive information online. In this free white paper, you'll learn about the various applications of SSL certificates and how to deploy them appropriately, along with details of how to test SSL on your Web server.
    http://www.windowsitpro.com/go/whitepapers/thawte/ssl?code=0419featnl


    2006 Watch

    Learn C# 2005 Now...Get a FREE training CD!
    Start learning Visual C# 2005 today with cutting edge training from AppDev. We'll send you a C# 2005 training CD from our new course (a $115 value) -- FREE! Start learning now...click the link below for your FREE Visual C# 2005 training.
    http://www.appdev.com/promo/RN00350


    4. Announcements


    (brought to you by SQL Server Magazine)

    Exclusive Spring Savings
    Subscribe to Windows IT Pro and SAVE 58%! Along with your 12 issues, you'll get FREE access to the entireWindows IT Pro online article archive, which houses more than 9,000 helpful articles. This is a limited-time offer, so order now:
    https://store.pentontech.com/index.cfm?s=1&promocode=eu2064uw

    Save 44% off the Windows IT Security Newsletter
    For a limited time, order the Windows IT Security newsletter and SAVE up to $80! You'll get 12 helpful issues loaded with endless fundamentals on building and maintaining a secure enterprise, in-depth product coverage of the best security tools available, and expert advice on the best way to implement various security components. Subscribe now:
    https://store.pentontech.com/index.cfm?s=1&promocode=eu2564us


    Hot Spot

    Find solutions to manage multiple regulations effectively, saving time and expense when demonstrating compliance.
    http://www.windowsitpro.com/go/whitepapers/bindview/compliance/?code=DEVHot0421

    Contact Us


  • About Developer .NET Perspectives -- bills@interknowlogy.com
  • About technical questions -- http://www.sqlmag.com/forums
  • About product news -- products@sqlmag.com
  • About your subscription -- Developer_dot_NET_update@sqlmag.com
  • About sponsoring an UPDATE -- contact Richard Resnick, rresnick@sqlmag.com, or Lisa Kling, lkling@sqlmag.com
  • Developer .NET UPDATE is brought to you by SQL Server Magazine, the only magazine devoted to helping developers and DBAs master new and emerging SQL Server technologies and issues. Subscribe today.
    https://store.pentontech.com/index.cfm?s=9&promocode=eu215xdb

    You can manage your SQL Server Magazine email newsletter subscriptions by going to http://www.sqlmag.com/email.

    You can view the SQL Server Magazine Privacy Policy at http://www.sqlmag.com/aboutus/index.cfm?action=privacy.

    SQL Server Magazine is a division of Penton Media, Inc. 221 East 29th Street, Loveland, CO 80538, Attention: Customer Service Department

    Copyright 2006, Penton Media, Inc. All Rights Reserved.