Upload
synapseindiaappsdevelopment
View
222
Download
0
Embed Size (px)
Citation preview
8/10/2019 Dot NET Fundamentals Part1
1/50
1
.NET Fundamentals
Week 1
November 6, 2003
8/10/2019 Dot NET Fundamentals Part1
2/50
2
Class ScheduleNovember 6, 2003
Introductions and other beginning stuff Review Class Syllabus / Class Goals
Class Dates
Introduction to .NET Introduction to C#
Class Exercise(s)
Homework Assignment
8/10/2019 Dot NET Fundamentals Part1
3/50
3
.Net Fundamentals
CT-186
8/10/2019 Dot NET Fundamentals Part1
4/50
4
Text Books
Applied .NET Framework Programming by
Jeffrey Richter
Programming C# by Jessie Liberty
8/10/2019 Dot NET Fundamentals Part1
5/50
5
Grades
5 take-home assignments (75%)
Final Exam (part of last class) (25%)
8/10/2019 Dot NET Fundamentals Part1
6/50
6
Prerequisites
Fundamental of Programming (CT100)
or
by permission of the instructor.
8/10/2019 Dot NET Fundamentals Part1
7/50
7
Class Goals
8/10/2019 Dot NET Fundamentals Part1
8/50
8
Class Goals
Provide an overview of the .NET Architecture with
Major Components
Programming Languages
ADO.NET
ASP.NET
Web Services
XML Integration
8/10/2019 Dot NET Fundamentals Part1
9/50
9
Class Goals
Understand the .NET Frameworks as an Object Oriented
Strongly Typed Computing Environment
8/10/2019 Dot NET Fundamentals Part1
10/50
10
Class Goals
Work with various .NET Framework components
Common Language Runtime (CLR)
.NET Framework Class Library (FCL)
Assemblies
Strong Names
The Global Assembly Cache (GAC)
Using the GACUTIL
8/10/2019 Dot NET Fundamentals Part1
11/50
11
Class Goals
Introduction to the C# Programming Language
8/10/2019 Dot NET Fundamentals Part1
12/50
12
Course Schedule
Week Topics
1 Introduction to .NET Framework, C#
2 Basic C# Windows Forms Programming
3 Types, Objects, and Classes in .NET4 .NET ADO and XML
5 Exceptions, Intro to ASP.NET, Assemblies
6 Web Services, Final Exam
8/10/2019 Dot NET Fundamentals Part1
13/50
13
Class Dates
Class Dates ( 6, 7, or 8 classes ?)
November 6, 13, 20December 4, 11, 18
November 27, Thanksgiving, no class
Other possible dates: Monday November 24th
Monday December 1st
Monday December 8thor Tuesday December 9th
Monday December 15thor Tuesday December 16th
Or ?
8/10/2019 Dot NET Fundamentals Part1
14/50
14
Effective Learning
First is Doing
Class exercises
Coaching
Helping each other
Homework
Second is Discussing
Class discussions
Asking questions
Sharing ideas and information
Last is Listening
8/10/2019 Dot NET Fundamentals Part1
15/50
15
Learning Environment
Learn somethingWrite some code
Homework Assignments
Write some code
Programming is Fun!
8/10/2019 Dot NET Fundamentals Part1
16/50
16
The only dumb questions
are the ones not asked!
8/10/2019 Dot NET Fundamentals Part1
17/50
17
Time to Address Open Questions
Begin each class with a time for questions
Questions left open from previous classes
Questions emailed to me during the week
Questions triggered by the homework
Or other ???
8/10/2019 Dot NET Fundamentals Part1
18/50
18
Your introductions
Programming background
Operating systems, languages
Any exposure to .NET ? Other courses ?
What do you expect to get out of this course ?
8/10/2019 Dot NET Fundamentals Part1
19/50
19
Please email me the following
Full Name, Nick Name, Student ID # Home Phone / Work Phone
8/10/2019 Dot NET Fundamentals Part1
20/50
20
Email Address (s) [email gives me one]
Your background in computing/programming
Any experience with .NET, other courses, ?
Your objective or goals for this course
Any material you have a special interest in covering?
Any issues or questions that you have?
Additional dates you can attend classes on.
8/10/2019 Dot NET Fundamentals Part1
21/50
21
8/10/2019 Dot NET Fundamentals Part1
22/50
22
What Is the Microsoft .NETFramework?
The Microsoft .NET Framework is animportant new component of the Microsoft
Windows family of operating systems. It isthe foundation of the next generation ofWindows-based applications that are easierto build, deploy, and integrate with other
networked systems.
8/10/2019 Dot NET Fundamentals Part1
23/50
23
The .NET I ni tiative
To create rich applications, businesses must offer a
programmatic interface to their business logic services
[which] must be callable remotely using a networklike the Internet. Simply stated, the .NET initiative is
about connecting information, people and devices
- Jeff Richter
8/10/2019 Dot NET Fundamentals Part1
24/50
8/10/2019 Dot NET Fundamentals Part1
25/50
25
What Is the Microsoft .NETFramework?
The .NET Framework helps softwaredevelopers and systems administrators more
easily build and maintain systems withimprovements toward performance, security,and reliability. Here's how.
8/10/2019 Dot NET Fundamentals Part1
26/50
26
A New Approach to BuildingWindows Software
The .NET Framework simplifies Windowssoftware development. It provides developers
with a single approach to build both desktopapplicationssometimes called smart clientapplicationsand Web-based applications. Italso enables developers to use the same tools
and skills to develop software for a variety ofsystems ranging from handheld smartphonesto large server installations.
8/10/2019 Dot NET Fundamentals Part1
27/50
27
A New Approach to BuildingWindows Software
Software built on the .NET Framework canbe easier to deploy and maintain thanconventional software. Applications can bedesigned to automatically upgradethemselves to the latest version. The .NETFramework can also minimize conflictsbetween applications by helpingincompatible software components coexist.
8/10/2019 Dot NET Fundamentals Part1
28/50
28
Benefits of the .NET Framework
Helps IT professionals better integrateexisting systems with its native support for
Web services. Assists with the deployment of software to
both users and Web servers.
Facilitates the development of software with
improved reliability, scalability,performance, and security.
8/10/2019 Dot NET Fundamentals Part1
29/50
29
Helps developers be moreproductive by:
Making it easier for them to reuse existingcode.
Enabling them to more easily integratecomponents written in any of the more than20 supported programming languages.
Helping them more easily build software for
a wide range of devices using same skillsand tools.
8/10/2019 Dot NET Fundamentals Part1
30/50
30
The Development EnvironmentVisual
Studio.NET
Finally , Visual Studio truly becomes anIntegrated Development Environment, withmulti-language development.
Runs on Windows 2000, NT, XP and the .NETserver family.
Support for building 32 and 64 bit applications
Usual gamut of wizards, debuggers, linkers
Plenty of good documentation
Free .NET Framework SDKcompilers, tools,documentation
8/10/2019 Dot NET Fundamentals Part1
31/50
31
The Development/Runtime platformthe
.NET Framework
The new runtime environment in .NET
Provides a set of base classes for developers to build
on
A unified type system to allow language inter-
operability
This course deals with the fundamentals of
programming this framework
8/10/2019 Dot NET Fundamentals Part1
32/50
32
To summarize, .NET is
An OS platform
The .NET Enterprise Servers.NET building block
services .NET Device Software
The Development Environment VisualStudio.NET
The Development/Runtime platform the .NETFramework
8/10/2019 Dot NET Fundamentals Part1
33/50
33
The .NET F ramework
Think of what device drivers do in terms of
abstracting access by an application
Application
Windows
Scanner
DriverMouse
Driver
8/10/2019 Dot NET Fundamentals Part1
34/50
34
The .NET F ramework
If we abstract the underlying OS in the sameway
Application
.NET Framework
Windows
2000
Windows
XP
FreeBSD
UNIX
8/10/2019 Dot NET Fundamentals Part1
35/50
35
The .NET F ramework
The .NET Framework introduces a layer of
abstraction (and obviously, some overhead) to the OS
as we currently know it. Is this reason enough to move to it ? Lets look at the
state of Windows development without .NET
8/10/2019 Dot NET Fundamentals Part1
36/50
36
The current state of affair s
Win32/C programming Fairly low-level, not object oriented, interoperability
with other languages is hard, memory leaks an issue.
C++/MFC programming
Large language, complex idioms, prone to abuse,interoperability with other languages and other C++
implementations still hard, memory leaks still an issue
Visual Basic programming
Object aware, but not object oriented.
Interop with other languages possible, but ugly.
8/10/2019 Dot NET Fundamentals Part1
37/50
37
The current state of affairs
COM programming
Allows you cross language integration at the binary
level.
Interface based programming encouraged
Fairly complex to understand and set up Deployment is registry based, fairly fragile.
Distributed COM was notoriously hard to set up
because of the security issues involved
A Microsoft-only solution Java programming
Great language, but no cross language integration.
Interpreted byte-code did have performance issues
8/10/2019 Dot NET Fundamentals Part1
38/50
38
The current state of affair s
Into the mix just discussed, throw in JavaScript,ASP, HTML, DHTML
Everything we just talked about has its own
runtime engine/environment, its own set of
libraries and its own set of development tools.
In a highly connected world, our solutions need
to span languages, machines and network
boundaries.
8/10/2019 Dot NET Fundamentals Part1
39/50
39
What the .NET Framework gives us
Consistent programming model A simple OO programming model
Application component isolation
Newer versions can be installed safely Goes a long way in helping improve DLL Hell
Simplified installation model
Xcopy, no registry entries
Uninstalls involve just deleting files/folders
Shared components easier to install than COM
components
8/10/2019 Dot NET Fundamentals Part1
40/50
40
What the .NET Framework gives us
Multi-platform support
The fact that the OS is abstracted away, with codecompiled to an intermediate language makes this
possible
Cross language integration
This is in contrast with COMs cross-languageinteroperation. Types can be used between languages.
This also makes cross language debugging possible.
Automatic memory management
Reduces the incidence of memory leaks . The VisualBasic runtime has done this for sometime, but it is nowavailable to all languages
8/10/2019 Dot NET Fundamentals Part1
41/50
41
What the .NET Framework gives us
Code verifiability
Rich type information gives us the ability to check thatcode is operatingsafely
e.g. Buffer overflows prevented.
Consistent error handling mechanism
Exceptions used instead of error codes andHRESULTS
Exceptions haveto be handledcannot ignore them
Code security
Signing allows the runtime to verify that code has notbeen tampered with.
Code access security associates permissions with code.
8/10/2019 Dot NET Fundamentals Part1
42/50
42
8/10/2019 Dot NET Fundamentals Part1
43/50
43
Basic Components of the .NETFramework
The .NET Framework consists of two mainparts:
common language runtime
.NET Framework class library
8/10/2019 Dot NET Fundamentals Part1
44/50
44
The heart of the Framework
The most important elements of the franeworkare:
The Common Language Runtime (CLR)
The Framework Class Libraries (FCL)
OS Services
Common Language Runtime
Framework Class Library
Data XML Base
WinFormsASP.NET
8/10/2019 Dot NET Fundamentals Part1
45/50
45
Common Language Runtime
Provides the common services for .NETFramework applications.
Programs can be written for the commonlanguage runtime in just about every language,
including C, C++, C#, and Microsoft VisualBasic, as well as some older languages suchas Fortran.
The runtime simplifies programming by
assisting with many mundane tasks of writingcode, including memory managementwhichcan be a big generator of bugssecuritymanagement, and error handling.
ommon anguage un me
8/10/2019 Dot NET Fundamentals Part1
46/50
46
ommon anguage un me(CLR)
Locates, loads and runs code written in runtime-
aware languages. Handles object creation, memory management,
making method calls, enforces code security andprovides a process abstraction.
Code that targets the CLR is called managed code,while code that uses the native OS services directlyis called unmanaged code.
Languages that can produce managed code (or.NET programming languages) C#, VB.NET, VC++ with managed extensions, Fujitsu
COBOL.NET, Jscript.NET, Eiffel, Python, Perl
8/10/2019 Dot NET Fundamentals Part1
47/50
47
Managed Module
A Managed Module is a standard windows portable
executable (PE) file that requires the CLR to execute.
8/10/2019 Dot NET Fundamentals Part1
48/50
48
Managed Code
Code executed and managed by the Microsoft .NETFramework, specifically by the .NET Framework's
common language runtime.
Managed code must supply the information necessaryfor the common language runtime to provide services
such as memory management, cross-language
integration, code access security, and automatic
lifetime control of objects.All code based on Microsoft Intermediate Language
executes as managed code.
8/10/2019 Dot NET Fundamentals Part1
49/50
49
.NET Framework Class Library
The library includes prepackaged sets offunctionality that developers can use to more
rapidly extend the capabilities of their ownsoftware. The library includes three keycomponents:
o ASP.NET to help build Web applications and
Web services. o Windows Forms to facilitate smart client user
interface development.
o ADO.NET to help connect applications to
databases.
8/10/2019 Dot NET Fundamentals Part1
50/50
50
Framework Class Library(FCL)
Provides base class libraries available to all .NETprogramming languages.
Access to primitive types, file I/O, graphicalrendering, crypto, GUI, XML support, etc.
Think of the CLR as abstracting the underlying OS (e.g.
Windows), and the FCL as abstracting the OSlibraries. (e.g. Win32)