A methodology that enables a system to be modeled as a set of objects that can be controlled and manipulated in a modular manner

learn more… | top users | synonyms (3)

19
votes
5answers
4k views

Is objected oriented programming paradigm outdated since it is anti-modular and anti-parallel? [closed]

I have read the controversial article Teaching FP to freshmen posted by Robert Harper who is a professor in CMU. He claimed that CMU would no longer teach object oriented programming in the ...
2
votes
2answers
890 views

Javascript project for analysis and learning

I started learning and using Javascript now for about six months. First i started by following different tutorial on the internet. Testing them, playing with them and trying different variation. ...
8
votes
7answers
3k views

How to explain OOP to a matlab programmer? [closed]

I have a lot of friends who come from electrical / physical / mechanical engineering background, and are curious about what is "OOP" all about. They all know Matlab quite well, so they do have basic ...
9
votes
4answers
1k views

How does thinking on design patterns and OOP practices change in dynamic and weakly-typed languages?

There is a fairly helpful question already along these lines ("Non-OOP Design Patterns?"), but I am more curious about a transitional point of view for someone just getting started with dynamic and ...
3
votes
4answers
623 views

How do you remember encapsulation types for effective use?

I've been attempting to learn C#.NET for the past month or so, and the array of ideas that seems to always trip me up is encapsulation. As this is one of the three pillars of OOP, I feel that I am ...
15
votes
10answers
5k views

Why are inheritance and polymorphism so widely used?

The more I learn about different programming paradigms, such as functional programming, the more I begin to question the wisdom of OOP concepts like inheritance and polymorphism. I first learned ...
3
votes
2answers
832 views

How do you represent container classes in UML?

When drawing out quick class diagrams, I'm often at a loss how to represent classes that are used just to pass data around between various parts of the program. I've been putting them out in the ...
9
votes
5answers
1k views

How do we know to favour composition over generalisation is always the right choice?

Whether an object physically exists or not, we can choose to model it in different ways. We could arbitarily use generalisation or composition in many cases. However, the GoF principle of "favour ...
4
votes
9answers
839 views

Does single inheritance limit what we can do with generalisation?

As a rule of thumb, generalisation is used only in specific circumstances. For example, when we can say that X is literally a subclass of Y. So, we can happily say that a Horse is a subclass of ...
30
votes
17answers
9k views

How can I feel more confident about my programming skills? [closed]

Programming isn't alien to me. I first starting doing markup (HTML, now please don't laugh at me) when I was 12 and a little bit of BASIC when I was 13 (I knew much about Flowcharts, Pseudocodes at ...
30
votes
12answers
10k views

Why does PHP have interfaces?

I noticed that as of PHP5, interfaces have been added to the language. However, since PHP is so loosely typed, it seems that most of the benefits of using interfaces is lost. Why is this included in ...
20
votes
12answers
1k views

SOLID vs. Avoiding Premature Abstraction

I understand what SOLID is supposed to accomplish and use it regularly in situations where modularity is important and its goals are clearly useful. However, two things prevent me from applying it ...
19
votes
11answers
2k views

Is pure oop necessary [closed]

Please don't direct me to this post: http://stackoverflow.com/questions/1551/how-to-think-in-oo. I have read it and still have no answer. I have programmed c++ for years and was taught that ...
83
votes
14answers
22k views

Where does this concept of “favor composition over inheritance” come from?

In the last few months, the mantra "favor composition over inheritance" seems to have sprung up out of nowhere and become almost some sort of meme within the programming community. And every time I ...
8
votes
7answers
3k views

Structured programming versus OO programming

I am making a presentation that shows the differences between structural and object oriented programming and I want to illustrate why people need OOP with an example where applying OOP concepts will ...
12
votes
6answers
2k views

Real-world scenarios for protected methods

Today I noticed that I basically never use protected methods in C++ code, because I rarely feel the need to call non-public methods of a parent. I do use protected in Java in the template method ...
8
votes
3answers
4k views

Differences between “Java OOP” and “Pythonic OOP”? [closed]

I started with ActionScript 2.0 and then went on with Java. I have learned, or at least used, a bunch of languages since then, including Python (probably my favorite). I'm afraid that my style of ...
80
votes
8answers
63k views

Aggregation vs Composition

I understand what composition is in OOP, but I am not able to get a clear idea of what Aggregation is. Can someone explain?
3
votes
4answers
1k views

Objective-C Categories and Sprawling Classes

The generally accepted programming practices I've come across tend to advise against big, sprawling classes. Does using Objective-C categories change the conventional wisdom somehow? Is it more ...
9
votes
12answers
6k views

Why must we learn Procedural programming before we learn Object-oriented programming [closed]

I'm in the 4th year at an IT university now, and when I talk with my professor about this topic he rejects my opinion and gives me a very heavy criticism (in my university, we were being taught C ...
0
votes
2answers
422 views

what's proper class name for manager/browser/editor

I've read somewhere that it's a bad idea to name classes after verbs (manager/browser/editor) but what's the proper name for manager/browser/editor? EDIT: the problem is that system could turn in a ...
11
votes
1answer
2k views

How to learn to translate real world problems to code? [closed]

I'm kind of a beginner to Java and OOP and I didn't quite get the whole concept of seeing a real world problem and translating it to classes and code. For example, I was reading a book on UML and at ...
85
votes
21answers
7k views

Is OOP hard because it is not natural?

One can often hear that OOP naturally corresponds to the way people think about the world. But I would strongly disagree with this statement: We (or at least I) conceptualize the world in terms of ...
26
votes
9answers
3k views

How to REALLY start thinking in terms of objects? [closed]

I work with a team of developers who all have several years of experience with languages such as C# and Java. Most of them are young enough to have been shown OOP as a standard way to develop ...
13
votes
8answers
589 views

How might one teach OO without referencing physical real-world objects? [closed]

I remember reading somewhere that the original concepts behind OO were to find a better architecture for handling the messaging of data between multiple systems in a way that protected the state of ...
6
votes
3answers
1k views

Duplication in parallel inheritance hierarchies

Using an OO language with static typing (like Java), what are good ways to represent the following model invariant without large amounts of duplication. I have two (actually multiple) flavours of the ...
5
votes
5answers
855 views

In C++, is it a reflection of poor software design if objects are deleted manually?

With the advent of smart pointers, is it a sign of poor design if I see objects are deleted? I'm seeing some software components in our product that people are still doing this. This practice strikes ...
25
votes
13answers
6k views

Why are objects passed by reference?

A young co-worker who was studying OO has asked me why every object is passed by reference, which is the opposite of primitive types or structs. It is a common characteristic of languages such as Java ...
1
vote
1answer
664 views

DB Schema for ACL involving 3 subdomains

I am trying to design a database schema for a web app which has 3 subdomains: a) internal employees b) clients c) contractors. The users will be able to communicate with each other to some degree, ...
2
votes
7answers
1k views

Architectural patterns for interaction beyond MVC? [closed]

We all know the venerable Model-View-Controller pattern used to design interaction [mostly] with human users. It is the de-facto standard in OOP environment. What are some other architectural ...
4
votes
3answers
377 views

MVP Pattern Philsophical Question - Security Checking in UI

I have a philosophical question about the MVP pattern: I have a component that checks whether a user has access to a certain privilege. This privilege turns on or off certain UI features. For ...
6
votes
5answers
17k views

Interview Questions in OOP [closed]

I faced the below interview questions in OOP under PHP language. Kindly clear my clarifications regarding this. I am very confused. As i am a beginner to OOP i got too confused. Could anyone clarify ...
6
votes
2answers
657 views

OOP for unit testing : The good, the bad and the ugly

I have recently read Miško Hevery's pdf guide to writing testable code in which its stated that you should limit your classes instanciations in your constructors. I understand that its what you should ...
4
votes
2answers
196 views

