posts - 38, comments - 9, trackbacks - 0, articles - 1

参加.Net培训笔记一

Posted on 2005-04-11 12:30 大阿福 阅读(344) 评论(0)  编辑  收藏

.NET:    distributed Service
1. OS
1)Server:
windows.net ->2003
win2000
winNT
2)client:
windows XP
windows 2000 prof
windows 9x
3)application server:
.NET Enterprise Server
exchange server
ISA
SQL server

2. service:
web service (vs.net)
security
transaction
message route

3. client:
any device: pc/pda...

Development:
 VS.NET
.Net framework:  
1)CLR
common language runtime
.net VM -> virtual machine
before .NET:
exe/dll -> bin
.NET:
exe/dll -> IL(intemediate language)

.NET app -> clr -> bin -> exec

a.exe
portable executable header
PE Header -> loading CLR Core code(.dll)

2)base class lib
PB/Delphi/VB/VC...
.NET Class lib:
.NET Framework -> OS

features:
1.  unified programming model
2.  strong execution environment
1)CLR -> exception mangager
runtime exception
2)CLR control process
AppDomain(Application Domain)-> Remoting
isolate .net app
3. simplify Developing and deployment
1)full OO
2)OS interoperbility(API/COM)
3)dll no registry
4)side-by-side execution
DLL HELL -> clsid/prgid
different version components -> resident on the same computer -> executing in the same process!
4. upgrade the scurity model
1)buffer overflow
type checker -> prohibit the invalid type converting.
 -> array index
2)asp.NET -> windows authentication.
3)code level security

assembly:
1)IL module
2)Metadata -> descript the IL.
3)resource file. bmp/exe/dll/script(readonly)

ildasm.exe

Solution -> projects
project -> Assembly/.pdb(debug info)
 .pdb  assert debugcode
1. debug:   y       y            y
2. release: n       n            n

debugcode: assert/condition compile

class lib:
1)namespace: logical structure across the different physics files.
Root -> System.IO/XML/Diagnostics...
System.Xml.Schema
Classes -> .dll

v1.0 -> vs.NET 2002
v1.1 -> vs.NET 2003

Winnt\Assembly
GAC -> Global Assembly Cache

System.dll -> System.IO/System.Net...
System.Xml.dll -> System.Xml...

2)Inherits Chain
System.Object

Comment:
1. // (TODO/UNDONE/HACK)
2. /* */
3. ///

NDOC

1:30 afternoon

OO: object oriented
design pattern ->

1. class <-> object
    code        memory
2. class structure:
Constructor
Destructor
Method -> overloading
Property <-> public field
Field
3. Inherit: code-reuse
single inherit

4. morphism: Inherit chain
1)virtual -> override
2)abstract: hidden virtual
3)interface: hidden virtual

Abstract class  <-> general class
Abstract member
general member     general member   
not allow instance  allow

Interface                    <->   abstract class
without any
implement code                allow implement code
Interface member             abstract member
                   virtual member
multi-interface                   single abstract class

public
private
protected
internal
protected internal


develop  Component:
Component:
1)container: ISite
2)release resource machinism: IDisposable

CLR -> GC(garbage collector)

managed      -> CLR
unmanaged  -> OS

lab:
1. create class, add all OO elements.
2. create derived class, implement morphism.
3. create our own component with the resource releasing machinism.


只有注册用户登录后才能发表评论。


网站导航: