You are on page 1of 5

Object Oriented Techniques

Modeling
Introduction
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.

Modeling

-1-

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

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

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

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