Lecture 8 - Thursday, October 7 2010.
Material and some slide content from:- Software Architecture: Foundations, Theory, and Practice- Atif Kahn [GWT Content]
Architectures and NFPsReid Holmes
!"#$%!&$'()%"*&+$&,-./01&2$0%
!"#$%!&$-+"3&'%$.&/2&+$(12&+)%""2$0%
!"#$%!&$/1/.4)%$2&)051&2$0%
!"#$%!&$-+"5+/**&+$#+"%&$0%
!"#$%!&$6()01&))$$'"1)(.%/1%$2&)'+06&2$0%
2"'(*&1%/%0"1 01)%/../%0"1 '()%"*&+$#/)$60..&2$7"+
-")%$01)%/../%0"1$)(--"+%
#!/%$%!&$'()%"*&+$+&/..4$1&&2&2
!""#$%&'%(&)""$*+,&-!').“Architectural Impact on
Enterprise Web Application”
[KAHN]
!
First Generation
!"#$%&'(#$) *$)+$)'(#$)
,
,
,$-
,
!./0*1)#2&3 45&5*67)1$
45&5'(#$)
8((9')$:7$3&!"#$%&'%(&')%*&+,-./0
8((9')$326%3$!123$%4&56)7.,0
[KAHN]
!
First Generation
"#$%&'$()*+,
! -.'/0$10.0'$#2%2*&0.%'#)&2'&3%.-0($42-
" .4#$'0,'%)5&,04262-$5(2*&
" *$0)*&2%.'&)$*072&822*0,'%)5&,
! 26$-3&)$*
" #$804$09$3026$-620,'%)5&,:
" 8%)&&2*0)*04)112%2*&0-.*+3.+2,
! 4.&.;)*1$%(.&)$*0,#.%)*+
" #.,0&$07206).0.*02<&2%*.-0%25$,)&$%9
" 4)11)'3-&0&$0'$*&%$-0&%.*,.'&)$*,
[KAHN]
!
First Generation
"#$%&'$()*+,
! ,-'.%)&/
" 012345,-63,'%)7&,3,&)88353*)+#&(5%-39$%356()*,
" ,'%)7&,35%-3-:-'.&-63)*3*5&);-3-*;)%$*(-*&
! ,-%;-%3-:-'.&)$*3-*;)%$*(-*&3),36)%-'&8/3-:7$,-6
! ;.8*-%54)8)&)-,3)*3,-%;-%3'$6-35%-358,$3-:7$,-6
! &#%$.+#7.&
" 53,'%)7&385.*'#-,3537%$'-,,3<3!"#$%&'(
! &)+#&3'$.78)*+
" -5'#3;)-=3),3'$.78-63&$3)&,3'$%%-,7$*6)*+3,'%)7&
[KAHN]
!
Second Generation
!"#$%&'(#$) *$)+$)'(#$)
,)$-$%&.&#/% 011'!/%&.#%$)
2
2
0
0
2$3
2
011'*$)+$)
*$)+"$&
*$)+#4$-
056!
5.&.*/7)4$
5.&.'(#$)
8((,')$-9/%-$!"#$%&'()*+,-./
[KAHN]
!
Second Generation
"#$%&'$()*+,
! ,-%.-%/0$'1,-2
" ($,&/)(3%$.-(-*&,/4%-/%-45)6-2/$*/&#-/,-%.-%/,)2-
! '5)-*&/&)-%
" ,&)55/74,-2/$*/3%)()&).-,
! 89:;</=4.4,'%)3&</>""/-&'?
" !"#$%&!'()*
! %-@1-,&A%-,3$*,-/'B'5-
" C$%,-/*/0)%,&/+-*-%4&)$*/DDD
[KAHN]
!
GWT
"#$%&'%(%)*+%,*-.%+/(0%+/(+
! (%1(-(2&3,%'/&4+%(5(6%4-*,
" 5.7%(11)&8(+&*0%79&)2&03%7)*8:'
" '608/-*0*9'%8*,,90&8(+&*0
! 79&)+%*0%'+(02(-2'
" &0+.3-(+.'%5.))
! 5&+/%.;&'+&03%'.-<.-%(11)&8(+&*0'=%5.7%'.-<&8.'
" 8*,1*'&+.%79&)2&03%7)*8:'
! >$?@=%A(<('8-&1+%.+8%(-.%)*5B).<.)%1-&,&+&<.'
! '.1(-(+&*0%*4%8*08.-0'
[KAHN]
!
GWT Components
!"##$%&'()*
!'+',!-.)$/0&1*
!-23
"4.
567-1*+&1(8#9(
"4.$':';1*
<0=;1(>
?@AB!-C2
0DE2
F*)<>1*3:(1;*'(0):
.)*1 F*)<>1*8"%:(0$18#:+0*):$1:(
[KAHN]
!"
Java-JS Compiler
#$%&'()*+,-&-+)$+,-&-*.(/0)
! *(.1)$1*(.+.$20/3'(
! 4/54+3'&'3+)60'7+3-%58-5'+)$+-+*.(/0)+3-%58-5'+
" !"#$%&'($%)*+#%$#,$#---
! ,9+.$7'+$0)/2/:-)/$%
" ;($<*'(+'%5/%'*
" */:'
" *'.8(/)6+=+$;>8*.-)/$%
" 3$.-3/:-)/$%
[KAHN]
!!
JRE Emulator
"#$%&'()
! *+,(-.&/&-*%&))()-01-.&/&)*,02'
3+#2+)0'(-4$0%5016-4%+*7)
! &%%+8)-9+,-4$0%5016-*+#2+)0'(-4$0%5016-4%+*7)
! *%0(1'-'0(,-4$0%'-+1
" *+#2+)0'(-4$0%5016-4%+*7)-
! ,&':(,-':&1-%+8-%(/(%-2,0#0'0/()
[KAHN]
!"
JSNI
#$%$&'()*+,&-$,*%.&/0,.)1$(.
! 2)$++.)
" 13)&#$%$4()*+,&*04*5.&#$%$&(35.
! .6,.04*30&+3*0,
" 13)&*0,.7)$,*30&2*,8&030&9:;&(<*.0,&(3=+30.0,4
[KAHN]
!"
RPC
#$%&'$()*&+$,-*$(./00
! *$10/+$2(344)(
" 5&*(+&%%-67+/'7&6(/5'$*(/11(8&&'
! /296+:*&6&-2(;(!"#$
" 8*$/<2(':$(*$=-$2'>*$21&62$(+9+0$
! 2-11&*'2(?/*7&-2(1*&'&+&02
" @A/BC(DEFGC(HI4
!"#$%!"#$%&"'(
!"#$%!"#)*'(
!"#)*'(
!"#$%&"'(
&'()
*+
*,
*-
*.
[KAHN]
!"
Servlet Extension
#$%&'()*'+*,+-##+.&/01&%
! )'%&2/3%)*'+4)%5+*16&/+-##+3771)83%)*'
" 2&%+311+%5&+-##+9&'&,)%(+,*/+,/&&
! (&/0&/+8*:7*'&'%
" ,3836&+,*/+9;()'&((+,;'8%)*'31)%<
! &0*1;%)*'
" 5)251<+,1&$)91&
[KAHN]
!"
GWT Components
!"##$%&'()*
!'+',!-.)$/0&1*
!-23
"4.
567-1*+&1(8#9(
"4.$':';1*
<0=;1(>
?@AB!-C2
0DE2
F*)<>1*3:(1;*'(0):
.)*1 F*)<>1*8"%:(0$18#:+0*):$1:(
[KAHN]
!"
Impact
#$%&%'(&()*
+,-.%'(&()*
/0),123,1%'(&()*
4,.(506'*6$20)1%$)
782&-)(20
9%8%6'%.,:6:,8,&23;,0)
[KAHN]
!"
Scalability
#$%&'()$)*+,-*,.)&()&,%)&/'&$0*1)
! 2*)0&3,.+0+)4)..,.)&()&.
" 14-)*+,+-)&,1'$%'*)*+.,+&546,&).-7),-*,14-)*+,+-)&
" %&)(-'5.46
! +8),.+0+),90.,$0-*+0-*)7,'*,+8),%&).)*+0+-'*,+-)&
! +8),(-)9,90.,&)*7)&)7,'*,+8),14-)*+,+-)&
! '%+-$-:)7,1'$$5*-10+-'*,.+&0+);6
" (-0,0;;&);0+-'*,'/,1'*+&'4<70+0,)=180*;)
" 7)1&)0.),-*,.)&()&,4'07
" >)++)&,>0*79-7+8,5.0;)
[KAHN]
!"
Reusability
#$$%&'()&*+
! ,&+-%./'*0./1(,./)*/,2$$*3)
" 42%)&$%./13*5,.3/.+-&+.,
" &+).3+()&*+(%&6()&*+
! &!"7/8.3,&*+,/*9/):./($$%&'()&*+,
! ($$%&'()&*+/13*;.+/*8.3/3.2,(1%./4*02%.,
<.,&-+/=/0.8.%*$4.+)
! >><
" !"#$%&'(')*$+%,-%!'%.'$%)/-0%1123
[KAHN]
!"
Interoperability
#$%&'()%*+$,-,./%&$0*+$,1+*$%0
! 2)3)04(*1%,$)%*3&,*$%&(5)4&,6278#9
" ),:);&(,+5,)<0%()4%*+$,5+(,*$%&'()%*$',2)3)04(*1%
! %=*(>,1)(%;,?,:&')4;,2)3)04(*1%,:*<()(*&0
! 0&(3&(,0*>&,*$%&'()%*+$
" 0&(3:&%,&/%&$0*+$
! 1:@'0,*$%+,%=&,2..,1:)%5+(A
! ):0+,1+00*<:&,5+(,+%=&(,1:)%5+(A0
" A)0=@10
! @0&,+5,>*3&(0&,B&<,0&(3*4&0
[KAHN]
!"
Design by Contract
#$%&'()(%&*)+(,'-,*-%.,(%/'
! 0*/1+&*)*2'(%3&)&'4%*/'3&'()56789
" :$%&'():/-&);,+)(/),0%-&)0<)(;&)678)%'(&*=,:&
" +,3&)&';,':&3&'()(;,()>88)0*/2?;()(/)+&*4&*)(%&*
" !"#$%&%'(%&"%)*#+&,*-./!#+&01%211#&345&(#6&(#&(../!,(%!*#&,/!1#%&,*617
! @*&+&*4&+)(;&),*:;%(&:(2*,$)%'(&?*%(<
[KAHN]
!"
Evolution
#$%&'()*%$+,-.
! ##/*0*##1
" !"#$%&'()%$"*)%+,-%,).
" ##*2&3&4)$(5-
6().*7'-8$'8-*/559()&-(+'4*:67/;
! <=>?*0*<==@*&4*-.8*A&4()*AB(9C('%*5$(D(-(38
! 5$83&(94*,.8$8*+-.8$4*E&(98C
" 2&3&*&5598-F*/)-(38GF*/C+A8*E98H
[KAHN]
!!
Java based Development
"#$%&'()*)"++,$
! -#,,)#$%./,&$0#1)23.4#-+35$)2+3
" %#$%&'()*)63+2&,&'(
! !"#$%#&"&'(%#$)*+,$%"#
! -#,,)$766+3%#1)%++,$
" 89:$;)63+2&,#3$)#%<=
! $5&,,$>$#%)$%.'1.31&?.%&+'
" 1#@#,+64#'%)%#.4$
[KAHN]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
iRoadTrip: statechart
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
iRoadTrip: New trip
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
iRoadTrip: Location update
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
Activity‣ Describe one of your designs to another team.
‣ Clearly explain your rationale for the design you have chosen to present.
‣ Note any details that are ambiguous.
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
NFPs‣ NFPs are constraints on the manner in which the
system implements and delivers its functionality.
‣ E.g.,
‣ Efficiency
‣ Complexity
‣ Scalability
‣ Heterogeneity
‣ Adaptability
‣ Security
‣ Dependability
[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
FP vs NFP‣ Products are sold based on their FPs.
‣ e.g., Cell phone, Car, Tent.
‣ However, NFPs play a critical role in perception.
‣ “This program keeps crashing”
‣ “It doesn’t work with my [...]”
‣ “It’s too slow”
[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
Design guidelines for NFPs‣ Provide guidelines that support various NFPs.
‣ Focus on architectural level:
‣ Components
‣ Connectors
‣ Topologies
[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
NFP: Efficiency‣ Efficiency is a quality that reflects a system’s
ability to meet its performance requirements.
‣ Components:‣ ?‣ Simple and compact interfaces.‣ Allow multiple interfaces to the same functionality.‣ Separate data from processing components.‣ ?
‣ Connectors:‣ Carefully select connectors.‣ Be careful of broadcast connectors.‣ ?‣ Be wary of location/distribution transparency.
‣ Topology:‣ ?‣ Consider the efficiency impact of selected styles.
[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
Multiple Interfaces[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
Distribution transparency[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
Topological distance[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
NFP: Complexity‣ Complexity is a property that is proportional to the
size of a system, its volume of constituent elements, their internal structure, and their interdependencies.
‣ Components:‣ ?‣ Isolate functionality from interaction.‣ ?‣ Insulate processing from data format changes.
‣ Connectors:‣ Isolate interaction from functionality.‣ Restrict interactions provided by each connector.
‣ Topology:‣ ?‣ Use hierarchical (de)composition.
[TAILOR ET AL.]
REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE
Connector complexity[TAILOR ET AL.]