Transcript .ppt
CS 5150 Software Engineering Lecture 12 Software Architecture 1 Administrivia • • CS 5150 You should have received comments on your reports Presentation room TBD (today) 2 First Presentation Preparation • Who is your audience? • • • • • • Secondary: TA Practice! Presenter should stand, others should sit A team member should take notes When asked a question, the presenter should answer • • CS 5150 Primary: Client(s), instructor Refer to other team members if necessary It is unprofessional to interrupt your colleagues 3 SE in the News • • CS 5150 LinkedIn mobile redesign • • • Fast, easy, reliable House metaphor Mix of native and web Microsoft just announced TypeScript • Dart, GWT, Script# 4 • • • • CS 5150 Software Architecture Lots of pieces of the puzzle Operational definition: Technical decisions made early in a project that are expensive to change Equal parts experience and engineering creativity, with a sprinkling of science A Pattern Language. Ishikawa, Alexander, Silverstein 5 Components of Software Architecture • • • • • • • CS 5150 Computers and networks (e.g., monolithic, distributed) Interfaces and protocols (e.g., http, ODBC) Databases (e.g., relational, distributed) Security (e.g., smart card authentication) Operations (e.g., backup, archiving, audit trails) Software environments (e.g., languages, source control tools) Testing frameworks 6 Language and Framework Choice • • • If you are working in an established application domain, go with a popular choice If you are trying to define a new niche, unusual choices might be appropriate Long-lived projects tend to become multilingual • CS 5150 No necessarily bad, but carries a high cost 7 Machine-Level Concurrency (Distribution) • Can/Do components of your application run on different computers? • • • CS 5150 Inherent in application domain: email, big scientific simulations Isolation: security-sensitive data lives on a different machine Convenience: Use an application locally or remotely 8 Distribution Has Big Costs • • • • • CS 5150 Moving data from one machine to another More special cases to handle Testing is much harder Installation and maintenance can be more complex Conclusion: do not split your application into pieces that can run on different computers unless there is a compelling reason 9 Modules and Interfaces • Architecture is all about • • • Interfaces (methods, protocols, languages, data types, ...) Goal: Module interactions are strictly governed by interfaces • • • CS 5150 Modules (sub-components, classes, pieces, ...) Cognitive burden Replacement Human work parallelization 10 Architectural Pattern: Pipes • CS 5150 Chain or pipe of components 11 Architectural Pattern: Three Tiers • • CS 5150 Popular in web design Many variations on the theme exist • How much logic belongs in Presentation versus Application? 12 Architectural Pattern: Repository • • CS 5150 Advantage: Flexible pattern for data-intensive applications Disadvantage: Repository can be a bottleneck and an artificial block to code evolution 13 Improvement on Repository Pattern CS 5150 14 Architectural Patterns for Distributed Data • • • • CS 5150 Mirrors Caches Single-owner Consistency and performance are hard to balance properly in distributed data schemes 15 • • Good Software Architecture How do you know if an architecture is good? • Do the module boundaries (interfaces) correlate well with actual interactions in the application? • • • • • CS 5150 Experience always plays an important role Direct invocation Data send/receive Indirect invocation Indirect data paths Leaky abstractions! 16