Object Oriented Techniques

A system is an organized set of communicating parts designed for a specific purpose. A car, composed of four wheels, a chassis, a body, and an engine, is designed to transport people. A watch, composed of a battery, a circuit, wheels, and hands, is designed to measure time. A payroll system, composed of a mainframe computer, printers, disks, software, and the payroll staff, is designed to issue salary checks for employees of a company. Parts of a system can in turn be considered as simpler systems called subsystems. The engine of a car, composed of cylinders, pistons, an injection module, and many other parts, is a subsystem of the car. Similarly, the integrated circuit of a watch and the mainframe computer of the payroll system are subsystems. This subsystem decomposition can be recursively applied to subsystems. Objects represent the end of this recursion, when each piece is simple enough that we can fully comprehend it without further decomposition. Many systems are made of numerous subsystems interconnected in complicated ways, often so complex that no single developer can manage its entirety. Modeling is a means for dealing with this complexity. Complex systems are generally described by more than one model, each focusing on a different aspect or level of accuracy. Modeling means constructing an abstraction of a system that focuses on interesting aspects and ignores irrelevant details. What is interesting or irrelevant varies with the task at hand. For example, assume we want to build an airplane. Even with the help of field experts, we cannot build an airplane from scratch and hope that it will function correctly on its maiden flight. Instead, we first build a scale model of the air frame to test its aerodynamic properties. In this scale model, we only need to represent the exterior surface of the airplane. We can ignore details such as the instrument panel or the engine. In order to train pilots for this new airplane, we also build a flight simulator. The flight simulator needs to accurately represent the layout and behavior of flight instruments. In this case, however, details about the exterior of the plane can be ignored. Both the flight simulator and the scale model are much less complex than the airplane they represent. Modeling allows us to deal with complexity through a divide-and-conquer approach. For each type of problem we want to solve (e.g., testing aerodynamic properties, training pilots), we build a model that only focuses on the issues relevant to the problem. Generally, modeling focuses on building a model that is simple enough for a person to grasp completely. A model of software system is made in a modeling language, such as UML. The model has both semantics and notation and can take various forms that include both pictures and text. The model is intended to be easier to use for certain purposes than the final system.



and each model is therefore a semantically closed abstraction of the system. or it may be behavioral. economics. which is a form of modeling. storyboarding. A good modeling language allows the designer to get overall architecture right before detailed design begins. We build architectural models of houses and high rises to help their users visualize the final product. It would be inconceivable to deploy a new aircraft or an automobile without first building models . New electrical devices. but all successful projects are alike in many ways. emphasizing the organization of the system. Modeling -2- . 2. A good mode includes those elements that have broad effect and omits those minor elements that are not relevant to the given level of abstraction. Modeling is not just a part of the building industry. A model provides the blueprints of a system. permit us to specify the structure or behavior of a system. A model may be structural. give us a template that guides us in constructing a system. emphasizing the dynamics of the system. document the decisions we have made. Modeling is a proven and well-accepted engineering technique. Every system may be described from different aspects using different models. In the fields of sociology. from microprocessors to telephone switching systems require some degree of modeling in order to better understand the system and to communicate those ideas to others. one common thread is the use of modeling.Object Oriented Techniques A model of a software system helps developers explore several architectures and design solutions easily before writing code. we build models so that we can validate our theories or try out new ones with minimal risk and cost. Importance of Modeling Unsuccessful software projects fail in their own unique ways. What is a model? A Model is a simplification of reality. We may even build mathematical models in order to analyze the effects of winds or earthquakes on our buildings. 3. Models Models Models Models help to visualize a system as it is or as we want it to be. There are many elements that contribute to a successful software organization. and business management.from computer models to physical wind tunnel models to full-scale prototypes. 4. Why do we model? We build models so that we can better understand the system we are developing. In the motion picture industry. is central to any production. Modeling is basically used to achieve four basic aims: 1.

