Programming the Microsoft® .NET Framework with Visual Basic® .NET (Prerelease) - Pdf 69

Course Number: 2415A
Released: 10/2001

Delivery Guide
Programming the Microsoft
®

.NET Framework with
Visual Basic
®
.NET (Prerelease)
Part Number: X08-54449
This course is based on the prerelease Beta 2 version of Microsoft
®
Visual Studio .NET.
Content in the final release of the course may be different from the content included in this
prerelease version. All labs in the course are to be completed with the Beta 2 version of
Visual Studio .NET. Information in this document, including URL and other Internet Web site references, is subject to
change without notice. Unless otherwise noted, the example companies, organizations, products,
domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious,
and no association with any real company, organization, product, domain name, e-mail address,
logo, person, place or event is intended or should be inferred. Complying with all applicable

Course Materials ......................................................................................................2

Prerequisites.............................................................................................................3

Course Outline .........................................................................................................4

Microsoft Certified Professional Program ...............................................................8

Facilities.................................................................................................................10

Module 1: Overview of the Microsoft .NET Framework
Overview..................................................................................................................1

Overview of the Microsoft .NET Framework..........................................................2

Overview of Namespaces ......................................................................................12

Review ...................................................................................................................15

Module 2: Introduction to a Managed Execution Environment
Overview..................................................................................................................1

Writing a .NET Application.....................................................................................2

Compiling and Running a .NET Application...........................................................9

Multimedia: Application Loading and Single-File Assembly Execution ..............25

Lab 2: Building a Simple .NET Application..........................................................27


Application Deployment Scenarios .........................................................................7

Related Topics and Tools.......................................................................................31

Lab 4: Packaging and Deployment ........................................................................37

Review ...................................................................................................................42

Module 5: Common Type System
Overview..................................................................................................................1

An Introduction to the Common Type System ........................................................2

Elements of the Common Type System...................................................................8

Object-Oriented Characteristics.............................................................................24

Lab 5: Building Simple Types ...............................................................................39

Review ...................................................................................................................44
iv Programming the Microsoft® .NET Framework with Visual Basic® .NET (Prerelease) Module 6: Working with Types
Overview................................................................................................................. 1

System.Object Class Functionality ......................................................................... 2

Specialized Constructors....................................................................................... 12


Demonstration: Using Delegates............................................................................. 8

Multicast Delegates............................................................................................... 12

Demonstration: Multicast Delegates..................................................................... 19

Events.................................................................................................................... 22

When to Use Delegates, Events, and Interfaces.................................................... 30

Lab 8: Creating a Simple Chat Server................................................................... 31

Review .................................................................................................................. 41

Module 9: Memory and Resource Management
Overview................................................................................................................. 1

Memory Management Basics.................................................................................. 2

Multimedia: Simple Garbage Collection .............................................................. 10

Non-Memory Resource Management................................................................... 12

Implicit Resource Management ............................................................................ 13

Multimedia: Garbage Collection........................................................................... 18

Explicit Resource Management ............................................................................ 25

Optimizing Garbage Collection ............................................................................ 34


Security ..................................................................................................................27

Lab 11: Creating a DateTime Client/Server Application.......................................35

Review ...................................................................................................................39
Customer Evaluation..............................................................................................41

Module 12: Serialization
Overview..................................................................................................................1

Serialization Scenarios.............................................................................................2

Serialization Attributes ............................................................................................4

Object Graph............................................................................................................5

Serialization Process ................................................................................................7

Serialization Example ..............................................................................................9

Deserialization Example ........................................................................................10

Custom Serialization..............................................................................................12

Custom Serialization Example...............................................................................14

Security Issues .......................................................................................................17

Lab 12: Serialization ..............................................................................................18

.NET Framework. In addition to offering an overview of the .NET
Framework and an introduction to key concepts and terminology, the course
provides a series of labs, which introduce and explain .NET Framework
features that are used to code, debug, tune, and deploy applications.
Audience
This course is intended for experienced, professional software developers who
work in independent software vendors or software companies or work on
corporate enterprise development teams. Most students will be Microsoft
Visual Basic
®
developers.
Student Prerequisites
This course requires that students meet the following prerequisites:

Students should be proficient in the Visual Basic programming language
and have been exposed to the Visual Basic .NET language.

Students can meet these prerequisites by taking Course 2373, Programming
with Microsoft Visual Basic .NET (Prerelease).

Course Objectives
After completing this course, the student will be able to:

List the major elements of the .NET Framework and explain how they fit
into the .NET platform.

Explain the main concepts behind the common language runtime and use
the features of the .NET Framework to create a simple application.

Create and use components in Microsoft Windows

Serialize and deserialize an object graph.

Create distributed applications by using Web Services and Object
Remoting.

