Introduction to WCF

Document Sample
scope of work template
							                                        Introduction to
Windows Communication Foundation


                                      Suthep Sangvirotjanaphat
                      Microsoft Most Valuable Professional (MVP)(MVP)
                              G reatF riend s. B iz I nstructor



                                                          Introduction to WCF   1




                                                         Agenda
Windows Communication
F oundation ( WCF ) – Indigo

                W h y ?

                W h a t?

                H ow ?



Introduction to WCF                                               2




               W h y WCF? – t h e p r o b l em
     B e c a u s e s of t w a r e is inv a r ia b l y
      int e r c onne c t e d,
     … bu t bu i l d i n g
     co n n e ct e d s y s t e m s i s hard !

1. C o n f u s i n g n u m b e r o f i n c o m p l e t e t o o l s
2 . E n d u rin g te c h n ic a l im p e d im e n ts
       a)      A r c h i t e c t u r al m i s m at c h
       b )      S e c u r it y
        c )      R e l i ab i l i t y
         d )      C o n s is t e n c y
3 . D e v e lo p e rs a re o v e rw h e lm e d
 4 . A c c e le ra te d d e m a n d fo r n e w fu n c tio n a lity
  5 . S o ftw a re In e rtia
Introduction to WCF                                               3




                                                                                    1
                                      As w e gr o w …

                                                                           Volume of Software
                                                                               I n c reas es




                                                                               A b i li ty to A d ap t
                                                                                   D ec reas es




                                                           Time

Introduction to WCF                                            4




               W h y WCF? – t h e s o l u t i o n
     B e c a u s e s of t w a r e is inv a r ia b l y
      int e r c onne c t e d,
     … s o bu i l d i n g
     co n n e ct e d s y s t e m s s h o u l d be s i m p l i f i e d :

1. O n e t o o l ,
2 . fo r a ll s c e n a rio s ,
        a) f r o m c o n n e c t i n g c o m p o n e n t s . . .
        b ) t o i n t e g r at i n g ap p l i c at i o n s .
3 . S e c u re , re lia b le , tra n s a c te d e x c h a n g e s ,
 4 . a c ro s s p la tfo rm s ,
  5 . w ith a ll th e th ro u g h p u t y o u n e e d .

Introduction to WCF                                            5




                                     W h at i s W C F ?
     C l a s s e s a dde d
      t o t h e . N E T F r a m e w or k 2 . 0
       …f o r b u ild in g s o f t w a r e s e r v ic e s :

i .e . s o f t w a r e d e s i g n e d f o r i n t e r a c t i o n o v e r
 a n e tw o rk w ith a n in te r fa c e d e s c rib e d in W S D L .

W S D L is a s im p o rta n t to s o ftw a re a s m o n e y is
 to th e e c o n o m y : it m a k e s in te ra c tio n s e ffic ie n t.

T h e I n d i g o p r o g r am m i n g m o d e l f o l l o w s W S D L c l o s e l y .



Introduction to WCF                                            6




                                                                                                         2
                            W h at i s W C F ?

“A u n i f i e d p r o g r a m m i n g m o d e l

a n d ru n tim e e n v iro n m e n t

fo r r a p id ly b u ild in g

s e c u r e , r e lia b le s o ftw a re s e r v ic e s

w i t h m a n a g e d c o d e .”

Introduction to WCF                        7




                          H o w do y o u b u i l d
                        s er v i c es w i t h W C F ?

                              W S D L
                            S e ct i o n


  a .       W h e r e ?      s erv i c e

  b .         H o w ?       b in d in g

  c .        W h at ?       portType


Introduction to WCF                        8




                          H o w do y o u b u i l d
                        s er v i c es w i t h W C F ?

                              W S D L             W C F
                            S e ct i o n         T e r m


  a .       W h e r e ?      s erv i c e       ad d res s

  b .         H o w ?       b in d in g        bi n d i n g

  c .        W h at ?       portType           con tra c t


Introduction to WCF                        9




                                                              3
                                   WCF
                     D e m ons tra tion



   Introduction to WCF                                             10




                  T h e Ar c h i t ec t u r e o f W C F

                   CLR Type             Transaction                                Security              TCP
                  Integration            Behavior                                  Channel            Transport


