Guia Visual Studio Net

download Guia Visual Studio Net

of 72

Transcript of Guia Visual Studio Net

  • 7/29/2019 Guia Visual Studio Net

    1/72

  • 7/29/2019 Guia Visual Studio Net

    2/72

    2002 Microsoft Corp. All rights reserved.

    This is a preliminary document and may be changed substantially prior to finalcommercial release of the software described herein.

    The information contained in this document represents the current view of MicrosoftCorp. on the issues discussed as of the date of publication. Because Microsoft mustrespond to changing market conditions, it should not be interpreted to be acommitment on the part of Microsoft, and Microsoft cannot guarantee the accuracyof any information presented after the date of publication.

    This white paper is for informational purposes only. MICROSOFT MAKES NOWARRANTIES, EXPRESS OR IMPLIED, AS TO THE INFORMATION IN THISDOCUMENT.

    Complying with all applicable copyright laws is the responsibility of the user. Withoutlimiting the rights under copyright, no part of this document may be reproduced,stored in or introduced into a retrieval system, or transmitted in any form or by anymeans (electronic, mechanical, photocopying, recording or otherwise), or for any

    purpose, without the express written permission of Microsoft.

    Microsoft may have patents, patent applications, trademarks, copyrights or otherintellectual property rights covering subject matter in these documents. Except asexpressly provided in any written license agreement from Microsoft, the furnishing ofthis document does not give any license to these patents, trademarks, copyrights orother intellectual property.

    Microsoft, Visual Studio, the Visual Studio logo, Windows, IntelliSense, Visual Basic,MSDN, Windows NT, Visual SourceSafe, the Windows logo and the InternetExplorer logo are either registered trademarks or trademarks of Microsoft Corp. inthe United States and/or other countries.

    The names of actual companies and products mentioned herein may be thetrademarks of their respective owners.

    Microsoft Corp. One Microsoft Way Redmond, WA 98052-6399 USA

  • 7/29/2019 Guia Visual Studio Net

    3/72

    OVERVI EW ...................................................................................... 1 Microsoft Visual Studio .NET Guided Tour 1SETU P IN STRUCT ION S.................................................................3 Setup Instructions 3Installing the Downhill Bikes Demo Overview 3Installing Downhill Bikes Demo Solution 3DOWNH IL L BI K ES A QUICK TOUR ............................................ 4 Downhill Bikes Tour the Current Site 4Summary 8PART 1: CREA TI NG AN XM L WEB SERVI CE................................ 9 Build an XML Web Service 9Summary 17PART 2: RICH WI NDOWS FORMS ...............................................18 Building a Rich Windows Form 18Summary 27PART3 : EXT ENDING TH E RICH WI NDOWS FORM....................28 Experience the Extensibility of Windows Forms 28Summary 34PART4: BUI LD A WEB FORM AND LOAD T EST .........................35 Building a Web Form and Test for Scalability 35Summary 43PART 5: INTEGRATE XML WEB SERVICES...............................44 XML Web Services at Work 44Summary 52PART 6: BUILD A MOBILE WEB PAGE.......................................53 Building a mobile Web Form 53Summary 61APPENDICES ........................................ ........................................63 Appendix 1: Getting Started 63

    1.1 Related Readmes 631.2 System Requirements 64

    Appendix 2: Installation 652.1 Preparing to Install Visual Studio .NET 65

    To Uninstall Visual Studio .NET Beta 2 or Later Pre-Release Versions 65To Uninstall Visual Studio .NET 7.0 Beta 1 66To Uninstall Visual Studio 7.0 PDC Technology Preview 66

    2.2 Installing Microsoft Visual Studio .NET 67

    CONTENTS

  • 7/29/2019 Guia Visual Studio Net

    4/72

    To Install Visual Studio .NET 67To register Visual Studio .NET 68

  • 7/29/2019 Guia Visual Studio Net

    5/72

    Microsof t Visual Studio .NET Guided Tour

    Welcome to the Microsoft Visual Studio .NET Guided tour, a hands -on

    exploration of the newest version of Visual Studio developer toolset from Microsoft.Visual Studio .NET radically improves application development by enabling

    developers to:

    Write code faster,

    Deploy robust and dependable software, and

    Deliver on the promise to address the fundamental challenges facing customers

    and their organizations today.

    A powerful, highly productive, and extensible programming environment, Visual

    Studio .NET unlocks the potential for application development. It provides the tools

    and technologies required to build applications that will power todays organizations

    and drive the next generation of XML Web service-based software.

    With Visual Studio .NET, programming tasks that were once complex, time-

    consuming, and frustrating, are demystified to the millions of professional and

    casual programmers worldwide. More importantly, Visual Studio .NET enables

    developers to address programming challenges using the skills and knowledge they

    already possess.

    Throughout this guided tour, you will discover how easy it is to create

    comprehensive, enterprise-critical solutions with Visual Studio .NET. The tour will

    focus on building and integrating the three key components that comprise

    Microsofts next-generation .NET platform: a sweeping array ofclient experiences,

    server-based software components, and XML Web services.

    The scenario for the guided tour highlights a fictitious bicycle manufacturer

    Downhill Bikes. Using Visual Studio .NET, you will enable Downhill Bikes to take

    advantage of XML Web services to improve their overall customer service and daily

    operations.

    The Visual Studio .NET Guided Tour will cover the following areas:

    Quick Tour of Existing Downhill Bikes Web Site

    Part 1: Creating an XML Web Service

    Part 2: Building a Rich Windows Form

    Part 3: Extending the Windows Form

    Part 4: Building a Web Form and Load Test

    Part 5: Integrating XML Web Services

    Part 6: Building a Mobile Web Page

    For more detailed information on Visual Studio .NET please refer to the Visual

    OVERVIEW

  • 7/29/2019 Guia Visual Studio Net

    6/72

    2

    Studio .NET Reviewers Guide at: http://msdn.microsoft.com/vstudio/

    Installation Notes

    To run this Guided Tour, you must install Microsoft Windows 2000 or Windows XP

    released products with IIS installed, Visual Studio .NET RTM version, Microsoft

    SQL Server 2000, and the Downhill Bikes sample application. The Downhill Bikes

    sample also will install the Microsoft Mobile Internet Toolkit and the Mobile

    Emulator.

    This demo has been tested only on Windows 2000 and Windows XP Professional.

    For instructions on installing Visual Studio .NET, please refer to the Appendix

    and/or the Readme file on CD 1 of Visual Studio .NET. For up-to-date information

    please refer to this Web site: http://msdn.microsoft.com/

    Visit http://www.downhillbikes.net/ for updated information on this demo and script.

  • 7/29/2019 Guia Visual Studio Net

    7/72

    3

    Setup Ins t ruc t ions

    To install Visual Studio .NET, please refer to the Readme file on CD 1 of Visual

    Studio .NET or see the instructions in Appendix A.

    Instal l ing the Dow nhi l l B ikes Demo Overv iew

    You will begin by installing a pre-built solution called Downhill Bikes. The Downhill

    Bikes solution demonstrates the use of Visual Studio .NET and the .NET

    Framework to create a next generation business application.

    Instal l ing Downhi l l B ikes Demo Solut ion

    Note: For this Guided Tour to function properly, you must be using Visual Studio

    .NET. You must have SQL Server 2000 installed and running. The demo is setup

    for you to be logged on as Administrator. If you are not logged on as Administrator;

    you need to be in the Administrator group. Make sure you have IIS and SQL Server

    2000 running before you beginsetup.

    a. Copy the DownhillBikes.msi to the root of your C: drive.

    b. Execute DownhillBikes.msi (Double-Click).

    c. Click Next (Welcome to the Downhill Bikes Setup Wizard).

    d. Click Next (Confirm Installation).

    e. Click Close (Installation Complete).

    Now is a good time to do a basic test of the Web site with the following link to

    make sure Downhill Bikes is working. If the main page appears, you are ready

    to begin.

    f. Open a new instance of Internet Explorer and type in the following

    URL:

    http://localhost/Downhillbikes/

    g. Close the Internet Explorer Window.

    SETUP I NSTRUCTIONS

  • 7/29/2019 Guia Visual Studio Net

    8/72

    4

    Downhi l l B ik es Tour the Current Si te

    Overview of Part 04

    Welcome to the Visual Studio .NET Guided Tour. This tour will cover the three

    key areas of the .NET developer experience: client applications, server

    applications, and XML Web services.

    Today, the computing industry is converging on a new model for building

    software, enabling an integrated world of software applications for businesses

    and individuals. This model enables a standard way of connecting software

    applications and exchanging information using the Internet. This new,

    Internet-based integration methodology, called XML Web services, enables

    applications, machines, and business processes to work together in waysnever previously possible.

    In this tour, youll see how a fictional bicycle manufacturer takes advantage

    of XML Web services to improve customer service and operations. Well go

    through the steps as Downhill Bikes quickly adds functionality to its Web site

    to collect customer feedback. Next well add new capabilities so that

    customers can check on the status of their orders and management can view

    real-time Web page hits.

    Lets start off by walking through the Downhill Bikes Web site as it stands

    today, by browsing the catalog, placing items in the shopping cart, and then

    placing an order. The Guided Tour will then step us through the addition of

    new client, server, and services features, using Visual Studio .NET.

    DOWNHIL L BIK ES A

    QUICK TOUR

  • 7/29/2019 Guia Visual Studio Net

    9/72

    5

    PART 0: QUICK TOUR OF THE SI TE

    3Step 1 of 4: Browse the catalog4

    Click here to open DownhillBikes in Internet Explorer.b. Use the drop-down list box to browse the four categories in the Downhill Bikes

    catalog.

  • 7/29/2019 Guia Visual Studio Net

    10/72

    6

    PART 0: QUICK TOUR OF THE SI TE

    3Step 2 of 4: Add to cart4

    a. Click the add to cart button.

  • 7/29/2019 Guia Visual Studio Net

    11/72

    7

    PART 0: QUICK TOUR OF THE SI TE

    3Step 3 of 4: Checkout4

    a. Click checkout.b. Click sign in to authenticate onto the Downhill Bikes Web site.

  • 7/29/2019 Guia Visual Studio Net

    12/72

    8

    PART 0: QUICK TOUR OF THE SI TE

    3Step 4 of 4: Confirm the order4

    a. Click place order to confirm the order.

    b. After placing the order, you should see the order confirmation page.

    Summary

    You have just completed a walk through for the Downhill Bikes Web site as it exists

    today. The next step is to add functionality to the site by creating new XML Web

    services and then authoring code to integrate the new services.

  • 7/29/2019 Guia Visual Studio Net

    13/72

    9

    Bui ld an XML Web Serv ice

    Overview of Part 14

    In this part, well build our first XML Web service in Visual Studio .NET. The

    Web service will demonstrate one of the key benefits of using XML Web

    services: Integration of disparate data sources into an easy to use data

    object. Well unite two different data sources, XML and SQL Server, into a

    single ADO.NET object called a DataSet. The DataSet serializes automatically

    as XML, and is returned by the XML Web service.

    XML Web services form the core business logic in the .NET application model.

    In an upcoming section, well write a Microsoft Visual Basic .NET program

    based on Microsoft Windows that will use this Web service. Then, wellcreate Web and mobile interfaces as well. In each case, the logic in the XML

    Web service will serve as the core of the application, running separately fromwhatever presentation model we choose as appropriate for the situation.

    After finishing the Guided Tour, youll have a good understanding of the

    importance and power of XML Web services, and how Microsoft Visual Studio

    .NET enables developers to quickly and easily build Web services, and

    incorporate them into business applications.

    PART 1: CREATING AN XM L

    WEB SERVICE

  • 7/29/2019 Guia Visual Studio Net

    14/72

    10

    PART 1: B UILD AN XML WEB SERVICE

    3Step 1 of 7: Add new Web service file4

    Adding a new file with the extension .asmx will instruct ASP.NET to treat the

    methods tagged with [WebMethod] as Web service calls.

    a. In the Solution Explorer, right-click DownhillBikes, click Add, then click Add

    New Item .

    b. In the Templates list, click the Web Service icon. Leave the default name

    Service1.asmx.

    c. Click Open.

  • 7/29/2019 Guia Visual Studio Net

    15/72

    11

    PART 1: B UILD AN XML WEB SERVICE

    3Step 2 of 7: Add Customers table to the Web service4

    Using the RAD features of Visual Studio .NET, create a connection to the

    Customers table by dragging it from the Server Explorer.

    a. From the View menu, click Server Explorer to open it. (Or, press CTRL+ALT+S.)

    b. Expand the Servers tree and locate the Customers table (Servers

    computername SQL Servers computername bikes Tables).

    c . Drag the Customers icon to the right, onto the design surface.

    OptionalIf you would like to preview the data in the Customers table, right-click the

    Customers icon, and click Retrieve Data from Table. This is an easy way toquickly verify or modify the data in the table. Close this window with

    CTRL+F4 before moving to the next step.

  • 7/29/2019 Guia Visual Studio Net

    16/72

    12

    PART 1: B UILD AN XML WEB SERVICE

    3Step 3 of 7: Add the Get and Update Web methods4

    The GetData Web method will return a DataSet that combines the SQL data

    from Customers, and the Order data from the Orders.xml file. The DataSet

    can then be manipulated easily on any tier of the application.

    Even though these are two completely different kinds of data storage

    mechanisms, ADO.NET combines them into a disconnected in-memory DataSet

    for consumption by the XML Web service.

    a. From the View menu, click Code. F7

    b. Click on the empty line above the comment:

    |

    // WEB SERVICE EXAMPLE

    This will position the insertion point in the right spot so that we can insert some

    code.

    c. From the View menu, click Toolbox. Or, press CTRL+ALT+X.

    d. Click the Guided Tour tab then double-click 1.3 WebService methods item to

    insert the code.

    OptionalYou can remove the four comment tags (//) before HelloWorld() as shown in

    the following picture and recompile to see a simple WebMethod example.

  • 7/29/2019 Guia Visual Studio Net

    17/72

    13

    PART 1: B UILD AN XML WEB SERVICE

    3Step 4 of 7: Build and test the Web service4

    Here we build the page and test the Web service using a test page generated

    automatically by ASP.NET. This will allow us to see the data returned fromthe two data sources and show the results in a simple Web page. This is how

    quickly and easily you can build and deploy an XML Web service with VisualStudio .NET!

    a. From the File menu, click Build and Browse. CTRL+F8

    b. Click the GetData hyperlink, then click Invoke.

    c . Examine the resulting schema and data for all customers and their orders.

  • 7/29/2019 Guia Visual Studio Net

    18/72

    14

    PART 1: B UILD AN XML WEB SERVICE

    3Step 5 of 7: Add a new performance counter4

    Using the Visual Studio .NET RAD server features, components and server-side

    resources, such as performance counters and message queues, are wrappedwith programmatic interfaces, making them easy to program.

    In this step, well create a custom performance counter that will keep trackof the number of times per second the new Web service method GetData is

    accessed.

    a. From the View menu, click Server Explorer. CTRL+ALT+S

    b. Expand the Servers tree and locate the Performance Counters (Servers

    computername Performance Counters).

    c . Right-click Performance Counters and click Create New Category .

    d. In the Category name box, type: bikes

    e. Click New.

    f. Change the Type list from NumberOfItems32 to RateOfCountsPerSecond32.

    Well go with the default name CounterName . Click OK.

  • 7/29/2019 Guia Visual Studio Net

    19/72

    15

    PART 1: B UILD AN XML WEB SERVICE

    3Step 6 of 7: Use the performance counter4

    Now we will update the performance counter by invoking it in our GetData

    method. One line of code is all we need to update the performance counter.Prior to Visual Studio .NET, simple steps such as these required hundreds of

    lines of code.

    a. In the Solution Explorer, right-click Service1.asmx and click View Designer.

    b. From the View menu, click Server Explorer. CTRL+ALT+S

    c. Expand the new bikes performance counter to locate CounterName.

    (Performance Counters bikes CounterName). Drag the CounterName icon to

    the design surface.

    d. Press F4 to view the properties of the performanceCounter1 object. Double-click

    the ReadOnly property to change it to False.

    e. Press F7 to view the code.

    f. Place the insertion point right before the return dataset line in the

    GetData() method.

    g. In the Toolbox, click the Guided Tour tab then double-click the 1.6 hit rate

    counter item.

  • 7/29/2019 Guia Visual Studio Net

    20/72

    16

    PART 1: B UILD AN XML WEB SERVICE

    3Step 7 of 7: Test the performance counter4

    Now well show the performance counter in action by watching the counter

    increment as we use the XML Web service.

    a. Double-click hit_rate.msc in the Solution Explorer window. CTRL+ALT+L

    b. Switch back to Visual Studio .NET, and press CTRL+F8 to build and browse the

    Web service.

    c. Click the GetData hyperlink. Click Invoke. Press the Refresh icon (Located

    on the left side of the toolbar) several times to requery the Web service.

    d. Switch to PerfMon and you should see the performance counter move up and

    down, showing the number of requests per second this page is handling.

    e. Close PerfMon (dont save the changes) and all browser windows.

    f. In Visual Studio .NET, from the Window menu, click Close All Documents. If

    asked to save changes, click Yes.

  • 7/29/2019 Guia Visual Studio Net

    21/72

    17

    Summary

    In this first exercise you have accomplished many of the tasks that will drive the

    next generation of computing. You have built and deployed an XML Web service.You added business logic and database connectivity using the Visual Studio .NET

    Server Explorer. Most importantly, you created this XML Web service in minimal

    time using the RAD skills that todays developers already have. Now that we have

    constructed and tested our XML Web service, we will build a series of client

    experiences that integrate the Web service into their functionality.

  • 7/29/2019 Guia Visual Studio Net

    22/72

    18

    Bui ld ing a Rich Windows Form

    Overview of Part 24

    Windows Forms is Microsofts next generation rich client forms package that

    breaks through the ceiling in desktop applications that once existed.

    Delivered as part of the .NET Framework, Windows Forms is available to all

    Visual Studio .NET developers, enabling developers to use the skills they

    possess today and the languages they know now to build the most powerful

    desktop applications ever.

    So, back to our sample company, Downhill Bikes. The company wants to add a

    smart client so that their call center staff can quickly retrieve details of

    customer orders as they field customer inquiries.

    Were going to build a Windows Forms-based application using the Visual

    Studio .NET designer. Using a third-party control, we will then extend the

    form to add reporting, and we will call the XML Web service we built in Part

    1. Youll see how easy it is to build and extend Windows Forms with Visual

    Studio .NET, and how straightforward it is to integrate business data and logic

    residing in XML Web services.

    PART 2: RICH WINDOWS

    FORMS

  • 7/29/2019 Guia Visual Studio Net

    23/72

    19

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 1 of 9: Add a new Visual Basic Windows Form project4

    Create a new Visual Basic .NET Windows project for our Customer Service

    program.

    a. From the File menu, choose Add Project, then New Project.

    b. In the Projects Type list, choose Visual Basic Projects. In the Templates list,

    choose Windows Application. Finally, in the Name box, type

    CustomerService and click OK.

    c . From the Project menu, click Set as StartUp Project.

  • 7/29/2019 Guia Visual Studio Net

    24/72

    20

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 2 of 9: Add a data grid to the form4

    Now well add a data grid to the form. Well use the data grid to see

    customer and order data. Well be able to make changes directly in the grid,resize columns, change sort order and drill into the order data details.

    a. From the View menu, click Toolbox. CTRL+ALT+X

    b. Locate the Windows Forms tab and click it.

    c . Double-click the DataGrid icon to add it to the form.

    d. Show the Grid Properties by pressing F4. Select the Dock property, type the

    letter T to change it from None to Top. Then, stretch the data grid until it fills

    the top two-thirds of the form.

    e. Drag a TextBox, a Button and a StatusBar onto the form below the DataGrid.

    (You may need to scroll down in the Toolbox for the StatusBar.)

    f. Click the Button and show its properties by pressing F4. Select the Text property

    and type: Search

    Your form should look like the following image:

  • 7/29/2019 Guia Visual Studio Net

    25/72

    21

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 3 of 9: Add a Web reference to our Web service4

    Visual Studio .NET makes it easy to consume XML Web services in a Windows

    Forms application. In this step, well consume the XML Web service wecreated earlier.

    a. From the Project menu, click Add Web Reference.

    b. Type http://localhost/DownhillBikes/Service1.asmx in the Address box.

    c. Click Add Reference.

  • 7/29/2019 Guia Visual Studio Net

    26/72

    22

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 4 of 9: Add the Imports statements4

    Adding the Imports statements to our code documents the namespaces we are

    using. Doing so reduces the code a developer has to type by eliminating thosenamespaces from the written code.

    a. From the View menu, click Code. F7

    b. Add a new, empty line at the top of the file.

    c. From the View menu, click Toolbox. CTRL+ALT+X

    d. In the toolbox, click the Guided Tour tab and double-click on 2.4 Import

    statements to insert the two import declarations:

  • 7/29/2019 Guia Visual Studio Net

    27/72

    23

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 5 of 9: Add the Visual Basic. NET source code4

    This code will complete the loop, referencing and calling the XML Web

    service, taking the data DataSet returned and binding it to the DataGrid onour form.

    a. Position the insertion point on the line above the End Class statement.b. Double-click on 2.5 VB methods to insert all the code.

  • 7/29/2019 Guia Visual Studio Net

    28/72

    24

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 6 of 9: Run the program and make changes4

    The DataGrid automatically senses the shape of the XML data and adds a plus

    sign to let the user drill into customer order details. The DataGrid also allowssorting of columns and editing of data if security permissions are met.

    Important

    In the following steps, you may press the F5 key as a shortcut to build

    and run the project. Please make sure that the GuidedTour Add-in Tool

    Window does not have focus when you use F5. Pressing F5 when the

    GuidedTour Tool Window has focus will cause it to go to part 0. (If this

    happens, you can simply navigate back to this step.)

    a. From the Debug menu, clickStart to run the application. (Or, press F5.)

    b. Expand a customer record (by clicking the + in the left-most column) and click

    CustomerOrders to view its orders.

    c. Expand an order record and click OrdersDetails to view its details.

    d. Click the left-arrow icon twice to return to the customer records.

    e. Type you in the box next to the Search button.

    f. Click Search.

    g. Change Rob Young to Robert Young and press the DOWN ARROW key.

    h. Close the Form1 window.

    i. From the Debug menu, clickStart to run the application. (Or, press F5.)

    j. Note that the change made in sub-step g is persistent. Close the Form1 window.

    Important

    If the CustomerService program doesnt start, make sure its your

    default project. In the Solution Explorer, right-click CustomerService,

    then click Set as StartUp Project.

  • 7/29/2019 Guia Visual Studio Net

    29/72

    25

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 7 of 9: Stop the Web service4

    Stopping IIS will stop the XML Web Service. Once we do this, the rich Windows

    application will switch to offline mode, giving the user full access to thedata.

    a. Click the Windows Start button and choose Run. [WINDOWS KEY ] + R

    b. In the Open box, type iisreset /stop and click OK.

  • 7/29/2019 Guia Visual Studio Net

    30/72

    26

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 8 of 9: Try it again4

    With the XML Web service offline, access to the application data is not

    available. The Microsoft .NET Framework provides built-in Web caching to ourapplication when we use ADO.NET which enables the offline scenario.

    a. In Visual Studio .NET, from the Debug menu, click Start to run the application.

    (Or, press F5.)

    b. Note the status bar displays Working in offline mode .

    c . Change the password of Robert Young to abc and press the DOWN ARROW key.

    d. Close the Form1 window.

  • 7/29/2019 Guia Visual Studio Net

    31/72

    27

    PART 2: BUIL D A RICH WINDOWS FORM

    3Step 9 of 9: Start IIS and run once more4

    When we start IIS and access our Windows application, we will see our offline

    data has been added to the SQL Server 2000 Database, completing thereconnect portion of the offline scenario.

    a. Click the Windows Startbutton, then click Run . (Or, press [WINDOWS KEY

    ] + R.)

    b. In the Open box, type iisreset /start and click OK.

    c . After the console window appears, wait for it to close by itself.

    c. In Visual Studio .NET, from the Debug menu, click Start to run the application.

    (Or, press F5.)

    d. Note that Robert Youngs password is abc and the status bar says Connected to

    WS.

    e. Close the Form1 window.

    f. In Visual Studio .NET, from the Window menu, clickClose All Documents. If

    asked to save changes, click Yes.

    Summary

    You have just completed the construction of a data-bound smart client application

    using Visual Studio .NET and the Windows Form designer. In this exercise, we

    incorporated the XML Web service built in Part I to extend the functionality of our

    Windows Form application. The next step in our Guided Tour will introduce us to the

    power and breadth of the Visual Studio .NET extensibility model and Crystal

    Reports for Visual Studio .NET.

  • 7/29/2019 Guia Visual Studio Net

    32/72

    28

    Exper ience t he Extens ib i l i t y o f Windows Forms

    Overview of Part 34

    Visual Studio .NET is a highly extensible development environment. Over 100

    ISVs will be shipping new .NET versions of their tools and add-ons for VisualStudio .NET. Youll find a special version of Crystal Reports integrated

    directly into the Visual Studio .NET IDE.

    Crystal Reports fills an important role in the application development processby providing developers with a productive, integrated, and RAD experience

    for creating highly interactive relational data reports. These reports can begenerated for the entire array of .NET application types, including XML Web

    services and Web-based solutions, as well as Windows-based applicationsrunning on desktop PCs and mobile devices.

    Downhill Bikes management would like to enhance their application with anew reporting capability. The new report will enable them to drill intocustomer orders and look for trends in customer spending.

    Proceeding with our tour, we will use Crystal Reports to extend our existing

    smart client with built -in reporting.

    PART3: EXTENDING T HE

    RICH WINDOWS FORM

  • 7/29/2019 Guia Visual Studio Net

    33/72

    29

    PART 3: EXTEND THE WINDOWS FORM

    3Step 1 of 6: Add a new Visual Basic. NET Windows Form4

    We will add a second Windows Form to our project to contain the Crystal

    Report we build in the next step.

    a. In the Solution Explorer, right-click WindowsApplication1, click Add, then click

    Add New Item .

    b. In the Templates pane, click the Windows Form icon and click Open (the

    default Name ofForm2.vb is fine).

  • 7/29/2019 Guia Visual Studio Net

    34/72

    30

    PART 3: EXTEND THE WINDOWS FORM

    3Step 2 of 6: Add a Crystal Report Viewer4

    The Crystal Report Viewer is integrated into Visual Studio .NET like the other

    rich controls in the toolbox. We will drag this report viewer to our form anduse the new Windows Forms dock feature to automatically resize the report

    when we resize the form.

    a. From the View menu, click Toolbox. CTRL+ALT+X

    b. Click the Windows Forms tab in the toolbox.

    c. Drag the Crystal Report Viewer (its at the bottom of the list) to the Windows

    Form designer surface. Make sure that the Crystal Report Viewer is selected in

    the designer.

    d. From the View menu, click Properties Window. F4

    e. From the Properties tool window, click Dock and press the letter F forFill.

  • 7/29/2019 Guia Visual Studio Net

    35/72

    31

    PA RT 3: EXTEND THE WINDOWS FORM

    3Step 3 of 6: Add a Report Document4

    Using existing or new reports is easy with Visual Studio .NET. In this step we

    just assign the report to the report document.

    a. From the File menu, click Add Existing Item . SHIFT+ALT+A

    b. In the Files of type list, change the selection to All Files (*.*).

    b. Navigate to Program Files\GuidedTour\Projects, click the CrystalReport1.rpt

    report template, and click Open.

    c . From the View menu, click Toolbox. CTRL+ALT+X

    d. Click the Components tab in the toolbox.

    e. Double-click on the ReportDocument icon and click OKin the Choose a

    ReportDocument dialog box.

  • 7/29/2019 Guia Visual Studio Net

    36/72

    32

    PART 3: EXTEND THE WINDOWS FORM

    3Step 4 of 6: Hook up the Report Viewer4

    In this step we will pass the data from the Web service to the Crystal Report.

    Crystal Reports was designed to integrate easily into Visual Studio .NETprojects, so reports can reuse existing DataSets, relieving the developer from

    having to recreate their data access logic.

    a. From the View menu, click Code. F7

    b. Position the cursor on the empty line above End Class .

    c . Double-click on the 3.4 Reporting code snippet in the Guided Tour toolbox.

  • 7/29/2019 Guia Visual Studio Net

    37/72

    33

    PART 3: EXTEND THE WINDOWS FORM

    3Step 5 of 6: Show the new Windows Form4

    In this step we will add a button to call the report form we just created.

    a. From the View menu, click Solution Explorer. CTRL+ALT+L

    b. Double-click Form1.vb in the Solution Explorer.

    c. From the View menu, click Toolbox. CTRL+SHIFT+X

    d. Drag a Button from the Windows Forms tab to the right ofSearch.

    e. Double-click Button2 to add the click event handler.

    f. In the Toolbox, double-click the 3.5 Show Reports form code item. The code

    should look like this:

  • 7/29/2019 Guia Visual Studio Net

    38/72

    34

    PART 3: EXTEND THE WINDOWS FORM

    3Step 6 of 6: Try it4

    Lets run the application and examine the rich report.

    a. From the Debug menu, click Start to run the application. F5

    b. Click Button2 to open the report.

    c. Maximize the Form2 window.

    d. Double-click an entry in the Order Date column to get order details.

    e. Close the Form2 and Form1 windows.

    f. In Visual Studio .NET, from the Window menu, click Close All Documents. If

    asked to save changes, click Yes.

    Summary

    In this step of the Guided Tour, you successfully incorporated a Crystal Reports

    viewer into the Downhill Bikes smart client application. This exercise illustrates the

    power of the Visual Studio .NET extensibility model by showing how third-party tool

    and language vendors can seamlessly integrate their products directly into Visual

    Studio .NET.

    In the next step of the Guided Tour, well delve into Web application development

    and the use of Application Center Test to analyze the load performance of our Web

    applications.

  • 7/29/2019 Guia Visual Studio Net

    39/72

    35

    Bui ld ing a Web Form and Test for Scal abi l i t y

    Overview of Part 44

    With Visual Studio .NET and Web Forms, developers can rapidly develop Web

    applications that run in any browser on any operating system using the same

    techniques previously used to build form-based desktop applications.

    Application Center Test (ACT), a new feature integrated with Visual Studio

    .NET Enterprise Architect, enables developers to gather performance metrics

    and perform functional testing of XML Web services within the Visual Studio

    .NET development environment.

    Before Downhill Bikes goes live wi th their new application, they would like to

    know that it will scale well. Using a built-in tool like Application Center Test,their developers and testers can see the immediate effects of the changes

    they make in the performance of their application.

    In this part, we will build a Web Form that accesses the previously built Web

    service. Then we will load test the Web service with ACT.

    PART4: BU ILD A WEB

    FORM AND LOAD TEST

  • 7/29/2019 Guia Visual Studio Net

    40/72

    36

    PART 4: BUILD A WEB FORM AND LOAD TEST

    3Step 1 of 6: Add a new ASP.NET Web Form built with C #4

    Using a built-in template in Visual Studio .NET, we will add a new Web Form

    for our Orders status page.

    a. From the View menu, click Solution Explorer. CTRL+ALT+L

    b. In the Solution Explorer, right-click DownhillBikes, then click Set as StartUp

    Project.

    c . From the File menu, click Add New Item. CTRL+SHIFT+A

    d. In the Templates pane, click the Web Form icon and type Orders.aspx in the

    Name box. Click Open.

  • 7/29/2019 Guia Visual Studio Net

    41/72

    37

    PART 4: BUILD A WEB FORM AND LOAD TEST

    3Step 2 of 6: Add an ASP.NET DataGrid4

    Dragging a DataGrid from the Web Forms toolbox provides an easy way to

    visually compose Web applications. The DataGrid is analogous to the gridcontrol we used earlier on a Windows Form. The difference is that the Web

    Forms version will render HTML, though the developer working with these twocontrols will see little difference between them, providing a consistent

    development experience and shorter learning curve for developers new to theWeb.

    a. From the View menu, click Toolbox. CTRL+ALT+X

    b. Click the Web Forms tab in the toolbox.

    c. Double-click the DataGrid icon.

    d. From the View menu, click Code. F7e. Position the cursor on the comment line for Page_Load:

    f. Double-click the 4.2 Orders Page_Load() item in the Guided Tour toolbox. The

    code should now look like this:

  • 7/29/2019 Guia Visual Studio Net

    42/72

    38

    PART 4: BUILD A WEB FORM AND LOAD TEST

    3Step 3 of 6: Secure access to the Orders Web Form4

    Using the Web.config file, we can lock down access to this page so that only

    authenticated users have access. This file is part of a hierarchy ofconfiguration files that make it easy to secure Web applications built with

    Visual Studio .NET.

    a. From the View menu, click Solution Explorer. CTRL+ALT+L

    b. Double-click the Web.config file (its the last file in the list).

    c . Locate the line (note the / before the word location).

    d. Position the insertion point below that line, press the Enter key, and double-

    click 4.3 Authenticate.

    e. Right-click the Orders.aspx file in the Solution Explorer and click View Code.

    f. From the File menu, click Build and Browse to view the new Orders page. (Or,

    press CTRL+F8.)

    g. Notice you were first directed to the login page. Click sign in. Now you should

    see the orders for the customer you logged in as (CustomerID is 1).

  • 7/29/2019 Guia Visual Studio Net

    43/72

    39

    PART 4: BUILD A WEB FORM AND LOAD TEST

    3Step 4 of 6: Start Application Center Test (ACT)4

    ACT provides sophisticated testing capabilities so that developers can analyze

    relative performance by simulating load on their Web applications, includingXML Web services.

    We will use ACT to see the affects of adding an output caching directive toour Web Service. Output caching is a new feature of ASP.NET which enables

    the reuse of cached pages, thus saving server CPU cycles and increasingperceived application performance.

    a. From the Windows Start menu, select All Programs (Programs in Windows 2000),

    then Microsoft Visual Studio .NET, then Visual Studio .NET Enterprise Features .From there, click Microsoft Application Center Test.

  • 7/29/2019 Guia Visual Studio Net

    44/72

    40

    PART 4: BUILD A WEB FORM AND LOAD TEST

    3Step 5 of 6: Build a new ACT Test Script4

    Using the built-in Wizard it is very easy to start using ACT. The recording

    feature records a user session we can then play back to generate load andstress our application.

    a. From the Actions menu, click New Test.

    b. Click Next on the Welcome screen.

    c. Click Record a new test. Click Next twice.

    e. Click Start recording.

    f. Navigate to http://localhost/downhillbikes/orders.aspx in the browser window

    that is launched by Application Center Test. Click the sign in button. Then closethe browseryouve finished recording your simple script.

    g. Switch back to Application Center Test and click Stop recording.

    h. Click Next.

    i. In the Test name box, type:

    orders test

  • 7/29/2019 Guia Visual Studio Net

    45/72

    41

    j. Click Next and then click Finish.

  • 7/29/2019 Guia Visual Studio Net

    46/72

    42

    PART 4: BUILD A WEB FORM AND LOAD TEST

    3Step 6 of 6: Add Page Output Caching4

    While the page is under load, well turn on page caching, with just one line of

    code. The increase in the number of pages served per second should jumpdramatically. Notice that ASP.NET does not require us to stop or disrupt the

    Web site when we update a page. We just save the page and the changes takeeffect immediately.

    a. Click the orders test item in the left pane.

    b. From the Actions menu, click Start Test. CTRL+F5

    c. Once the test has started, click Show Details.

    d. While the load test is running, switch back to Visual Studio .NET.

    e. From the View menu, click Solution Explorer. CTRL+ALT+L

    f. Double-click the Orders.aspx file.

    g. From the View menu, click HTML Source. CTRL+PgDn

    h. Place the insertion point at the beginning of the second line:

    |

  • 7/29/2019 Guia Visual Studio Net

    47/72

    43

    i. Double-click the 4.6 Output Cache code snippet.

    j. From the File menu, click Save All. CTRL+SHIFT+S

    k. Switch back to the Test Status window. Click the Show Details >> button to see

    the graph.

    You should see a jump in the number of Requests per Second (RPS) being served

    up by the page. Since the page is cached (for 10 seconds at a time), were

    drastically reducing the number of database calls.

    l. Close the Application Center Test windows.

    m. In Visual Studio .NET, from the Window menu, click Close All Documents. If it

    asks to save changes, click Yes.

    Summary

    Part 4 of the Guided Tour enabled us to build an ASP.NET Web application and testit using Application Center Test (ACT). The Web Form-based application we built

    was constructed using the same development paradigms previously used to build

    form-based desktop applications effectively leveling the learning curve to Web

    application development. We then employed ACT to load test our Web application

    to ensure scalability in a production environment.

    In Part 5, well integrate the functionality of third-party XML Web services into our

    Web application.

  • 7/29/2019 Guia Visual Studio Net

    48/72

    44

    XML Web Services at Work

    Overview of Part 54

    XML Web services will revolutionize software development both inside and

    outside the firewall. Visual Studio .NET makes it easy to create and consume

    Web services, using the familiar metaphor of the application component.

    Developers using Visual Studio .NET can simply right-click in the Solution

    Explorer window and select Add Web Reference. From there, they need

    only supply the URL to the Web service on their intranet or the Web, or

    browse the UDDI (Universal Description, Discovery, and Integration) registry

    to locate desirable Web references. The Web service is then available for use

    from within Visual Studio, with statement completion and other IntelliSensefeatures automatically supported.

    When Downhill Bikes wants to implement a new service for customers, the

    company needs tools to help their developers turn ideas into implementation.

    By using Visual Studio .NET, developers can add new functionality in a matter

    of hours, not days.

    In this part of the tour, youll add a Web reference to a third-party Microsoft

    partner to the Web application. The new functionality will enable Downhill

    Bikes to offer gift certificates to its customers. You will then add a Web

    reference to a service provided by one of DownhillBikes partners so

    customers can find authorized bike stores to redeem their certificates.

    PART 5: INTEGRATE XML

    WEB SERVICES

  • 7/29/2019 Guia Visual Studio Net

    49/72

    45

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 1 of 8: Add an image to the page4

    In this step you will add user interface elements to the thank you page to

    offer a gift certificate to a Downhill Bikes customer as they complete atransaction.

    Important

    The following step requires an Internet Connection.

    a. Double-click ThankYou.aspx in the Solution Explorer. CTRL+ALT+L

    b. Display the Web Forms toolbar by pressing CTRL+ALT+X and clicking the Web

    Forms button.

    c. Drag an Image control from the Web Forms toolbar bar into the lower-right

    cell. The image will be populated dynamically from the Web service.

  • 7/29/2019 Guia Visual Studio Net

    50/72

    46

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 2 of 8: Add a Web reference4

    In this step you will use UDDI and a Web service that returns valid gift

    certificates to customers.

    a. Click the DownhillBikes project in the Solution Explorer.

    b. From the Project menu, click Add Web Reference.

    c . Click the Test Microsoft UDDI Directory hyperlink.

    d. Type fontvelocity in the Business name box and click Search.

    e. Click the blue FontVelocity link, then click the FontVelocity WSDL-interface

    link. The resulting XML is the Web Service Description Language contract,

    describing a single method, Render.

    f. Click the Add Reference button.

  • 7/29/2019 Guia Visual Studio Net

    51/72

    47

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 3 of 8: Generate the gift certificate4

    In this step you will call a Web service that instantiates a gift certificate,

    which is actually a series of database records stored on a third party partnersserver. The back-end service is using a C++ component to generate and return

    a unique serial number, though the Web service interface abstracts theimplementation, enabling business partners to integrate regardless of

    platform or tool.

    a. In the Solution Explorer, right-click ThankYou.aspx, then click View Code.

    b. Place the insertion point on the empty line in the Page_Load method.

    c. Double-click 5.3 ThankYou: Page_Load snippet.

  • 7/29/2019 Guia Visual Studio Net

    52/72

    48

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 4 of 8: Place an order4

    Lets run the application and see the results of our work.

    a. From the View menu, click Solution Explorer. (Or, press CTRL+ALT+L.)

    b. In the Solution Explorer, under the DownhillBikes project, right-click

    Default.aspx, then click Set As Start Page.

    c. From the Debug menu, click Start Without Debugging. (Or, press CTRL+F5.)

    d. Click Add to Cart, and then click Checkout.

    e. Click Sign In, then click Place Order.f. Note the dynamically-generated text in the gift certificate, created through a

    Web service.

  • 7/29/2019 Guia Visual Studio Net

    53/72

    49

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 5 of 8: Add the bike store finder service4

    In this step we will integrate another Web service to find locations of

    authorized and convenient bike stores where we can redeem our giftcertificates. This Web service interaction is more complex than the previous,

    in that well be passing the users zip code to the service, and using that tolocate and return a list of nearby stores.

    a. Click the DownhillBikes project in the Solution Explorer.

    b. From the Project menu, click Add Web Reference.

    c. Type http://www.bikestorefinder.com/locator.asmx in the Address box.

    d. Click Add Reference.

  • 7/29/2019 Guia Visual Studio Net

    54/72

    50

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 6 of 8: Add elements to the page4

    In this step, we will enhance our Web Form by adding additional user

    interface elements to the page. Note how similar this experience is to theWindows Forms design experience.

    a. Double-click the ThankYou.aspx page in the Solution Explorer.

    b. Position the insertion point after the Image and press ENTER. Type:

    Enter your ZIP code for stores nearest youc . Drag a TextBox onto the form, below the text you previously entered.

    d. Drag a Button to the right of the TextBox and press F4 to show its properties.

    e. Change the Text property to Search.

    f. Position the insertion point after the Search button and press ENTER. Drag a

    Label below the TextBox. Your screen should look like the following:

  • 7/29/2019 Guia Visual Studio Net

    55/72

    51

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 7 of 8: Add code to handle the button click4

    The code behind the button will set a reference to the Web service and send

    the users zip code to it, returning an XML-based list of bike stores that wewill then append to a label control on the page.

    a. Double-click the Search button to add a server-side event handler.

    b. Double-click 5.8 ThankYou: Store locator.

    c. On the Build menu, click Build Solution. CTRL+SHIFT+B

  • 7/29/2019 Guia Visual Studio Net

    56/72

    52

    PART 5: B UILD A WEB PAGE - ORDERS

    3Step 8 of 8: Place an order4

    Start the application and test it.

    a. From the Debug menu, click Start Without Debugging. CTRL+F5

    b. Click add to cartthen checkout.

    c. Click sign in then place order .

    d. Type your ZIP code in the box and click the button.

    e. Note the location of the stores near to that ZIP code.

    f. Close the browser.

    g. In Visual Studio .NET, from the Window menu, click Close All Documents. If

    asked to save changes, click Yes.

    Summary

    In this part of the Tour, you used the built-in support for UDDI that is found in Visual

    Studio .NET to discover and incorporate a Web service from third-party partners to

    your Web application. The new functionality enables Downhill Bikes to both offer gift

    certificates to its customers find authorized bike stores where they can redeem their

    certificates.

  • 7/29/2019 Guia Visual Studio Net

    57/72

    53

    Bui ld ing a m obi le Web Form

    Overview of Part 64

    The Microsoft Mobile Internet Toolkit (MMIT), available as an add-on to Visual

    Studio .NET, provides the tools to enable mobile Web application

    development. MMIT makes it easy to build a single mobile Web-based

    application that will automatically generate HTML, compact HTML (cHTML),

    or Wireless Markup Language (WML), depending on the target device's

    capabilities, and do so using business logic in XML Web services. Now with

    MMIT, targeting multiple devices with a single Visual Studio .NET application

    is as seamless as building a rich Windows-based desktop application.

    Having added new gift certificate capabilities to its site in the previous part,Downhill Bikes now needs an easy way for their dealers to validate the gift

    certificates online. They also want an easy way for their customers to checkthe balance of their gift certificates online.

    In this part you will use the Mobile Web designer in Visual Studio .NET to build

    a Web page that can be accessed by a variety of devices, giving

    DownhillBikes dealers and their customers complete flexibility in running the

    mobile Web application.

    PART 6: BUILD A

    MOBILE WEB PAGE

  • 7/29/2019 Guia Visual Studio Net

    58/72

    54

    6: BUILD A WEB PAGE MOBILE

    3Step 1 of 7: Add a mobile Web form4

    When MMIT is installed, Mobile Web Forms are integrated directly into the

    Visual Studio .NET IDE. In this step, you will start a new mobile application.

    a. From the View menu, click Solution Explorer. CTRL+ALT+L

    b. In the Solution Explorer, right-click DownhillBikes, click Add, then click Add

    New Item .

    c. Click Mobile Web Form in the Templates pane, type Verify.aspx in the Name

    box, and click Open.

  • 7/29/2019 Guia Visual Studio Net

    59/72

    55

    PART 6: BUILD A WEB PAGE MOBIL E

    3Step 2 of 7: Add elements to the form4

    Building mobile Web forms is identical to building Web Forms and Windows

    Forms. The code behind is also the same so leveraging work done in otherprojects is easy.

    a. From the View menu, click Toolbox. CTRL+ALT+X

    b. Click the Mobile Web Forms tab in the toolbox.

    c. Drag a Label onto the form.

    d. In the Properties window, type serial number in the Text property box.

    e. Drag a TextBox onto the form below the label.

    f. Drag a Command onto the form below the TextBox.

    g. In the Properties window, type Validate in the Text property box for the

    Command. Your form should look like the following:

  • 7/29/2019 Guia Visual Studio Net

    60/72

    56

    PART 6: BUILD A WEB PAGE MOBIL E

    3Step 3 of 7: Add another mobile Web form4

    In this step you will drag a second mobile form onto the design surface and

    add a label to it. This form will be used to display the results of thevalidation performed in the previous step.

    a. Drag a Form onto the design surface below the first form (Form1).

    b. Drag a Label onto the second form. Form2 should look like the one shown below:

  • 7/29/2019 Guia Visual Studio Net

    61/72

    57

    PART 6: BUILD A WEB PAGE MOBIL E

    3Step 4 of 7: Add code behind the Validate button4

    In this step you will add code behind the validation button added in the

    previous step to call the server-side validation component and return textindicating whether or not the certificate is valid.

    a. Double-click the Validate button.

    b. In the toolbox, double-click 6.4 Validate code.

  • 7/29/2019 Guia Visual Studio Net

    62/72

    58

    PART 6: BUILD A WEB PAGE MOBIL E

    3Step 5 of 7: View the new form4

    Lets run the application and check a certificate we got in Part 5.

    a. From the File menu, click Build and Browse. CTRL+F8

    b. Type the serial number previously viewed in the box (000102506258, for

    example) and click Validate.

    c . The certificate should be valid.

    d. Click Back, change one of the digits, and click Validate. Making random changes

    should result in an invalid certificate.

    f. Close your browser.

  • 7/29/2019 Guia Visual Studio Net

    63/72

    59

    PART 6: BUILD A WEB PAGE MOBIL E

    3Step 6 of 7: View in Microsoft Mobile Explorer4

    Using the Microsoft Mobile Explorer we can emulate an actual WAP phone to

    test the functionality and compatibility of our mobile page.

    a. If you have the Microsoft Mobile Explorer Browser installed, you can preview this

    page from a cell phone emulator.

    b. From the View menu, click Mobile Explorer Browser, and then choose Show

    Browser.

    c. Type http://localhost/downhillbikes/verify.aspx in the navigation box.

    d. Click the text box and type 000102506258 for the serial number.

    e. Click OK, then click Validate. The resulting screens should look similar to the

    following:

  • 7/29/2019 Guia Visual Studio Net

    64/72

    60

    e. In Visual Studio .NET, from the Window menu, click Close All Documents. If

    asked to save changes, click Yes.

  • 7/29/2019 Guia Visual Studio Net

    65/72

    61

    PART 6: B UILD A WEB PAGE MOBIL E

    3Step 7 of 7: Summary4

    The Visual Studio .NET Guided Tour covered three areas: building client

    application, web-based server applications, and XML Web Services.

    The Microsoft .NET platform pivots itself around these 3 fundamentals that

    are driving the digital revolution. First, the platform was built in concert withthe Microsoft strategy around XML Web services the crucial factor in solving

    the pressing problem of software and business integration. Second, Microsoft.NET provides the underlying substrate to deliver client experiences tailored

    to the desktop PC, the thin-client Web browser, and to the multitude ofemerging smart devices. Finally, the Microsoft .NET platform recognizes the

    need for enterprise-critical server software and integration.

    Visual Studio .NET represents the cornerstone to the Microsoft .NET platform.

    It is the tool that developers will use to drive their organizations and theircustomers into the world of XML Web services. Like the .NET platform itself,

    Visual Studio .NET aligns itself around the essentials of his digital revolution XML Web services, Clients, and Servers.

    By providing the most efficient way to both build and consume XML Webservices, Visual Studio .NET keeps developers on the vanguard of next

    generation application development. In addition, Visual Studio .NET extendsthe concept of RAD to every facet of the client experience, enabling

    developers to build desktop, Web, and mobile applications using the skillsthey already have and the languages they already know. Finally, Visual Studio

    .NET demystifies server-side development providing RAD development ofbusiness logic, supplying the tools needed to deploy data-rich Internet

    applications, and delivering the premier suite of enterprise servers to satisfy

    every business need.

    With Visual Studio .NET, the once unattainable goals of developers and

    organizations alike are finally brought within reach. Empowering

    organizations to seamlessly move to the world of XML Web services,

    delivering resources for every client experience, and addressing the issues ofserver development and integration Visual Studio .NET unleashes the power

    of .NET.

    Summary

    The final part to the Guided Tour provided an introduction to the Microsoft Mobile

    Internet Toolkit (MMIT). MMIT provided a forms-based visual interface to build

    mobile applications for a variety of emerging smart mobile devices.

  • 7/29/2019 Guia Visual Studio Net

    66/72

    62

  • 7/29/2019 Guia Visual Studio Net

    67/72

    63

    Appendix 1: Ge t t ing St art ed

    1.1 Related Readm es

    In addition to this Visual Studio .NET product readme, Visual Studio .NET includes

    other readme documents that contain information pertinent to specific product

    areas. The following list contains the names of related readme documents and their

    locations on supplied media.

    Content

    Name File Name Location

    Microsoft

    Visual Studio.NET

    Windows

    ComponentUpdate

    Moreinfo.htm In the Help directory of the Visual Studio

    .NET Windows Component Update CD orin the wcu\Help directory of the DVD

    Microsoft

    Visual Studio.NET Setup

    Administrator

    Mode Readme

    adminreadme.htm In the Setup directory of the Visual Studio

    .NET CD1 or DVD

    .NETFramework

    SDK

    NA http://go.microsoft.com/fwlink/?LinkId=501

    VSIP & VSA

    SDK

    Readme.htm VSIP SDK CD in the root directory

    VSS 6.0c Readmess.htm Visual SourceSafe 6.0c CD in the root

    directory

    Duwamish 7.0

    Visual Basic

    sample

    readme.htm Default location: [Drive letter where Visual

    Studio .NET is installed]:\Program

    Files\Microsoft Visual Studio.NET\Enterprise Samples\Duwamish 7.0

    VB

    Duwamish 7.0

    C# sample

    readme.htm Default location: [Drive letter where Visual

    Studio .NET is installed]:\ProgramFiles\Microsoft Visual Studio

    .NET\Enterprise Samples\Duwamish 7.0CS

    APPENDICES

  • 7/29/2019 Guia Visual Studio Net

    68/72

    64

    Fitch and

    Mather 7.0sample

    ReadMe.html Default location: [Drive letter where Visual

    Studio .NET is installed]:\ProgramFiles\Microsoft Visual Studio

    .NET\Enterprise Samples\FMStocks7

    Application

    Center Test(ACT)

    ReadMe.htm [Drive letter where Visual Studio .NET is

    installed]:\Program Files\Microsoft ACT\

    Student Tools README.HTM Student Tools CD in the root directory

    Faculty Tools README.HTM Faculty Tools CD in the root directory

    1.2 System Requi rements

    System Requirements for Installing Visual Studio .NET Versions

    Visual Studio .NET

    Enterprise

    Architect

    Enterprise

    Developer

    Professional Academic

    Processor PC with a Pentium II-class processor, 450 MHz

    (recommended: Pentium III-class, 600MHz)

    RAM1 Windows NT 4.0 Workstation 64 MB, Windows NT 4.0Server 160 MB

    (recommended: 96 MB for Workstation, 192 MB for

    Server)

    Windows 2000 Professional 96 MB; Windows 2000

    Server 192 MB

    (recommended: 128 MB for Professional, 256 MB forServer)

    Windows XP Professional 160 MB

    (recommended: 192 MB)

    Windows XP Home 96 MB

  • 7/29/2019 Guia Visual Studio Net

    69/72

    65

    (recommended: 160 MB)

    Available

    Hard DiskSpace

    2

    600 MB on system drive, 3 GB installation drive

    Operating

    System3, 4

    Windows 2000, Windows XP, and Windows NT 4.0

    CD-ROM or

    DVD-ROM

    Drive5

    Required

    Video 800 x 600, 256 colors (recommended: High Color 16-bit)

    Mouse Microsoft mouse or compatible pointing device

    Appendix 2: Inst al lat ion

    2.1 Prepar ing t o Inst al l V isual Studio .NET

    For the latest installation instructions for Visual Studio .NET, visit:http://support.microsoft.com/support/kb/articles/Q312/7/79.asp

    Before installing Visual Studio .NET, verify that you have met the

    system requirements and follow the instructions below for preparing toinstall Visual Studio .NET.

    If you use Microsoft Office XP Developer, you must install it prior to.NET Framework SDK and MSDN developer program for VisualStudio .NET. Otherwise the Office Developer Help documentation will

    not be available.

    If you are running an operating system with Turkish or Azeri set as the

    active locale, see the .NET Framework SDK readme at

    http://go.microsoft.com/fwlink/?LinkId=501 before installing. In version 1

    of the .NET Framework, there are known issues for the Turkish and

    Azeri locales.

    Warning: If you have previously installed any pre-release versions of the .NET

    Framework or Visual Studio (Release Candidate, Beta 2, Beta 1, or PDCTechnology Preview) on your computer, you must complete the following steps

    to uninstall the previous releases.

    To Uninsta l l V isual Stud io .NET Beta 2 or Lat er Pre-Release Vers ions

    1. From the Start menu, choose Settings and then Control Panel.

    2. Choose Add/Remove Programsand then choose Change or Remove

    Programs.

  • 7/29/2019 Guia Visual Studio Net

    70/72

    66

    3. If present, select Visual Studio .NET and choose Change/Remove .

    Otherwise, skip to step 7.

    4. Click link 2, Visual Studio .NET.

    5. Click Uninstall Visual Studio .NET to begin uninstall.

    6. After uninstall completes for Visual Studio .NET Beta 2, return to the

    Add/Remove Programs window.

    7. Select Microsoft .NET Framework and choose Change/Remove.

    8. AnswerYes to proceed with removal.

    9. After removing Microsoft .NET Framework, return to the Desktop.

    10. Right-click My Computerand select Manage from the shortcut menu.

    11. Expand the Services and Applicationsnode and select Services.

    12. Double-click .NET Framework Support Service.

    13. Note If the service is unlisted, proceed to step 14.

    14. Change the Startup type to Disabled.

    15. Restart your machine.

    To Uninsta l l V isual Stud io .NET 7.0 Beta 11. From the Start menu, choose Settings and then Control Panel.

    2. Choose Add/Remove Programsand then choose Change or Remove

    Programs.

    3. Select Visual Studio .NET 7.0 Enterprise and choose Change/Remove.

    4. Click link 2, Visual Studio .NET.

    5. Click Uninstall Visual Studio .NET 7.0 Enterprise to begin uninstall.

    6. After uninstall completes for Visual Studio .NET 7.0 Beta 1, return to the

    Add/Remove Programs window.

    7. Select Microsoft .NET Framework SDK and choose Change/Remove.

    8. AnswerYes to proceed with removal.

    To Uninsta l l V isual Stud io 7.0 PDC Technology Preview

    1. From the Start menu, choose Run.

  • 7/29/2019 Guia Visual Studio Net

    71/72

    67

    2. In the Run dialog box, type the following:

    msiexec.exe /x {33334F07-0C6B-11D3-A51D-00A0C9231BA1}

    NOVSUI=1

    3. AnswerYes, when prompted, to proceed with the removal of Visual Studio

    .NET PDC Technology Preview.

    4. In the Run dialog box, type the following:

    msiexec.exe /x {62EDCF3C-69F4-11D3-A521 -00A0C9231BA1}

    5. AnswerYes, when prompted, to proceed with removal of the Pre-release

    Bootstrap for Visual Studio .NET PDC Technology Preview.

    6. From the Start menu, choose Settings and then Control Panel.

    7. Choose Add/Remove Programsand then choose Change or RemovePrograms.

    8. Select Microsoft NGWS SDK and choose Change/Remove.

    9. AnswerYes to proceed with removal.

    10. Remove all files from n:\Documents and Settings\All Users\Application

    Data\Microsoft Help. This step ensures the removal of PDC releasedocumentation.

    2.2 Instal l ing Mic rosof t Visual Studio .NETTo Inst a l l V isual Stud io .NET

    1. Close all open applications to prevent additional reboots during setup.

    2. Insert the disc labeled Visual Studio .NETCD1 orDVD.

    Autorun starts Setup.exe. If Autorun is disabled, run Setup.exe from theroot of the installation CD or DVD.

    The setup program scans your disk for installed components. If the scan

    determines that the system requires a component update, Step 1: InstallWindows Component Update, is available in the Installation dialog box.

    Select Step 1 to update the system components. If a component update isnot required, this option is not available. After updat ing the system

    components, the Installation dialog box enables Step 2: Install Visual

    Studio .NET. Select Step 2 to install Visual Studio .NET.

    Note: If you are running an anti-virus program, such as Norton AntiVirus2001, while setup runs, warnings may be displayed because setup runs

    scripts that access the file system object. It is safe to allow the scripts torun.

  • 7/29/2019 Guia Visual Studio Net

    72/72

    To reg ist er Visual Stud io .NET

    Visit the Visual Studio .NET Internet registration site at

    http://register.microsoft.com/regsys/regsys.asp?wizid=4289&lcid=1033.