views:

679

answers:

8

What is the difference between Object-Oriented Modeling and Object-Oriented Programming? I overheard a conversation on my subway train this morning and it seems that these things are different. Aren't they?

+3  A: 

I'd say the modeling precludes the programing, where the modeling is the physical design, before the programming is implemented.

http://en.wikipedia.org/wiki/Object-Oriented_Modeling

http://en.wikipedia.org/wiki/Object_oriented_programming

Chris Serra
+3  A: 

Object-Oriented Modeling refers to the process where you are designing how the code will look like. You will use a modeling language like UML to do Object-Oriented Modeling. Object-Oriented Programming refers to a programming paradigm where you use objects. These objects have been designed during the desing phase using Object-Oriented Modeling techniques, and they are implemented during the construction (programming phase) using a language that supports Object-Oriented programming and based on the model.

Curro
A: 

I just found this:

Object-oriented modeling is a formal way of representing something in the real world. It draws from traditional set theory and classification theory. object-oriented modeling is not limited to computer-related elements. One may use object-oriented modeling to represent many different types of things, from organizational structures, to organic materials, to physical buildings.

Martin
A: 

Object-Oriented Modeling is used to define, usually without any actual code, the classes, methods, and variables. There are many tools out there to help with such modelling. Netbeans is one such package. Netbeans can help you model your code and will even attempt to help you get started after you make your class diagrams.

Haabda
A: 

I found this extraction is from the DTMF website about Key concepts of object oriented modeling.

Abstraction: DENotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries.
Example: A Cheesburger - is good to eat and fun to cook.

Modularity: Decomposition of abstractions into discrete units.
Example: The various "layers" of a cheesburger - the bun, the lettuce, the ketchup, the mayonnaise, the burger, the cheese, onions, pickels, etc.

Encapsulation: Process of compartmentalizing the elements of an abstraction that constitute its structure and behavior; encapsulation serves to separate the interface of an abstraction and its implementation.
Example: • To cook the cheeseburger: - Is the stove available? Are the burners working? Are the ingredients available? • To eat the cheeseburger: - Is it made correctly? Is my plate clean or disgusting?

Hierarchy: A ranking or ordering of abstractions. Example: A cheeseburger is really a subclass of a hamburger with cheese added which is a sub class of sandwich which is a subclass of the Hierarchal superclass food.

Key Elements: Classes – A collection of definitions of state, behavior, and/or identity • Properties • Methods

Objects: Instances of a class

Associations: Relationships • Dependency • Identity • Aggregation • Composition • And others

Martin
A: 

So is UML a tool for doing Object Oriented Modeling?

Martin
+2  A: 

Modeling is creating an abstraction of a problem, where as programming is the implementation of such an abstraction.

Modeling can be done in many ways: textual, formulas, diagrams... UML is one standard of modeling object oriented concepts.

Programming can be done in different ways too, depending on the tool, language etc. There are ways to generate the program right out of the modeling tool, typically out of UML models. This goes even a step further, where UML models are "executed" directly.

Other common confusions about object-oriented programming exist too - starting from "it's the thing where your drag and click", over hybrid 3rd generation concepts I refer to as "processing Objects" to practical patterns and ending with pure OOP.

Oli
A: 

Well, given that code is a means of communicating, object-oriented programming in an object-oriented programming language is a form of modelling.

One can however model at a more abstract level using modelling languages that are less expressive, but perhaps more useful for other purposes. For the purposes of developing software, modelling not relatively closely tied to programmes is mainly an exercise for a certain class of person who thinks it is terribly important, and is paid as if it were, but it is not.

Marcin