Is it better to load up a class with methods or extend member functionality in a local subclass?

Which do you like better? Class #1: public class SearchClass { public SearchClass (string ProgramName) { /* Searches LocalFile objects, handles exceptions, and puts results into m_Results. ...
5
votes
6answers
699 views

How do you know when to split an object method into 2 or more other methods?

I know this is a very basic question, but I sometimes find myself struggling to figure out when to split a single object method into multiple methods. For example, I am trying to set up an ACL using ...
3
votes
4answers
10k views

Question about SDLC. How to answer this?

I have seen this asked many times in job interviews but I am still not sure how to answer this. I am a web developer for quite some time but I still have problem with explaining OOP and SDLC (Familiar ...
6
votes
7answers
2k views

What exactly is OO reuse?

And why is it often talked about? Like I know what OO programming is obviously... but people always say "Oh OO reuse is the biggest programming myth ever". What exactly does this mean?
3
votes
4answers
1k views

How to learn the practical uses of design patterns

I use OOP programming with inheritance, but I've not yet used interfaces.I want to learn how to use design patterns, but I'm finding them very difficult to learn. Is there is any way to learn design ...
3
votes
3answers
2k views

What is the difference between instantiating and loading a class in Java?

In Java world, there are some scenarios where I see developers used to load the class rather than instantiation. What is the difference between instantiating and loading a class?
10
votes
6answers
652 views

Where, in an object oriented system should you, if at all, choose (C-style) structs over classes?

C and most likely many other languages provide a struct keyword for creating structures (or something in a similar fashion). These are (at least in C), from a simplified point of view like classes, ...
5
votes
1answer
414 views

Architectural Composition Languages

Recently stumbled upon this paper (PDF) talking about ACLs, or Architectural Composition Languages. They're a fusion of two earlier lines of research: Architectural Definition Languages (such as UML) ...
24
votes
11answers
7k views

What is Object Oriented Programming ill-suited for?

In Martin Fowler's book Refactoring, Fowler speaks of how when developers learn something new, they don't consider when it's inappropriate for the job: Ten years ago it was like that with objects. ...
0
votes
5answers
2k views

Why does the use of interface-based programming appear to be limited to behaviour?

I have been doing a little thinking about inheritance vs. realization vs. composition. I am not about to post the whole detail here. So I was wondering, when we are not talking about creating ...
2
votes
4answers
197 views

Models, controllers, and code reuse

I have a blog where users can post comments. When creating a comment, various things happen: creating the comment object, associations, persisting sending notification emails to post's author ...
0
votes
5answers
659 views

Should you be an OOP expert if you're developing in ASP.NET?

Should you be an OOP expert if you're developing in ASP.NET?
6
votes
15answers
2k views

Why OOP is enforced in Java and C#? [closed]

In many other languages like C++ and Javascript, OOP is optional. Procedural code is ok. But in languages like Java and C#, OOP is somewhat enforced. Everything is to be a part of a class or an ...
12
votes
6answers
3k views

Convert from Procedural to Object Oriented Code

I have been reading Working Effectively with Legacy Code and Clean Code with the goal of learning strategies on how to begin cleaning up the existing code-base of a large ASP.NET webforms application. ...
3
votes
4answers
2k views

PHP, structural or OOP based language? [closed]

I would like to discuss why is PHP called a structural language? what are the OO concepts that cannot be implemented using PHP?
12
votes
6answers
2k views

Method chaining vs encapsulation

There is the classic OOP problem of method chaining vs "single-access-point" methods: main.getA().getB().getC().transmogrify(x, y) vs main.getA().transmogrifyMyC(x, y) The first seems to have ...
11
votes
12answers
2k views

Is C++ not suitable for OOP? [closed]

I read somewhere in one of the answers to a question here (can't remember which) that C++ is not suitable for object-oriented programming. There was some mentioning that you could make use of its ...