the point is that each world view leads to a different kind of system. 5. 6. causing you to focus on irrelevant issues. the models you choose can greatly affect your world view. filter.Every model may be expressed at different levels of precision:-the best kinds of models are those that let you choose your degree of detail. To organize. retrieve. although experience suggests that the object-oriented view is superior in crafting resilient architectures. To think about the design of the system. 3. 2. To generate usable work products. with different costs and benefits. even for systems that might have a large database or computational element. If you build a system through the eyes of a structured analyst. If you build a system through the eyes of an object-oriented developer. 4. depending on who is doing the viewing and why they need to view it. offering insight that you simply could not gain otherwise. examine. To master complex systems: A model of a large software system permits dealing with complexity that is too difficult to deal with directly. and edit information about large systems. a developer will want to focus on issues of how. To capture and precisely state requirements and domain knowledge so that all stakeholders may understand and agree on them. Modeling -3- . 2. find. the wrong models will mislead you. Principles of Modeling: 1. To explore multiple solutions economically. Both of these stakeholders will want to visualize a system at different levels of detail at different times. Any of these approaches might be right for a given application and development culture. That fact notwithstanding. In software. An analyst or an end user will want to focus on issues of what. The right models will brilliantly illuminate the most wicked development problems. To capture design decisions in a mutable form separate from the requirements.Object Oriented Techniques Models are useful for several purposes: 1.The choice of what models to create has a profound influence on how a problem is attacked and how a solution is shaped:-choose your models well. you'll end up with a system whose architecture is centered around a sea of classes and the patterns of interaction that direct how those classes work together. If you build a system through the eyes of a database developer. you will likely end up with models that are algorithmic-centric. you will likely focus on entity-relationship models that push behavior into triggers and stored procedures. with data flowing from process to process. 7.

in data-intensive systems. it means having models that can be built and studied separately but that are still interrelated. To understand the architecture of such a system. Each of these views may have structural. implementation and deployment models are the most important. you need several complementary and interlocking views: a use case view (exposing the requirements of the system). there are several ways to approach a model. it is possible to connect all the nearly independent views of a system into one semantic whole. For example. Failing to bridge this chasm causes the system as conceived and the system as built to diverge over time. some models may be more important than others. you'll need floor plans. an implementation view (addressing the physical realization of the system). elevations. you can study electrical plans in isolation. The traditional view of software development takes an algorithmic perspective. a design view (capturing the vocabulary of the problem space and the solution space). In this approach. In object oriented systems. Object Oriented Modeling In software. in distributed systems.No single model is sufficient. these views represent the blueprints of software. and a deployment view (focusing on system engineering issues). electrical plans. In GUI intensive systems. models addressing static design views will dominate. Depending on the nature of the system. In hard real time systems. Finally. The two most common ways are from an algorithmic perspective and from an object-oriented perspective. Every nontrivial system is best approached through a small set of nearly independent models:-If you are constructing a building. there is no single set of blueprints that reveal all its details. aspects. 4. The same is true of object-oriented software systems. In this context. a process view (modeling the distribution of the system's processes and threads). heating plans. the main building block of all software is the procedure or function.Object Oriented Techniques 3. At the very least. as well as behavioral. As in the case of a building.The best models are connected to reality:-In software. the Achilles heel of structured analysis techniques is the fact that there is a basic disconnect between its analysis model and the system's design model. Together. such as one finds in Web-intensive applications. dynamic process views tend to be more important. but you can also see their mapping to the floor plan and perhaps even their interaction with the routing of pipes in the plumbing plan. Modeling -4- . and plumbing plans. static and dynamic use case views are quite important.

systems built with an algorithmic focus turn out to be very hard to maintain. In the middle layer. In the database. Object Oriented Methodology 1. • CRC(Classes-Responsibilities-Collaborations) Method by Wrifs-Brock Modeling -5- . and dialog boxes. as well).Tool: Software for drawings and documentations. and it can do things to other objects. you will find concrete objects. you will find objects such as transactions and business rules. the main building block of all software systems is the object or class. you will find concrete objects.Object Oriented Techniques This view leads developers to focus on issues of control and the decomposition of larger algorithms into smaller ones. The object-oriented approach to software development is decidedly a part of the mainstream simply because it has proven to be of value in building systems in all sorts of problem domains and encompassing all degrees of size and complexity. including customers. most contemporary languages. In this approach. products. The contemporary view of software development takes an object-oriented perspective. involving a user interface. generally drawn from the vocabulary of the problem space or the solution space. and a database.Process: Suggested set of steps to carry out for transforming requirements into working systems. an object is a thing. • The Booch method by Grady Booch • Object Oriented Software Engineering(OOSE) by Ivar Jacobson. and behavior (you can do things to the object. menus. 2. There's nothing inherently evil about such a point of view except that it tends to yield brittle systems.Notation: Graphical representation of classes and relationships and interactions. products. such as tables representing entities from the problem domain. a class is a description of a set of common objects. For example. 3. and orders. Every object has identity (you can name it or otherwise distinguish it from other objects). and orders. state (there's generally some data associated with it). Simply put. such as buttons. such as customers. giving greater cause to view the world in terms of objects. As requirements change (and they will) and the system grows (and it will). consider simple three-tier architecture for a billing system. and tools are object-oriented in some fashion. In the user interface. middleware. operating systems. as well as higher-level views of problem entities. Some popular methodologies include: • Object Modeling Technique(OMT) by James Rumbaugh. • Object Oriented Analysis(OOA) by Peter Coad & Ed Yourdan. Furthermore.