Service
 C o d e
                   CLR Type             Transaction          Instancing            Security          TCP
                  Integration            Behavior             Behavior             Channel        Transport




                             Service Model Layer                                   Messaging Layer


                           Influences and adds to                                Moves messages back
                               the programming                                    and forth and adds
                                model based on                                    transfer semantics
                             incoming messages                                        (channels)
   Introduction to WCF                                             11




            B enef i t s o f t h e Ar c h i t ec t u r e
        C om p os a b il it y
        M odif y ing t h e s e r v ic e
         inde p e nde nt l y of it s m e s s a ging
        E x t e ns ib il it y
        O n e p r o g r am m i n g m o d e l s cal i n g acr o s s
         al l d i s t r i bu t e d s o f t w ar e s ce n ar i o s
               5 % t o 10% f a            s te r th a n       ASMX
                2 0% t o 2 00%              fa s te r th     a n .N E T R e m o t in g
                 2 0% f a s t e r t h   a n E n t e r       p r i s e Se r v i c e s f o r
                  la rg e m e s s a g    e s (c u rre      n tly s lo w e r fo r s m a ll o n e s )

   Introduction to WCF                                             12




                                                                                                                  4
     W C F P r o t ec t s Y o u r I nv es t m ent



             ASMX                                                            .NET
                                                                           Remoting
          Interop                                                         Extensibility
         with other                                                         Location
         platforms                                                       transparency


               Attribute-
               Attribute-                                             Message-
                                                                      Message-
                Based                                                  Oriented
                                               WS-
                                               WS-*
             Programming                                             Programming
                                              Protocol
               Enterprise                     Support              System.Messaging
                Services
                                                WSE


Introduction to WCF                                 13




                             Is W C F fo r y o u ?
     W h at i s y o u r i n v e s t m e n t i n n e w
      ap p l i cat i o n s r e l at i v e t o co n n e ct i n g
      e x is t in g o n e s ?
     W h at i s t h e co s t o f i n t e g r at i n g i n t o
     cu s t o m e r s ’ e n v i r o n m e n t s ?
     H o w m an y d e al s d o y o u l o s e
      o n p l at f o r m ?
     H o w     w o u l d o t h e r s y s t e m s e n h an ce y o u r s
     i f o n l y y o u co n n e ct t o t h e m ?

Introduction to WCF                             14




                       S t ages o f Ado p t i o n
                      o f S o f t w ar e S er v i c es

                                O rg aniz atio n is o ne
                             S erv ic e in a V al u e C h ain

                            O rg aniz atio n b ec o mes a
                                      S erv ic e


                        O rg aniz atio n A d o pts


                  Department Experiments


Introduction to WCF                                 15




                                                                                          5
                                                        S u m m ar y
          W e a re                a lw a y s b u             ild in g
           c onne c             t e ds y s t e            m s .
            T h a t ’s t       o u g h to d                o .
             W C F is            d e s ig n e d             t o m a k e it e a s y :
                    O n e s i m pl e prog ra m m i n g tool
                     f or a n y s c en a ri o




Introduction to WCF                                                      16




N e e d f ul l -l e ng th . N E T / O O A D cour se s?

Int e r e s t ing m or e f or y ou r t e a m ?
  T h       e m       o s t v a lu a    b le re s o u rc e fo r c o m p a n y a re k n o w le d g e w o rk e r s .
   T h       e m       o s t v a lu a    b le in v e s tm e n t is in v e s tm e n t in e d u c a tio n .
    L e    a rn       .N E T t e c h      n o l o g i e s f r o m Mi c r o s o f t Mo s t V a l u a b l e P r o f e s s i o n a l
     (M       V P   ) a t C AT T           o w e r Si -p r a y a o n S a t u r d a y a n d S u n d a y .
     In    -h o      u s e T r a in        in g a t y o u r s ite o n w o rk in g d a y s a ls o a v a ila b le .



H ow                t o C ont a c t ?
  V is it o u r W e b s ite a t h t t p :/ / G r e a t F r ie n d s .B iz
   P h o n e : 0-2 9 7 4 -9 2 8 0 F a x : 0-2 9 7 4 -8 6 00
    Mo b i l e : 0-9 9 6 7 -2 2 00 ( k h u n P h a n n i )

Introduction to WCF                                                      17




  . N E T T r ai ni ng b y M i c r o s o f t M V P

Cour se L ists (Seats sti l l av ai l ab l e! )
  P r o          g r am m i n g V i s u al B as i c 2                            0 0 5 (B e g in n e r s       le v e l)
   V is        u al B as i c 2 0 0 5 f o r B u s i n e                          s s ( I n t e r m e d i at e    le v e l)
    P r o         f e s s i o n al V i s u al B as i c 2 0                    0 5 ( A d v an c e d l e         v e l)
     O O        A D an d D e s i g n P at t e r n s                            w it h U M L

H ow                t o R e gis t e r
  S e e m o re d               e ta ile       d in fo rm a tio n a b o u t e a c h c o u r s e s
   a t h t t p :/ / G           r e a t F    r ie n d s .B iz
    E a s y o n lin e            re g is     tra tio n to re s e rv e lim ite d s e a ts in e a c h
     c la s s a t h t t       p :/ / G      r e a t F r ie n d s .B iz / C o u r s e s / R e g is t e r .a s p

Introduction to WCF                                                      18




                                                                                                                                    6