文本軟件工程10swarch_第1頁
文本軟件工程10swarch_第2頁
文本軟件工程10swarch_第3頁
文本軟件工程10swarch_第4頁
文本軟件工程10swarch_第5頁
已閱讀5頁,還剩37頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、ESEEinfhrung in Software Engineering10. Software ArchitectureProf. O. Nierstrasz Oscar NierstraszESE Software ArchitectureESE 10.2NoImageRoadmapWhat is Software Architecture?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for architectures Oscar Nier

2、straszESE Software ArchitectureESE 10.3SourcesSoftware Engineering, I. Sommerville, 7th Edn., 2004.Objects, Components and Frameworks with UML, D. DSouza, A. Wills, Addison-Wesley, 1999Pattern-Oriented Software Architecture A System of Patterns, F. Buschmann, et al., John Wiley, 1996Software Archite

3、cture: Perspectives on an Emerging Discipline, M. Shaw, D. Garlan, Prentice-Hall, 1996 Oscar NierstraszESE Software ArchitectureESE 10.4NoImageRoadmapWhat is Software Architecture?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for architectures Osca

4、r NierstraszESE Software ArchitectureESE 10.5What is Software Architecture?A neat-looking drawing of some boxes, circles, and lines, laid out nicely in Powerpoint or Word, does not constitute an architecture. DSouza & Wills Oscar NierstraszESE Software ArchitectureESE 10.6What is Software Archit

5、ecture?The architecture of a system consists of:the structure(s) of its parts including design-time, test-time, and run-time hardware and software partsthe externally visible properties of those partsmodules with interfaces, hardware units, objects the relationships and constraints between themin ot

6、her words:The set of design decisions about any system (or subsystem) that keeps its implementors and maintainers from exercising “needless creativity”. Oscar NierstraszESE Software ArchitectureESE 10.7How Architecture Drives ImplementationUse a 3-tier client-server architecture: all business logic

7、must be in the middle tier, presentation and dialogue on the client, and data services on the server; that way you can scale the application server processing independently of persistent store.Use Corba for all distribution, using Corba event channels for notification and the Corba relationship serv

8、ice; do not use the Corba messaging service as it is not yet mature. Oscar NierstraszESE Software ArchitectureESE 10.8How Architecture Drives Implementation .Use Collection Galores collections for representing any collections; by default use their List class, or document your reason otherwise.Use Mo

9、del-View-Controller with an explicit ApplicationModel object to connect any UI to the business logic and objects. Oscar NierstraszESE Software ArchitectureESE 10.9Sub-systems, Modules and ComponentsA sub-system is a system in its own right whose operation is independent of the services provided by o

10、ther sub-systems.A module is a system component that provides services to other components but would not normally be considered as a separate system.A component is an independently deliverable unit of software that encapsulates its design and implementation and offers interfaces to the out-side, by

11、which it may be composed with other components to form a larger whole. Oscar NierstraszESE Software ArchitectureESE 10.10NoImageRoadmapWhat is Software Architecture?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for architectures Oscar NierstraszESE

12、 Software ArchitectureESE 10.11CohesionCohesion is a measure of how well the parts of a component “belong together”.Cohesion is weak if elements are bundled simply because they perform similar or related functions (e.g., java.lang.Math).Cohesion is strong if all parts are needed for the functioning

13、of other parts (e.g. java.lang.String).Strong cohesion promotes maintainability and adaptability by limiting the scope of changes to small numbers of components.There are many definitions and interpretations of cohesion.Most attempts to formally define it are inadequate! Oscar NierstraszESE Software

14、 ArchitectureESE 10.12CouplingCoupling is a measure of the strength of the interconnections between system components.Coupling is tight between components if they depend heavily on one another, (e.g., there is a lot of communication between them).Coupling is loose if there are few dependencies betwe

15、en components.Loose coupling promotes maintainability and adaptability since changes in one component are less likely to affect others. Oscar NierstraszESE Software ArchitectureESE 10.13Tight CouplingNoImage Ian Sommerville 2000 Oscar NierstraszESE Software ArchitectureESE 10.14Loose CouplingNoImage

16、 Ian Sommerville 2000 Oscar NierstraszESE Software ArchitectureESE 10.15NoImageRoadmapWhat is Software Architecture?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for architectures Oscar NierstraszESE Software ArchitectureESE 10.16Architectural Para

17、llelsArchitects are the technical interface between the customer and the contractor building the systemA bad architectural design for a building cannot be rescued by good construction the same is true for softwareThere are specialized types of building and software architectsThere are schools or sty

18、les of building and software architecture Oscar NierstraszESE Software ArchitectureESE 10.17Architectural StylesAn architectural style defines a family of systems in terms of a pattern of structural organization. More specifically, an architectural style defines a vocabulary of components and connec

19、tor types, and a set of constraints on how they can be combined. Shaw and Garlan Oscar NierstraszESE Software ArchitectureESE 10.18NoImageRoadmapWhat is Software Architecture?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for architectures Oscar Nie

