Title: 'Net Framework Introduction
1.Net Framework Introduction
- Hagay Lupesko
- Microsoft consulting student
- Microsoft-Israel
2Agenda
- Introduction to .Net
- CLR - Common Language Runtime.
- WinForms.
- ADO.NET
3Agenda
- Introduction to .Net
- CLR - Common Language Runtime.
- WinForms
- ADO.NET
4Introduction to .NetWhy develop a new platform?
- Inter-Platform communication almost impossible.
- DLL-Hell Deployment and versioning conflicts.
- Security threats.
- Dynamic web programming complicated, slow,
ugly. - Conclusion No adequate platform for network
oriented computing.
5Introduction to .NetThe .Net vision
- Make information available anytime, anywhere.
6Introduction to .Net .Net Main Features
realizing the vision.
- Managed Run Time Environment (CLR) manages
code, memory, security, threading. - Inter-Language development all .Net languages
are compiled to MSIL the .Net assembly. - Strong support for network standards Http, XML,
SOAP, WSDL, and more. - Built in support for Web-Services.
- ASP.NET Easy and efficient development of
dynamic web apps. - WinForms Easy GUI development.
- Surly I left something out
7Agenda
- Introduction to .Net
- CLR - Common Language Runtime.
- WinForms
- ADO.NET
8The CLRCompilation
Assembly
Source code
Compiler
Csc.exe / Vbc.exe / Cl.exe / Vjc.exe
C, C, J, Visual Basic or any .NET language
DLL or EXE
csc /targetlibrary CSClass.cs
9The CLRAssembly
CSClass.DLL
Metadata
IL Managed code
Resources
10The CLRCompilation
Compiling, ILDASM, IL D\Program Files\Microsoft
Visual Studio .NET\FrameworkSDK\Tool Developers
Guide\docs\Partition III CIL.doc
11The CLRComponents
Class Loader
12The CLRThe execution model
Source code
VB
C
C
Unmanaged component
Compiler
Compiler
Compiler
Managed code
Assembly IL code
Assembly IL code
Assembly IL code
Common language runtime
JIT compiler
Native code
Operating system services
13The CLRCompilation
Inter-Lang Inheritance
14The CLRIntermediate Language (IL)
- Object Oriented
- Single inheritance
- Multiple implementation of Interfaces
- Value Types Vs. Reference Types
- Operations performed on Virtual Stack
15The CLRExample
.method private static void Main(string args)
cil managed .entrypoint .maxstack 3
.locals init (int32 V_0, int32 V_1, int32 V_2)
ldarg.0 ldc.i4.0 ldelem.ref call
int32 mscorlibSystem.Int32Parse(string)
ldarg.0 ldc.i4.1 ldelem.ref call
int32 mscorlibSystem.Int32Parse(string)
add call void mscorlibSystem.ConsoleWr
iteLine(int32) ret // end of method
GreeterMain
16The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.0 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) // code
omitted for clarity
args
Virtual Stack
17The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.0 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) // code
omitted for clarity
0
args
Virtual Stack
18The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.0 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) // code
omitted for clarity
23
Virtual Stack
19The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.0 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) // code
omitted for clarity
23
Virtual Stack
20The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.1 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) add
call void mscorlibSystem.ConsoleWriteLin
e(int32) ret
args
23
Virtual Stack
21The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.1 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) add
call void mscorlibSystem.ConsoleWriteLin
e(int32) ret
1
args
23
Virtual Stack
22The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.1 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) add
call void mscorlibSystem.ConsoleWriteLin
e(int32) ret
32
23
Virtual Stack
23The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.1 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) add
call void mscorlibSystem.ConsoleWriteLin
e(int32) ret
32
23
Virtual Stack
24The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.1 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) add
call void mscorlibSystem.ConsoleWriteLin
e(int32) ret
55
Virtual Stack
25The CLRExample
// code omitted for clarity ldarg.0
ldc.i4.1 ldelem.ref call int32
mscorlibSystem.Int32Parse(string) add
call void mscorlibSystem.ConsoleWriteLin
e(int32) ret
Virtual Stack
26The CLROpening MS source code
- Why do that?
- In-depth Understanding of features and classes.
- Improvement of algorithms.
- Debugging VOODOO problems.
- Find bugs.
- Pure fun
27The CLROpening MS source code
- Anakrino Can be found at www.saurik.com
-including source! - Other companies do the same (but for money)
- Its not perfect.
- Maybe you can make it better???
28The CLROpening MS source code
Revealing .Net Base Classes Source code
29Agenda
- Introduction to .Net
- CLR - Common Language Runtime.
- WinForms
- ADO.NET
30WinForms
- What do we gain?
- Simple Event driven programming model
- Rich GUI control classes Over 30
- Fast Easy GUI building
- Simple deployment Just use xcopy
- Programmers can focus on the Programs logic!
31WinForms
Building first WinForm using NotePad
32WinFormsEvent Driven Programming Model
- EventHandler a method that is bound to an event
(button click / mouse over ) - Signaturevoid button1_Click(object sender,
System.EventArgs e) - When the event is fired the methods are
invoked. - Multiple EventHandlers can be dinamically
assigned to an event.
33WinForms
Adding event handling to our WinForm
34WinFormsDeveloping with VisualStudio.NET
Building a diary using VisualStudio .Net
35Agenda
- Introduction to .Net
- CLR - Common Language Runtime.
- WinForms
- ADO.NET
36ADO.NETBasic View
- Main classes
- DataAdapter a proxy to the SQL server
- DataSet mini-db at your fingertips
- DataGrid Allows GUI of the DataSet
37ADO.NETBasic View
DataAdapter
Database
DataSet
TableMappings
38ADO.NETBasic View
Building ADO.NET application
39.Net Framework
Building a rich client using VisualStudio .Net
40(No Transcript)
41(No Transcript)
42(No Transcript)
43(No Transcript)
44(No Transcript)
45(No Transcript)
46(No Transcript)
47(No Transcript)
48(No Transcript)
49(No Transcript)
50(No Transcript)