2 IssuesSoftware systems are complex and are only getting more complex. They encompass a large amount of detail and decisions.There is a need to do such things as make decisions about software projects early, to divide work among teams, to ensure certain qualities in the software product.
3 ArchitectureWhen starting the plans for a new building, the type of faucets to install on the sinks on the 23rd floor is not a key decision.Abstraction of detail to focus on the major requirements. Foundation, size, major materials needed. Estimates of cost and risk.
4 Software Architecture You may have heard of systems as described as having a two-tiered architecture or a layered architecture.Similar notion: abstraction of detail.Some questions:What are the major components of a system and how do they interact?What are the major properties of the system?
5 DefinitionThe structure or structures of the system, which comprise software components, the properties of those components, and the relationships among them. The intent is to provide a basis for decision making and risk reduction without having to consider all the detail.The view from several kilometers up.
6 Why is Architecture Important? A means of dealing with complexity.A basis for decision making.Helps to define the properties and limitations of a system.Aids long term maintenance. It defines the important components and connections (the load-bearing walls).Division of effort.Standard patterns and styles.
7 Components and Connectors Components: computational components.Clients, serversdatabasesuser interfaceConnectors: the means by which components interact.Procedure callsnetwork protocols
8 Architectural StylesSystems are often described as having a client-server architecture, or a layered architecture, etc. These are particular styles of architecture.A style is defined by the components, connectors and constraints for a family of architectures.Each style has particular properties, and knowing the properties aids in decisions about which style to use. Hybrids are also common.Examples: pipe and filter, repository, layered.
9 Pipe and FilterA component (filter) reads a stream of data on its inputs and produces streams of data on its outputs. The streams are the pipes.Filters are independent and do not know the identity of upstream or downstream filters.Very flexible, good for batch operations.Example: Unix pipes.
10 Repository Two distinct components: a central data repositoryindependent components that operation on the repositoryComponents may run sequentially or be triggered by changes in the repository.Examples: compilers, database systemsRepository
12 Object-Oriented Organization Components are objects and connectors are procedure calls.Objects are responsible for maintaining some amount of data or procedure.Objects need to know the identity of all objects they interact with. There is no limit placed on the amount of interconnectedness.ObjectObjectObject
13 Layered SystemsA hierarchy with each layer providing services to the layer above it and requesting services from the layer below it.Support increasing levels of abstraction, which simplifies each layer.Implementations of the same layer can be used interchangeably.May have performance problems.
14 Modified Three Tier Arch. User Interface ManagerClientWorkflow ManagerGeneric Services(Error Handling,Authentication)ServerBusiness Rules ManagerPersistent Object ManagerDatabaseDatabase
15 Where Does Architecture Fit? Architecture is related to design but is at a higher level of abstraction.When do you define the architecture?Since the architecture captures important decisions about the structure of the software system, it needs to be defined early on in the analysis and design phase (at the same time subsystems are defined).Subsystems are components and connectors.Defines the interfaces between components, and the types of connectors.
16 CelsiusTech SystemsNaval product line (SS2000) for command, control and communication.Architecture defines one family of application components which support multiple ship classes, platforms and operating systems.Lower cost and greater reliability comes from fitting requirements into the context of the product line.70% reuse for million plus line systems.
17 ReuseThe example makes the point for not only reusing code components as reuse is typically thought of, but also reusing a highly configurable architecture and design of a system.
18 DomainsFunctionality that is used across a spectrum of applications (or subsystems) within a domain can be packaged into a single framework.Examples:MFC in user interfacesOSEFA in manufacturing process controlChoices in operating systemsSEAF in engineering worksheetsApplicationsAbstraction ofcommon operations.Framework
19 Object-Oriented Frameworks Framework: architecture + implementation + hooks.The framework serves as the basis for many applications. Developers fill in the hooks to produce a new app.FrameworkHooksFrameworkNew Applications
20 ConceptsApplications customize and extend frameworks, much like a class inherits from it’s parent class.The architecture and implementation of the framework impose restrictions on the application.ParentFrameworkSubclassApplication
21 Example: GUI BuildersAll window systems come with their own set of concepts, implementations, and the means by which those concepts interact.Buttons and sliders in windows, menus that generate events, etc.By buying into those concepts, user interfaces can be built quickly.But it’s not for everything:embedded systems (e.g. robotic soccer players)voice control
22 Users and Developers of Frameworks There are three main roles associated with frameworks:Framework designers, also called framework developers or framework builders, develop the original frameworkFramework users, also called framework clients or application developers, use the framework to develop applications.Framework maintainers refine and redevelop the framework to fit new requirements.
24 Frameworks vs. Applications are complete, executableapply to a single problemFrameworksare incomplete, although they may include sample applicationsapply to a range of applications within a domain
25 Ways to use a Framework As is: without any modifications. Complete: add to the framework by filling in parts left open.Customize: replacing part of the framework with custom code.
26 Strategies for UseAppoint a framework expert. One or two people become familiar with the framework and can then be consulted during the project.Design integration. It is important to fully integrate the design of the application with the design of the framework during the analysis and design phases of development.
27 Learning to Use the Framework Frameworks can be difficult to learn so a means of lowering the learning curve is needed.Tutorial sessions can be held to allow the framework builders to show users what can be done with the framework.Tools can be used to investigate the operation of the framework and to allow the use of the hooks without learning the whole framework.Documentation can describe the design and intended use of the framework, and provide examples of use.
28 CSF OverviewJava framework that handles communication between client server or peer to peer programs over a TCP/IP network.Has some persistent storage capabilities.Subsystem.CommunicationPersistence
29 Framework ConcernsBuilding a framework requires more resources than building a single application.When a framework evolves, all applications built from the framework are affected.A complex framework can take a significant amount of time to learn before it can be used effectively.It isn’t always easy to determine if the framework is compatible with the desired application.
30 Framework BenefitsReusable implementation and design that captures the expertise of developers within a domain.The framework should have a quality design which will be ‘inherited’ by applications.Decreased development time.Reduced maintenance costs from maintaining a common code base.
31 Design PatternsDesign patterns can and have been used to design object-oriented frameworks.A design pattern is a solution to a common software design problem in a given context.problem: conditions that applysolution: template of classes and collaborationsconsequences: effect on the overall designThe solutions are not new, but ‘tried and tested.’
32 Observer PatternProblem: an object needs to monitor the state of another.Solution: make the object an observer.Consequences:simple interface, timely notification, no need for pollingobject must be able to receive updates at any timeInboxnotifySubjectClientupdateObserver
33 History of Design Patterns Design patterns were inspired by the work of a real architect, Alexander, and his book A Timeless Way of Building.Gamma adapted and applied it to software in his Ph.D. thesis.Gamma and three others, Johnson, Helm, Vlissides, wrote a book called Design Patterns which sparked the patterns movement.
34 Patterns and Frameworks Design patternsdesign level constructssmall and easily implementedthe user must understand the details of the pattern to use itused to help design frameworksFrameworksincludes both design and implementationlarger and more complex than design patternsthe user does not need to understand the framework completely
35 Proxy PatternProblem: How can data on a server be represented at a client without having to keep a copy of the entire data object at the client.Solution: create a proxy of the data on the client side.Consequences:the remote proxy hides the fact that the data isn’t localtransferring data can occur on demandDataDataProxyClient
36 Composite PatternProblem: clients should be able to ignore the differences between compositions of objects and individual objects.Consequences:makes the client simplecan be overly generalSolution:ComponentOperation()Add(Component)Remove(Component)GetChild(int)CompositeLeafOperation()Operation()Add(Component)Remove(Component)GetChild(int)
37 Pattern Descriptions A full pattern description gives: motivation for and applicability of the pattern (the problem in context)structure, participants and collaborations of the participantsconsequences, both good and bad, of using the patternan example showing the implementation of the patternprograms or projects in which it has been usedrelated patterns
38 Architecture, Frameworks, and Design Patterns Architectures are the overall high-level structure (components and connectors) of a system.Frameworks are reusable designs and implementations of all or part of an architecture.Design patterns can be used to help build architectures and frameworks.ArchitectureFrameworksDesignPatterns