How to Apply the GRASP Patterns? The following sections present the first five GRASP patterns: . Information Expert . Creator . High Cohesion . Low Coupling . Controller Package diag: UML package diagrams are often used to illustrate the logical architecture of a system-the layers, subsystems, packages . A layer can be modeled as a UML package; It is part of the Design Model and also be summarized as a view in the Software Architecture Document. TESTING: Testing is a method to check whether the actual software product matches expected requirements and to ensure that software product is Defect free. It involves execution of software/system components using manual or automated tools to evaluate one or more properties of interest. The purpose of software testing is to identify errors, gaps or missing requirements in contrast to actual requirements. Some prefer saying Software testing definition as a White Box and Black Box Testing. TEST PLAN: A Test Plan is a detailed document that describes the test strategy, objectives, schedule, estimation, deliverables, and resources required to perform testing for a software product. Test Plan helps us determine the effort needed to validate the quality of the application under test. The test plan serves as a blueprint to conduct software testing activities as a defined process, which is minutely monitored and controlled by the test manager. LAYERS OF PACKAGE DIAGRAM: User Interface – Has various I/O formats & forms. Application Logic and Domain Objects - software objects representing domain concepts (for example, a software class Sale) that fulfill application requirements, such as calculating a sale total. Technical Services general purpose objects and subsystems that provide supporting technical services, such as interfacing with a database or error logging. REFACTORING: Refactoring is the process of restructuring code, while not changing its original functionality. The goal of refactoring is to improve internal code by making many small changes without altering the code's external behavior. Computer programmers and software developers refactor code to improve the design, structure and implementation of software. Refactoring improves code readability and reduces complexities. Refactoring can also help software developers find bugs or vulnerabilities hidden in their software. Deployment Diagrams A deployment diagram shows the assignment of concrete software artifacts (such as executable files) to computational nodes (something with processing services). It shows the deployment of software elements to the physical architecture and the communication (usually on a network) between physical elements Two Nodes of Deployment Diagram : Device Node :This is a Physical Computing Resource representing a computer with memory or mobile. Execution Environment Node : This is a software computing resource that runs within an outer node (such as a computer) and which itself provides a service to host and execute other executable software elements ADV OF MODELING STATE MACHINE DIAGRAM: State machines are useful modeling aids for developing realtime or event-driven systems because they show dynamic behavior. You can develop state machines during all phases of a software project and for business modeling. You can use state machines in the following situations: During business modeling, you can create state machines to model a use-case scenario. During analysis and design, you can model event-driven objects that react to events outside an object's context. During analysis and design, you can use several state machine diagrams to show different aspects of the same state machine and its behavior. Testing Debugging Testing is the process to find bugs and errors. Debugging is the process to correct the bugs found during Testing Debugging testing. It is the process to identify the failure of implemented code. It is the process to give the absolution to code failure. Testing is the display of errors. Debugging is a deductive process. Testing is done by the tester. Debugging is done by either programmer or developer. There is no need of design knowledge in the testing process. Debugging can’t be done without proper design knowledge. Testing can be done by insider as well as outsider. Debugging is done only by insider. Outsider can’t do debugging. Testing can be manual or automated. Debugging is always manual. Debugging can’t be automated. It is based on different testing levels i.e. unit testing, integration testing, system testing etc. Debugging is based on different types of bugs. Testing is a stage of software development life cycle (SDLC). Debugging is not an aspect of software development life cycle, it occurs as a consequence of testing. Testing Debugging Testing is composed of validation and verification of software. While debugging process seeks to match symptom with cause, by that it leads to the error correction. Testing is initiated after the code is written. Debugging commences with the execution of a test case. Testing process based on various levels of testingsystem testing, integration testing, unit testing, etc. Debugging process based on various types of bugs is present in a system. Generalize your views about inception in use case Inception Phase - During the inception phase the core idea is developed into a product vision. In this phase, we review and confirm our understanding of the core business drivers. We want to understand the business case for why the project should be attempted. Analyze the concepts of Noun Phase Identification from use case Identifying Tentative classes. 2. Selecting classes from the Relevant and fuzzy categories. 3. The vialNet Bank ATM System: Identifying classes by using Noun phrase Approach. 4. Initial List of Noun phrases: candidate classes. 5. Reviewing the Redundant classes and Building a common vocabulary Write the criteria in planning the next iteration during elaboration phase The elaboration phase is meant to clarify these qualities and reach a consensus. Simply put, it makes our collaboration more productive and eliminates any misunderstandings. As a result, customers can understand how much the product will cost and how soon it will be completed. Difference between sequence and use case diagram Usecase diagram ----------------Use case diagrams show business use cases, actors, and the relationships between them. The relationships between actors and business use cases state that an actor can use a certain functionality of the business system. You will not find any information about ut how or in what chronological sequence these services are rendered sequence diagram -----------------A sequence diagram can map a scenarios described by a use case in step by step detail to define how objects collaborate to achieve your application's goals. Example of Domain omain model with uml class diagram notation Primary goal in design of uml The primary goal of UML is to define some general-purpose purpose simple modeling language so that all modelers can use and understan understand.. UML is not a development method rather it accompanies with processes to make a successful system. Test can help to find useful use cases Use case testing is a technique that helps to identify test cases that cover the entire system, on a transaction by transaction basis, from start to finish. It is a description of a particular use of the system by a user. It is used widely in developing tests or systems for acceptable levels Probable attributes for Library database object book An attribute is a piece of information about the entity. For example, the title, author, and ISBN are all attributes of a book entity. Purpose of using use cases Use cases add value because they help explain how the system should behave and in the process, they also help brainstorm what could go wrong. They provide a list of goals and this list can be used to establish the cost and complexity of the system. Fully dressed and casual use cases in the nextgen inception phase Fully Dressed Process Sale Handle Returns Casual Process Rental Analyze Sales Activity Manage Security Classifier A classifier is an abstract metaclass classification concept that serves as a mechanism to show interfaces, classes, datatypes and components. A classifier describes a set of instances that have common behavioral and structural features (operations and attributes, respectively). Compare coupling and cohension Cohesion Coupling Cohesion is the concept of intra-module. Coupling is the concept of inter-module. Cohesion represents the relationship within a module. Increasing cohesion is good for software. Cohesion represents the functional strength of modules. Coupling represents the relationships between modules. Increasing coupling is avoided for software. Coupling represents the independence among modules. Whereas loosely coupling gives the best Highly cohesive gives the best software. software. In cohesion, the module focuses on a In coupling, modules are connected to the single thing. other modules. Cohesion is created between the same Coupling is created between two different module. modules. There are Six types of Cohesion There are Six types of Coupling 1. 2. 3. 4. 5. 6. Functional Cohesion. Procedural Cohesion. Temporal Cohesion. Sequential Cohesion. Layer Cohesion. Communication Cohesion. 1. Common Coupling. 2. External Coupling. 3. Control Coupling. 4. Stamp Coupling. 5. Data Coupling 6. Content Coupling When to use package and collaboration diagram Packages are particularly useful for testing. Although I do write some tests on a classby-class basis, I prefer to do my unit testing on a package-by-package basis. Each package should have one or more test classes that test the behavior of the package. collaborations are useful whenever you want to refer to a particular interaction. Parameterized collaborations are useful when you have several similar collaborations in your system. aggregation Aggregation is a subset of association, is a collection of different things. It represents has a relationship. It is more specific than an association. It describes a part-whole or part-of relationship. It is a binary association, i.e., it only involves two classes. It is a kind of relationship in which the child is independent of its parent. When can we use pattern when you are working through a design, and particular part of a system requires something that fits a design pattern you have, then use it. Don't try to fit a system round a design pattern, fit design patterns in to your system (where they fit).