20、rstraszESE Software ArchitectureESE 10.19Layered ArchitecturesA layered architecture organises a system into a set of layers each of which provide a set of services to the layer “above”.Normally layers are constrained so elements only seeother elements in the same layer, orelements of the layer belo

21、wCallbacks may be used to communicate to higher layersSupports the incremental development of sub-systems in different layers. When a layer interface changes, only the adjacent layer is affected Oscar NierstraszESE Software ArchitectureESE 10.20Version management systemNoImage Ian Sommerville 2000 O

22、scar NierstraszESE Software ArchitectureESE 10.21OSI reference modelNoImage Ian Sommerville 2000 Oscar NierstraszESE Software ArchitectureESE 10.22NoImageRoadmapWhat is Software Architecture?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for archite

23、ctures Oscar NierstraszESE Software ArchitectureESE 10.23Client-Server ArchitecturesA client-server architecture distributes application logic and services respectively to a number of client and server sub-systems, each potentially running on a different machine and communicating through the network

24、 (e.g, by RPC).AdvantagesDistribution of data is straightforwardMakes effective use of networked systems. May require cheaper hardwareEasy to add new servers or upgrade existing serversDisadvantagesNo shared data model so sub-systems use different data organisation. Data interchange may be inefficie

25、ntRedundant management in each serverMay require a central registry of names and services it may be hard to find out what servers and services are available Oscar NierstraszESE Software ArchitectureESE 10.24Film and picture libraryNoImage Ian Sommerville 2000 Oscar NierstraszESE Software Architectur

26、eESE 10.25Four-Tier Architectures DSouza, Wills, 1999 Oscar NierstraszESE Software ArchitectureESE 10.26NoImageRoadmapWhat is Software Architecture?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for architectures Oscar NierstraszESE Software Archite

27、ctureESE 10.27Blackboard ArchitecturesA blackboard architecture distributes application logic to a number of independent sub-systems, but manages all data in a single, shared repository (or “blackboard”).AdvantagesEfficient way to share large amounts of dataSub-systems need not be concerned with how

28、 data is produced, backed up etc.Sharing model is published as the repository schemaDisadvantagesSub-systems must agree on a repository data modelData evolution is difficult and expensiveNo scope for specific management policiesDifficult to distribute efficiently Oscar NierstraszESE Software Archite

29、ctureESE 10.28CASE toolset architectureNoImage Ian Sommerville 2000 Oscar NierstraszESE Software ArchitectureESE 10.29Event-driven SystemsIn an event-driven architecture components perform services in reaction to external events generated by other components.In broadcast models an event is broadcast

30、 to all sub-systems. Any sub-system which can handle the event may do so.In interrupt-driven models real-time interrupts are detected by an interrupt handler and passed to some other component for processing. Oscar NierstraszESE Software ArchitectureESE 10.30Broadcast modelEffective in integrating s

31、ub-systems on different computers in a networkCan be implemented using a publisher-subscriber pattern:Sub-systems register an interest in specific eventsWhen these occur, control is transferred to the subscribed sub-systemsControl policy is not embedded in the event and message handler. Sub-systems

32、decide on events of interest to themHowever, sub-systems dont know if or when an event will be handled Oscar NierstraszESE Software ArchitectureESE 10.31Selective BroadcastingNoImage Ian Sommerville 2000 Oscar NierstraszESE Software ArchitectureESE 10.32Dataflow ModelsIn a dataflow architecture each

33、 component performs functional transformations on its inputs to produce outputs.Highly effective for reducing latency in parallel or distributed systemsNo call/reply overheadBut, fast processes must wait for slower onesNot really suitable for interactive systemsDataflows should be free of cycles Osc

34、ar NierstraszESE Software ArchitectureESE 10.33Pipes and FiltersDomainData sourceFilterData sinkUnixtar cf - . gzip -9 rsh picasso ddCGIHTML FormCGI Scriptgenerated HTML page Oscar NierstraszESE Software ArchitectureESE 10.34Invoice Processing SystemNoImage Ian Sommerville 2000 Oscar NierstraszESE S

35、oftware ArchitectureESE 10.35Compilers as Dataflow ArchitecturesNoImage Ian Sommerville 2000 Oscar NierstraszESE Software ArchitectureESE 10.36Compilers as Blackboard ArchitecturesNoImage Ian Sommerville 2000 Oscar NierstraszESE Software ArchitectureESE 10.37NoImageRoadmapWhat is Software Architectu

36、re?Coupling and CohesionArchitectural styles:LayeredClient-ServerBlackboard, Dataflow, .UML diagrams for architectures Oscar NierstraszESE Software ArchitectureESE 10.38UML support: Package Diagram pose system into packages (containing any other UML element, incl. packages) Oscar NierstraszESE Softw

37、are ArchitectureESE 10.39UML support: Deployment DiagramPhysical layout of run-time components on hardware nodes. Oscar NierstraszESE Software ArchitectureESE 10.40What you should know!How does software architecture constrain a system?How does choosing an architecture simplify design?What are coupling and cohesion?What is an architectural style?Why shouldnt elements in a software layer “see” the layer above?What kinds of applications are suited t

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論