cs 3050 development using the object oriented approach

30
CS 3050 Development using the Object Oriented Approach

Post on 20-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 3050 Development using the Object Oriented Approach

CS 3050

Development using the Object Oriented

Approach

Page 2: CS 3050 Development using the Object Oriented Approach

Objectives

The Benefits of OO DevelopmentProductivityMaintainabilityExtendibility

Problems with OO ApproachChanging to the OO ApproachPreparing for Your Own Change to OO Development

Page 3: CS 3050 Development using the Object Oriented Approach

IntroductionThe OO approach is a different way of developing systems.Some analysts claim that the OO approach implies a paradigm shift, a different way of viewing the world.Some problems from the shift result from the transition from traditional system development.This transition can be a major undertaking, one that requires a great commitment of resources.

Page 4: CS 3050 Development using the Object Oriented Approach

The Benefits of OO Development

The increase in productivity has not kept pace with the increase in demand for speedy delivery of new software. Existing software needs massive maintenance effort to keep them operational. Some companies spend up to 80% resource for maintenance.

Page 5: CS 3050 Development using the Object Oriented Approach

Maintenance RequirementThere are 4 reasons for the maintenance

requirement:1. Specifying and programming software systems

a complicated undertaking -logical and syntactical code errors usually occur.

2. Requirements specification - a major challenge in systems development. Do not always reflect users’ real needs which is often not even clear to users until after the first version of the software is running.

3. Additional features that could not be accommodated in the original development might be needed.

4. The business environment that the software is supporting might be changing.

Page 6: CS 3050 Development using the Object Oriented Approach

ProductivityFrom a programming perspective, there are many problems that a traditional functional language does not lend itself to solving easily. In most cases the use of OO language tends to result in shorter and more compact program code.OO allows a building block approach to system development. Assembling application using existing classes and libraries resulting in significant increase in productivity.

Page 7: CS 3050 Development using the Object Oriented Approach

Reuse

Can modules generated from structured programming be reused?Why is reuse in the design of Object-Oriented systems highlighted?goto ReuseResponse.rtf

Page 8: CS 3050 Development using the Object Oriented Approach

Maintainability and Quality

Improved maintenance is main advantage of a OO system.OO software is constructed using self-contained object classes. Object tend to be small in terms of number of programming statements that are needed to implement them creating manageable units within the system.Less complexity, fewer errors and reduced code.

Page 9: CS 3050 Development using the Object Oriented Approach

Missing or Incorrect SpecificationsSpecifications define what to build. Problems often because wrong specifications and poor understanding of the user needs.Traditional information systems were developed using structured development approach and common modeling techniques like data flow diagramming and data modeling.Unlike the traditional approach, OO approach promises to narrow down the communication gap by using modeling concepts and techniques that are more closely related to the users’ way of thinking.Object models allow us to remain in the same modeling context for the duration of the project, thereby also increasing the quality of the development effort.

Page 10: CS 3050 Development using the Object Oriented Approach

ExtendibilityA system will eventually need to be changed either because all required functionality was not included or business needs changed.Adding features: With OO approach, method and attributes can be added to existing object classes without disrupting the rest of the system. Using the inheritance feature new classes can be easily added. New features can be added using an incremental approach. The main functionality can be made available quickly for users and additional features can be added when time allows.

Page 11: CS 3050 Development using the Object Oriented Approach

Problems with the OO ApproachThe potential benefits are not easily attainable. Using OO technology it is still possible to design a truly awful system in terms of quality and maintainability.OO technologies and development methods are still not mature or stable. Any large-scale change to new technology and methods is likely to be time consuming. Also there is a substantial learning curve. Productivity and quality decreases as staff is learning new methodology.Some benefits will show up only after a considerable amount of time. Benefits from reuse are only achievable after a certain portfolio of system has been developed.

Page 12: CS 3050 Development using the Object Oriented Approach

Changing to OO ApproachThere are three different areas that need to be considered when changing to the OO approach. These are:

1. Tools: The right programming environment, database and CASE tool need to be selected and implemented.

2. Methodology: The right methodology has to be selected and implemented.

3. Organization: The necessary training must be provided. Organizational impact must be assessed. A suitable pilot project must be selected. The change effort must be planned and managed and the right personnel must be available.

Page 13: CS 3050 Development using the Object Oriented Approach

Preparing for your own change to OO Development

The availability of well-qualified people would be a main bottleneck for an organization.Fundamental change in their way of thinking is required by people accustomed to structured system development. IT personnel with the right educational background might be able to compete successfully with more experience information system developers.

Page 14: CS 3050 Development using the Object Oriented Approach

Is Everything an Object?

Why Focus on Objects?What is an Object?What is an Object in a Computer System?Types of Objects in Computer Systems

User interface ObjectsOperating Environment ObjectsTask-Related Objects

Page 15: CS 3050 Development using the Object Oriented Approach

Why Focus on Objects?In some way everything can be an object.The classification process is based on the features and behaviors that make up a class of objects.A more specialized class “inherits” the features and behaviors of all classes above in a hierarchy. People naturally organize information into classes and hierarchies of general classes and more specialized subclasses --called Generalization/ Specialization hierarchies. People also naturally recognize that things can be divided into parts called whole-part hierarchies.

Page 16: CS 3050 Development using the Object Oriented Approach

Generalization/Specialization hierarchies and whole-part hierarchies allow us to understand things and define things and communicate about things in terms of other things we know. Generalization/Specialization hierarchy is often described as a series of is a relationships. We also understand things, define things, and communicate about things by using the concept of an object and its parts.

Why Focus on Objects?

Page 17: CS 3050 Development using the Object Oriented Approach

Inheritance and Generalization/ Specialization Hierarchies

Generalization/ Specialization Hierarchies allow inheritance. We organize and define things and communicate about things in terms of Generalization/ Specialization Hierarchies. Inherit means get something from, in OO approach one class of objects can inherit attributes and methods from another.OO approach encourages and allows reuse. Reuse means to use something over again, rather than having to reinvent the wheel. This method allows a more compact and less redundant model

Page 18: CS 3050 Development using the Object Oriented Approach

Classification and GeneralizationGen/Spec is a relationship between classes only

There is no object relationship1. Bob calls his car “Max”.2. “Max” is a Ford Mustang.3. A Ford Mustang is a Car.4. Cars are Vehicles.5. Ford is a Make.

Page 19: CS 3050 Development using the Object Oriented Approach

The OO approach to computer system is therefore a more natural approach for people, since we naturally think in terms of objects, and we classify them into hierarchies and divide them into parts. Fig 2.3

Why Focus on Objects

Page 20: CS 3050 Development using the Object Oriented Approach

What is an Object?A person or thing through which action, thought, or feeling is directed. Anything visible or tangible; a material product or substance (Coad & Yourdon, 1991, p. 52)James Martin defines an object in relation to “concepts”: From a very early age, we form concepts. Each concept is a particular idea or understanding we have about our world. These concepts allow us to make sense of and reason about the things in our world. These things to which our concepts apply are called objects.

( Martin, 1993, p. 17).

Page 21: CS 3050 Development using the Object Oriented Approach

Grady Booch uses a variety of approaches: A tangible and/or visible thing; something that may be apprehended intellectually; something toward which thought or actions is directed. An individual , identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain. Anything with a crisply defined boundary. (Booch, 1994, p. 82)

What is an Object?

Page 22: CS 3050 Development using the Object Oriented Approach

Others conclude that anything can be considered an object: An object is a thing that can be distinctly identified. At the appropriate level of abstraction almost anything can be considered to be an object. Thus a specific person, organization, machine, or event can be regarded as an object. (Coleman et el. 1994, p. 13)All of these definitions acknowledge that an object is something that people think about, identify, act upon or apply concepts to. And because different people have perceptions of the same object, what an object is depends upon the point of view of the observer. We describe an object on the basis of the features and behaviors that are relevant to us.

What is an Object?

Page 23: CS 3050 Development using the Object Oriented Approach

What is an Object in a Computer System

Just about anything can be considered to be an object can be identified as an object in a computer system. In computer system it could be a menu or button.Peter Coad uses a concept he call “object think”, he simply proposes that an object simply “knows things” and “knows how to do things.”

Page 24: CS 3050 Development using the Object Oriented Approach

A generalization/Specialization hierarchy of types of objects in a computer system Fig 2.4

Page 25: CS 3050 Development using the Object Oriented Approach

Types of objects in Computer System

If anything can be considered to be an object at some level of abstraction then anything applying to computer systems can be considered to be an object. The types of objects in computer systems might be classified as user interface objects, operating system objects and task-related objects.

Page 26: CS 3050 Development using the Object Oriented Approach

User Interface ObjectUser interface objects are objects that physically appear on the screen and end-users directly interact with them.They have attributes, they exhibit behaviors, they interact with each other and most important we interact with them.When developers says they are using OO technology to develop a systems they really mean they are using interface objects to develop a graphical user interface for their system.

Page 27: CS 3050 Development using the Object Oriented Approach

Common User Interface ObjectsFig 2.5

Page 28: CS 3050 Development using the Object Oriented Approach

Operating Environment Objects

Operating environment object is another type of object.Client and a Server in the client/server architecture is OO.A server object provides services for others and client object requests services form others. To those developer who works on Operating systems OO mean operating system objects.

Page 29: CS 3050 Development using the Object Oriented Approach

Task-Related ObjectsTask-related objects are used to actually complete work. These things that a computer application deals with or creates. Document Objects: documents are objects that know things and know how to do things. (i.e. word processing applications)Multimedia Objects: Multimedia systems are another important type of application which contain sound, video, images. Problem Domain Objects: They are things typically involved in information processing systems, such as customers, products, order or employees. They often correspond to the types of things identified when modeling data.

Page 30: CS 3050 Development using the Object Oriented Approach

A multimedia object Fig 2.7