4

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?

8 Answers 8

6

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.

4

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.

2

I'd say the modeling precedes the programming, 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

0

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.

0

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.

0

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

0

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.

-2

Object-oriented modeling (OOM) is a conceptual framework for representing systems using objects, classes, and their interactions. It is a design approach applied in various fields, including software engineering, to visually illustrate and plan complex systems. On the other hand, object-oriented programming (OOP) is the practical implementation of these models in code, emphasizing the use of objects and their relationships to create modular, maintainable, and scalable software. OOM is primarily concerned with system design, while OOP focuses on translating those designs into executable programs.

1
  • 3
    did you use any generative AI at all in the writing of this answer post?
    – user
    Nov 26, 2023 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.