Programming the Microsoft® .NET Framework with Visual Basic® .NET (Prerelease) ix Course Timing
The following schedule is an estimate of the course timing. Your timing may
vary.
Day 1
Start End Module
9:00 9:30 Introduction
9:30 10:00 Module 1: Overview of the Microsoft .NET Framework
10:00 10:15 Break
10:15 11:00 Module 2: Introduction to a Managed Execution Environment
11:00 11:15 Lab 2: Building a Simple .NET Application
11:15 11:45 Module 3: Working with Components
11:45 12:00 Lab 3.1: Creating a .NET Framework Component
12:00 1:00 Lunch
1:00 1:15 Module 3: Working with Components (continued)
1:15 1:30 Lab 3.2: Creating a Simple Console-Based Client
1:30 2:00 Module 3: Working with Components (continued)
2:00 2:30 Lab 3.3: Calling a Component Through an ASP .NET Page
2:30 2:45 Break
2:45 4:15 Module 4: Deployment and Versioning

Day 2
Start End Module

12:45 1:30 Module 10: Data Streams and Files
1:30 2:15 Lab 10: Files
2:15 2:30 Break
2:30 3:30 Module 11: Internet Access
3:30 4:15 Lab 11: Creating a DateTime Client/Server Application

Day 5
Start End Module
9:00 9:30 Module 12: Serialization
9:30 10:15 Lab 12: Serialization
10:15 10:30 Break
10:30 11:30 Module 13: Remoting and Web Services
11:30 12:30 Lunch
12:30 1:20 Lab 13.1: Building an Order-Processing Application by Using
Remoted Servers
1:20 2:20 Module 13: Remoting and Web Services (continued)
2:20 2:35 Break
2:35 3:25 Lab 13.2: Using a Web Service
Programming the Microsoft® .NET Framework with Visual Basic® .NET (Prerelease) xi Trainer Materials Compact Disc Contents
The Trainer Materials compact disc contains the following files and folders:

Autorun.exe. When the CD is inserted into the CD-ROM drive, or when you
double-click the autorun.exe file, this file opens the CD and allows you to
browse the Student Materials or Trainer Materials CD.

Default.htm. This file opens the Trainer Materials Web page.


Pptview. This folder contains the PowerPoint Viewer, which is used to
display the PowerPoint slides.

Webfiles. This folder contains the files that are required to view the course
Web page. To open the Web page, open Windows Explorer, and in the root
directory of the compact disc, double-click Default.htm or Autorun.exe.

xii Programming the Microsoft® .NET Framework with Visual Basic® .NET (Prerelease) Student Materials Compact Disc Contents
The Student Materials compact disc contains the following files and folders:

Autorun.exe. When the CD is inserted into the CD-ROM drive, or when you
double-click the autorun.exe file, this file opens the CD and allows you to
browse the Student Materials CD.

Default.htm. This file opens the Student Materials Web page. It provides
you with resources pertaining to this course, including additional reading,
review and lab answers, lab files, multimedia presentations, and course-
related Web sites.

Readme.txt. This file contains a description of the compact disc contents and
setup instructions in ASCII format (not a Microsoft Word document).

2415A_ms.doc. This file is the Classroom Setup Guide. It contains a
description of classroom requirements, classroom setup instructions, and the
classroom configuration.

Democode. This folder contains demonstration code.

The following conventions are used in course materials to distinguish elements
of the text.
Convention Use




Indicates an introductory page. This symbol appears next
to a topic heading when additional information on the topic
is covered on the page or pages that follow it.
bold Represents commands, command options, and syntax that
must be typed exactly as shown. It also indicates
commands on menus and buttons, dialog box titles and
options, and icon and menu names.
italic In syntax statements or descriptive text, indicates argument
names or placeholders for variable information. Italic is
also used for introducing new terms, for book and course
titles, and for emphasis in the text.
Title Capitals Indicate domain names, user names, computer names,
directory names, and folder and file names, except when
specifically referring to case-sensitive names. Unless
otherwise indicated, you can use lowercase letters when
you type a directory name or file name in a dialog box or
at a command prompt.
ALL CAPITALS
Indicate the names of keys, key sequences, and key
combinations — for example, ALT+SPACEBAR.
monospace
Represents code samples or examples of screen text.
[ ] In syntax statements, enclose optional items. For example,

Contents
Introduction 1
Course Materials 2
Prerequisites 3
Course Outline 4
Microsoft Certified Professional Program 8
Facilities 10

Introduction

This course is based on the prerelease Beta 2 version of Microsoft® Visual Studio .NET.
Content in the final release of the course may be different from the content included in this
prerelease version. All labs in the course are to be completed with the Beta 2 version of
Visual Studio .NET.
Information in this document, including URL and other Internet Web site references, is subject to
change without notice. Unless otherwise noted, the example companies, organizations, products,
domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious,
and no association with any real company, organization, product, domain name, e-mail address,
logo, person, place or event is intended or should be inferred. Complying with all applicable
copyright laws is the responsibility of the user. Without limiting 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 any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Module Strategy
Use the following strategy to present this module:

