UML,OOP,面向对象
productA.html
(a)
(b)
Figure9.Intra-pageModeling
forsimplicity.Everyhyperlinkfromonepagetotheotherisrepresentedbyastatetransitionarrow,thehyperlinkac-tivationistheeventthattriggersthetransition.Ifmulti-plehyperlinksonawebpagepointtothesametarget,theyareconsideredequivalentandonlyonetransitionarrowisneededtorepresentthem.Thehyperlinkscanbeavailablefromallpagesub-states(Figure10a)oronlyavailablefromsomeofthem(Figure10b).Targetofthehyperlinkisal-waysoneofthesub-statesofthetargetwebpage,sothiscanberepresentedbydefaultingtotheselectconnective(Figure10c).Thechangeofstaterepresentsthechangeofdisplayingcurrentwebpagetothetargetwebpageofthehyperlink.
TheXORdecompositionofStatechartplaysanimpor-tantroleheretosimplifythediagram.Webpageshav-inghyperlinksofcommontargetcanbegrouped.Themodelofacommontree-likemenustructureofwebpagesisshowninFigure11atoillustratethis.jp(menu,pos)ofproductA.htmlandproductB.htmlaregroupedtogethertoberepresentedbyonetransitionarrow.
Theselectconnectivecanalsobeusedtogroupallhy-perlinktargetsofapage.In gure11b,menu.jpeventfromstatemenu.htmlisde nedasthedisjunctionofthetwolowerleveleventsjp(productA,pos)andjp(productB,pos)in gure11a.Thisde nitionshouldaccompanythestate-chartsoexpansionbacktoFigure11aispossibleifdesired.4.2.3Frame-based
AwebpagewithframesismodeledastheorthogonalANDofthestateofitsframes(Figure12).Anoptionalstatename,suchasframe1,frame2andframe3inthe gurecanbegiventoeachframe.frame2andframe3,havingtwoormorepossiblesub-states,hasadefaultstatetoindicatethedefaultwebpageloadedinthatframe.ThisisindicatedbythedefaultarrowintheStatechart.Thesub-statescanbeasimplewebpageoranotherframedpage,Navigationfromaframedwebpagetoanotherpagecanbemodeledasthe
Figure10.Inter-pageHyperlinks
Figure11.Inter-pageModeling