Solutions

=Solutions Exam 1=

Part 1

 * 1) **Concrete architecture** : An architecture that captures the domain knowledge, system requirements (functional & non-functional) and detailed implementation design for a specific instance / version of the software. **Conceptual architecture** : An architecture that captures the domain knowledge, high level system requirements (functional & non-functional). Not used for a particular implementation of the system. **Reference architecture** : An architecture that mainly captures the domain knowledge across many different product designs
 * 2) **Business architecture**: The structure and behaviour of a business system (not necessarily related to computers). Covers business goals, business functions or capabilities, business processes and roles etc. Business functions and business processes are often mapped to the applications and data they need. **Data architecture**: The data structures used by a business and/or its applications. Descriptions of data in storage and data in motion. Descriptions of data stores, data groups and data items. Mappings of those data artifacts to data qualities, applications, locations etc. Applications architecture: The structure and behaviour of applications used in a business, focused on how they interact with each other and with users. Focused on the data consumed and produced by applications rather than their internal structure. In application portfolio management, the applications are usually mapped to business functions and to application platform technologies.Application (or Component) architecture: The internal structure, the modularisation of software, within an application. This is software architecture at the lowest level of granularity, as in reference 3. It is usually below the level of modularisation that solution architects define. However, there is no rigid dividing line. **Technical architecture or infrastructure architecture**: The structure and behaviour of the technology infrastructure. Covers the client and server nodes of the hardware configuration, the infrastructure applications that run on them, the infrastructure services they offer to applications, the protocols and networks that connect applications and nodes.
 * 3) pipes & filters; implicit invocation; layered systems
 * 4) pipes & filters; implicit invocation; layered systems
 * 5) pipes & filters; client server style; layered style

Part 2
> Both of them shield clients from concrete classes. However, Factory design pattern enables third-party developers to plug-in new products, but for Abstract Factory pattern adding a new product means changing factory interface as well as all the concrete factories.
 * 1) Factory design pattern defines an interface for creating an object but let subclasses decide which class to instantiate where as Abstract Factory pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes
 * 1) 'Singleton' design pattern can control the exact number of instances of your objects
 * 2) Adapter pattern can easily integrate two dissimilar systems; brdge pattern, as the name indicates, can decouple an abstraction from its implementation; Composite pattern composes objects into a tree structure; and Strategy pattern defines a family of interchangeable algorithms
 * 3) State pattern allows an object to change its behaviour when its internal state changes. Consider the example: three child classes such as //child_movie//, //regular_movie// & //new_release_movie// inherit from a movie abstract class. But this inhertence fails if the movie changes its classification in its life time. How do you solve the problem to implment the price difference between these movies using the //State Pattern//? (Refer to your Assignment 01)

Part 3

 * 1) Compare pipe-and-filter architecture and the batch sequential and discuss the differences: [[file:Architectural Styles and Patterns 01.pdf]]
 * 2) For the KWIC program you implemented for SA, you used pipes-and-filter architecture. Are there other possible solutions that you could have adopted?
 * 3) Is it possible to create circular dependencies in pipes-and-filter architecture?
 * 4) In operating windows based computer, you do it through a GUI (Graphical User Interface). But you use externally connected devices when we play some computer games, for example WII. Discuss the difference between these two types in terms of the architecture in building these systems.[[file:Event-Based & Event-Driven.pdf]]
 * 5) Web architecture involves communication between your computer and a remote computer(s) through the Internet for any service. Describe the request-response cycle of enterprise web applications: [[file:Essence of Web.pdf]]
 * 6) Imagine that you are building a television controller which responds to signals from remote control unit.Which architectural style is most appropriate for the given system? Give a sketch of sample architecture for each system.Discuss the reason for selecting a given style for each system.
 * 7) For the Client-Server communication in the Web architecture, asynchronous communication is used for partial page-load. Give an example of a technology that makes such asynchronous communication possible between the client and the server. [[file:A New Approach to Web Applications.pdf]]
 * 8) The Dependency Inversion Principle proposes that high level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions. This principle seeks to "invert" the conventional notion that high level modules in software should depend upon the lower level modules. The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. for Data Access Layer: [[file:Architectural Styles and Patterns 05.pdf]]
 * 9) Imagine that you are building a voice recognition system (assume that the system has to perform segmentation into phoneme, syllable creation, word creation, and dictionary lookup; assume that these tasks cooperate on the recognition problem and there is no simple algorithmic order for performing these tasks; also, the system should be easy to extend with new algorithms). Which architectural style is most appropriate for the given system? Give a sketch of architecture for the system. Discuss the reason for selecting a given style for each system. [[file:Architectural Styles.pdf]]
 * 10) What is the difference between an Interface and an Abstract class? What design principle is violated in the diagram below