Course 2415A: Programming the Microsoft .NET Framework with
Visual Basic .NET (Prerelease)
Show the slide that displays the course number and course title.

Introduction
Welcome students to the course and introduce yourself. Provide a brief
overview of your background to establish credibility.
Have students introduce themselves and provide their background, product
experience, and expectations of the course.
Record student expectations on a white board or flip chart that you can
reference later in class.

Course Materials
Explain the purpose of all materials used in this course.

Prerequisites
Provide the students with the list of prerequisites that they should have met
before taking this course. This is an opportunity for you to identify students
who may not have the appropriate background or experience to attend this
course.

Course Outline
Provide an overview of each module and what students will learn.
Explain how this course will meet students’ expectations by relating the
information covered in individual modules to their expectations.

Microsoft Certified Professional Program

Topic Objective
To introduce yourself,
establish credibility, meet
students, and set student
expectations for the course.
Lead-in
Good morning. Welcome to
Course 2415A:
Programming the Microsoft
.NET Framework with
Visual Basic .NET
(Prerelease).

My name is...
Introduce yourself.

Provide a brief overview of
your background to
establish credibility as a
.NET Framework instructor.

Ask students to introduce
themselves, addressing the
bulleted items on the slide.
Delivery Tip
As students introduce
themselves, use a white
board or flip chart to record
their expectations of the
course.

the CD-ROM drive, and then in the root directory of the compact disc,
double-click Autorun.exe or Default.htm.


Course evaluation. To provide feedback on the course, training facility, and
instructor, you will have the opportunity to complete an online evaluation
near the end of the course.
To provide additional comments or inquire about the Microsoft Certified
Professional program, send e-mail to [email protected]
.Topic Objective
To identify and describe the
course materials.
Lead-in
We have provided
everything you need for this
course. You will find the
following materials at your
desk...
Describe the contents of the
student workbook and the
Student Materials compact
disc.

Have students write their
names on both sides of the
name card.


Proficiency in the Microsoft Visual Basic
®
programming language

Some exposure to the Visual Basic .NET language
Students can meet the prerequisites by taking Course 2373A, Programming
with Microsoft Visual Basic .NET (Prerelease).

Topic Objective
To present and describe the
prerequisites for this course.
Lead-in
The following prerequisite
knowledge is needed for this
course.
4 Introduction

Course Outline

Module 1: Overview of the Microsoft .NET Framework

Module 2: Introduction to a Managed Execution
Environment

Module 3: Working with Components

Module 4: Deployment and Versioning

Module 5: Common Type System


the .NET Framework common language runtime to deploy multiple versions of
a component.
Topic Objective
To provide an overview of
each module and what
students will learn.
Lead-in
In this course, we will
cover...
Briefly describe each
module.

As you describe each
module, acknowledge any
information that will meet
the student expectations
that you recorded earlier.
Introduction 5 Module 5, “Common Type System,” introduces the Common Type System.
The module discusses how to differentiate between value types and reference
types and examines how classes, interfaces, properties, methods, events, and
values are represented in the .NET Framework. After completing this module,
you will be able to create, use, and extend types by understanding the Common
Type System architecture.
Module 6, “Working with Types,” discusses the use of attributes to control
visibility and inheritance on types and explains how to work with various type
operations, such as boxing and unboxing, and type operators. In addition, this
module discusses how to build an interface that supports methods and

strings, arrays, collections, and enumerators. After completing this module, you
will be able to use the .NET framework class library to efficiently create and
manage strings, arrays, collections, and enumerators.
Module 8, “Delegates and Events,” explains how the .NET Framework uses
delegates in callback and event-handling scenarios. After completing this
module, you will be able to use delegates and events to have an event sender
object signal the occurrence of an “action” to an event receiver object.
Module 9, “Memory and Resource Management,” discusses how the .NET
Framework automatically handles the allocation and release of an object’s
memory resources through garbage collection. After completing this module,
you will be able to describe and control how memory and other resources are
managed in the .NET Framework.
Module 10, “Data Streams and Files,” introduces the System.IO namespace
and discusses the types that it contains that allow synchronous and
asynchronous reading from and writing to data streams and files. This module
discusses synchronous operations only, as asynchronous operations are beyond
the scope of this course. After completing this module, you will be able to read
from and write to data streams and files.
Module 11, “Internet Access,” discusses the use of the System.Net classes to
communicate with other applications by using common protocols, such as
HTTP, Transmission Control Protocol (TCP), User Datagram Protocol (UDP),
and Socket Internet protocols. After completing this module, you will be able to
use the basic request/response model to send and receive data over the Internet.
Introduction 7 Module 12, “Serialization,” explains how to use serialization to convert a graph
of objects into a linear sequence of bytes, which can then be sent to a remote
computer and deserialized, thereby making a clone in the remote memory of the
original graph of objects. After completing this module, you will be able to


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status