Introduction à la plateforme
.Net
Qu’est ce qu’une plateforme?
! ! " # $ " " $ ! " % ""& ' (" " '( " ) * + " " " " , " " " $ " " * - $La plateforme .Net : Introduction
.
/
"
01
*
!
"
2
*
3
"
*
!
4
0
'
# (
"
/
"
5$
'
. # $ * 6 7 8 * $ 9:/ . " # * 8 " ! * " "La plateforme .Net : Architecture
. " $ "; $ " ' ( * ( 5 & ! ' 0 ; * $ $ 8 * $ * " 6 </. '=
Le Framework .Net
. $ * " $ 3 3' " 5 & $ ' + . > 7 ? 01 9$ $ ! * @A0%@* A 0 * ) #* . > 7 ? $ " "; ! 5 & $ ' . > 7 ? 01 / " * 6 7Le Framework .Net
. > 7 ? 01 " * + * $ ' " $ " * " 7 ( , 01% " ) * $ ' " $ " ; ! ( 6 > ;&! " ( > 7 ? 9 . 5%>9.) ! $ * " ( " , 01 6 > $ ' " ( 9.A%9 . A ) " "; * @* ! " " " $ " ( /,4.%/ " 4 . )Architecture de développement
.Net
' (/ " "; " * ! $ " > 7 ? 9 "; " " " " 9.,%9 . , " " ) ! $ ! * 9 " + / " + D (9EE (@F(9F @," + ( .(9 (0 (> (G ? ( / " 5(: (: #" * 9 (:H( " ( ( 5; (,"; (, 1 ?I
Architecture de développement
.Net
D , * $ ' %8 * ') " $ " " " " " &Le moteur d’exécution CLR
. 9.A > 7 ? 01 9$ $ ' " " 4 $ ! * @* "; * @D/ . 9.A * 3' " " ! " " $ ' " ( 9.A "; $ * $ ' " " + ( $ ( '" ( " * " /,4. " " " "KJJ
Le moteur d’exécution CLR
1 " 8 L ' " 9.A %" ) " " ! * (! " ! $ " 9.A( " " " 91,%9 15 ,5 ) . 91, " " ! " " 5 %" ( " ( " ( ( " ) * L " ( ( ! $ " 9.ALe moteur d’exécution CLR
. 5 " 91, '" 5 + . 5 * + " " . " 5 * " . 5 * " * 5 ( 5 $ . 5 " + "? " 8 $ * ( 4 5 ( " (" ( % 5 8 ; " " )( 5 * M % 5 * " * 5 " )J
Le moteur d’exécution CLR
La bibliothèque de classes
. ;&! " " " > 7 ? 01 9$ " " " & # ( 5 0 " * * "; N $ " . ;&! " $ ""& ' " #" 5 & $ ' ;&! " % 9 . 5 9.) . ;&! " " ; "; 9; ! " " 5 ( " " " ( ! "J=
La bibliothèque de classes
Processus de compilation et
d’exécution
. " " " /,4. %/ " 4 . ) * ' " ( /,4. " * " " @41%@ 4 1 " " 8 * )J
Le code intermédiaire MSIL
/,4. $ " 9 ! L " * " /,4." " + "; ( "? ( ( * ! ; $ # ( " ; ! ! ( " O '( $ ""& " 8 ( '" ! $ 0' %; 7 /,4.)+ 5; PQ 5 ' " PQ ; " " * % ) P 5 ' "?J RG 6 R " * S " T,5 9 + +6 . %" ,5 , ) Q
Le code intermédiaire MSIL
. 9.A " @41 "; ! "; " ! 3 ( L " /,4. L @41" ' " 3 ! "; " . " @41 " ! " * # L * ! $ ' " "? " ! 3 "" . ; ! @41" ( ""& " " ! " 9 " " ! @41" ' " "JI
Interopérabilité entre langages .Net
* '( * " " " 9.,%9 . , " " ) . 9., & ! " % " ) 5 ! * " " ' 9 & 3 ! ' 5 ' % ! )("3 8 ' 5 ! * 8 3' 4 " ' ! $ " 9F ; $ " D 01 A ! + 9., 91,
Les assemblages : introduction
1 " % ' ) " " ! L 9 " " % 5) " " 5 " ! ! " ;5 ! ( + " " "; ;5 ! " " $ " % ' ) * % 8 $ ) 9$ $ ! ! 8 ' 8 $ ' ! "" ! $8 $ $ " " " 8 $J
Les assemblages : types
L
!
5
! +
. ! * " 5 > 7 ?% " " ) ! " % "; (# ( ( " ) 4 "? ! "; 0% 0' " ) . 5 ! ' " " ! ! $ & ' "Les assemblages : remarques
" 06 7 0 + "; 06 7 ' " 5 & 3' ( ! ! $ "; 0 9.A > 7 ? 0 " " 6 7 N" 9:>>%9 : #" > > ) 5 & 3' 6 7 9 " ' "; + "; 8 ( 3 L " * " ' ! / " "; " 9:>> 3"" 0 (/ " " " * '"; 5 & " %IC( (/ < )Les assemblages : composition
!
"
!
+
$
!
"
$
/
5
"
/,4
.!
5
"
=
Les assemblages : composition
9
*
L
";
;5
!
4
*
L
"
";
9
";
*
L
+
" " % )( " %" "; # )( " $ 5 "; ! ! $ "Les assemblages : composition
+ . "; ! "
"; ;5 ! 4
Les assemblages : Manifest
/ " " ! " * " ! " ' 9; ! ( ! 5 ! ( $ " . $ " " * $ ( " ( ! * " 8 " " . $ L "? "; % ' ) ' " % 0) * " " /,4. "; 0! "I
Les assemblages : Manifest
.
"
$
/
*
+
U "; " $ - " " ' 5 $ 8 " "; ' "; ! " " U $ ! & > * " " $ > " $Metadata : introduction
V " " /,4.( / " " " / " "; ! 5 " % ( " ( " ) . " /,4. L "; % $ ) " 3 " . 9.A " ' "; * 3' "J
Metadata : définition
/
"
"
"
"?
";
0
/
"
5
'
"
5
'
(
$
"
"
&
"
(
(
;
(
&
;
(
"
*
!
*
"; !
Metadata : structure
/
"?
*
+
"
$
4 % (* (" (" ! ) . 5 ! ' ' . ( $ " . " L ' "Metadata : structure
"
5
(* (" " / % ; ("; ( ( * ( 5 ! ) " ! 5Metadata : structure
/
;
";
!
"
"
! "
4
*
"
"
"
N"
+
" " ( * L " 5 ; "; !=
Metadata : avantages
/
5
4 .
%4
"
.
)
'
"
$
;&!
'
/
'
$
"
!
$
2
'
(
'
8
*
$
$
Étude de cas
Soit le programme suivant qui affiche « hello world ».
using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program {
static void Main(string[] args)
{
Console.WriteLine("Hello world"); }
} }
Étude de cas
& "
"
";
' "
ConsoleApplication1.exe
.
Ce fichier est donc un assemblage.
4
.
, W
!
$ '
"
$
D 5
"
"
I
J