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)

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
650 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
401 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
647 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 ...
0
votes
2answers
299 views

Trying to understand Single Responsiblity Principle [closed]

I'm having a difficult time understanding the Single Responsibility Principle. What should I look for to evaluate the various sources of information on the matter? What should I look for in ...
4
votes
3answers
278 views

Deciding between obj->func() and func(obj)

I was thinking about this when I was starting to set up some code for a new project: are there any rules of thumb for when a method should be part of an object, and when it should be a stand alone ...
6
votes
3answers
1k views

Why make JavaScript class based?

JavaScript is a prototype language. To turn it into a class based language adds little value? I am not talking about best-practice here. I remember reading an article from way back, which claimed that ...
5
votes
2answers
503 views

how to work with people who thinks procedurally in an object oriented project [closed]

I'm working on a project which heavily uses OOP Design principles. But, one of my colleague tends to do everything in procedure oriented manner. I gets irritated by seeing procedure oriented code ...
49
votes
3answers
4k views

So what *did* Alan Kay really mean by the term “object-oriented”?

Reportedly, Alan Kay is the inventor of the term "object oriented". And he is often quoted as having said that what we call OO today is not what he meant. For example, I just found this on Google: ...
3
votes
3answers
11k views

What are some good Object Oriented Design (OOD) interview questions?

I'm looking to prepare for a job interview and I wanted to go over some good Object Oriented Design (OOD) questions. Here are some of the OOD concepts that should give a good starting point: ...
13
votes
3answers
1k views

Pure virtual or abstract, what's in a name?

While discussing a question about virtual functions on Stack Overflow, I wondered whether there was any official naming for pure (abstract) and non-pure virtual functions. I always relied on ...
26
votes
6answers
3k views

Does learning a functional language make a better OOP programmer? [closed]

As a Java/C#/C++ programmer I hear a lot of talk about functional languages, but have never found a need to learn one. I've also heard that the higher level of thinking introduced in functional ...
3
votes
6answers
414 views

Why are interfaces not casteable/ducktypeable?

One thing that always irked me (in C#) was that there's a hard dependency between an interface/abstract class and the implementing class and assembly. Meaning that that if two different assemblies ...
6
votes
9answers
505 views

Is there a programming language with not a tree but tags idea behind OOP?

I'm thinking about tree structures, and I feel that I don't like them. It's like when you have a shop, then you try to put all products to tree-like catalog, and then you need to place one product to ...
1
vote
3answers
428 views

PHP ORM style of querying

Ok so I have made an ORM library for PHP. It uses syntax like so: *(assume that $business_locations is an array)* Business::type(Business:TYPE_AUTOMOTIVE)-> ...
2
votes
3answers
571 views

What is a “pretty and proper OO” way for handling sessions and authentication?

Is coupling these two concepts a bad approach? As of right now I'm delegating all session handling and whether or not a user desires to logout in my config.inc file. As I was writing my Auth class I ...
2
votes
5answers
3k views

Best way to learn Java if you already have an OOP background, like ActionScript 3? [closed]

I'm looking to learn Java, but I don't want to get a book that is going to tell me what an object is, how OOP works, etc. I know this from my existing ActionScript 3 work. One idea is to look at all ...
10
votes
5answers
973 views

Do you leverage the benefits of the open-closed principle?

The open-closed principle (OCP) states that an object should be open for extension but closed for modification. I believe I understand it and use it in conjunction with SRP to create classes that do ...
7
votes
3answers
2k views

OOP oriented PHP app source code samples and advice

The day I have been dreading has arrived. I never felt OOP or good software design was important(I knew they were important, but I thought I could manage without them.). However having read otherwise ...
8
votes
4answers
602 views

Staying OO and Testable while working with a database

What are some OOP strategies for working with a database but keeping things unit testable? Say I have a User class and my production environment works against MySQL. I see a couple possible ...
6
votes
12answers
914 views

Any recommendations on a good Objected-Oriented book [closed]

I'm looking to really grasp OO once and for all. Any recommendations on a good Objected-Oriented book? I program in .Net, so if it's .Net oriented all the better. Regards,
8
votes
10answers
929 views

What should be first - functionality or design? [duplicate]

I've started reading a book from Head First series about OOP and Design. In a first chapter it is stated I have to worry about design of my application just after basic functionality is ready. Basic ...
4
votes
6answers
7k views

When is C a better choice than C++? [closed]

I can't imagine that there's any reason not to use the OOP features of C++. It's is just as fast as C, and - what's more important to me - it's transparent, just as C. (I mean "transparent" that I ...
2
votes
4answers
136 views

Confusion in definitions of a method and a methodology in the book “OOAD with Applicatons” (Booch et al)

I am reading the book Object-Oriented Analysis and Design written by Grady Booch and others. In the Section : I Concepts in a subsection Bringing Order to Chaos authors suggest to separate between a ...
10
votes
7answers
2k views

Is it bad code smell if private method calls public one?

Is it bad code smell to call public method in private method of same object instance?
10
votes
5answers
2k views

Which paradigm to use for writing chess engine?

If you were going to write a chess game engine, what programming paradigm would you use (OOP, procedural, etc) and why whould you choose it ? By chess engine, I mean the portion of a program that ...
6
votes
5answers
575 views

Object model design: collections on classes

Consider Train.Passengers, what type would you use for Passengers where passengers are not supposed to be added or removed by the consuming code? I'm using .NET Framework, so this discussion would ...
4
votes
4answers
224 views

objects, classes, types

How does an object oriented programmer understand the word "type"? I'm not aware of there being a type theory for object oriented programming because whenever someone mentions type theory it is always ...
11
votes
4answers
889 views

Nested Classes: A useful tool or an encapsulation violation?

So I'm still on the fence as to whether or not I should be using these or not. I feel its an extreme violation of encapsulation, however I find that I am able to achieve some degree of encapsulation ...
10
votes
4answers
180 views

Information Spilling Across Object Boundaries

Many times my business objects tend to have situations where information needs to cross object boundaries too often. When doing OO, we want information to be in one object and as much as possible all ...
13
votes
4answers
2k views

How do you explain Separation of Concerns to others?

If you had a colleague who didn't understand the benefits of Separation of Concerns, or didn't understand it quite enough to apply consistently in their daily work, how would you explain it to them?
18
votes
9answers
5k views

Is there any reason to use “plain old data” classes?

In legacy code I occasionally see classes that are nothing but wrappers for data. something like: class Bottle { int height; int diameter; Cap capType; getters/setters, maybe a ...
2
votes
1answer
200 views

Should I use multivalued attributes in conceptual modelling?

My team and I have designed a simple, affordable conceptual modelling language as part or a larger research project. This language is aimed to end users with little or no training in information ...
1
vote
1answer
258 views

PHP objects with configurable data interfaces

I have a User class which needs to load data from a variety of sources, e.g. the main user database, WordPress user metadata, authorizations from another app, etc. For the sake of organization, I want ...
16
votes
11answers
3k views

is OOP the dominant programming model in real world?

Objects Never? Well, Hardly Ever In the VIEWPOINT section of Communications of The ACM, I found an interesting article entitled "Objects Never? Well, Hardly Ever". It’s a radically different ...
7
votes
4answers
759 views

Refactoring in domain driven design [closed]

I've just started working on a project and we're using domain-driven design (as defined by Eric Evans in Domain-Driven Design: Tackling Complexity in the Heart of Software. I believe that our project ...
1
vote
5answers
824 views

Php: Whats my next step? [closed]

So in college I started learning Php, mostly starting with the Larry Ullman books. I got a job at a company after, where I was able to learn some stuff from the higher up guys. Since then, I've done ...
4
votes
2answers
502 views

ORM domain design pitfalls

Are there any patterns which seem sensible when designing an object oriented domain, but do not translate nicely onto a relational database schema? If so, are there standard patterns that can be used ...
4
votes
5answers
578 views

System Programming & Object Oriented Design - what to look out for

Next semester (starts in just under 5 weeks), I'm taking System Programming and OOD concurrently. Apparently SP centers on working in C on Linux, and I only have Java and Python experience, so I am a ...
5
votes
3answers
860 views

Do you know of a data-pump design pattern?

I frequently encounter a situation where I need to write a program which reads data-objects from a file or system, does a transformation on the data, convert the data to another datamodel and then ...
81
votes
16answers
36k views

When are Getters and Setters Justified

Getters and setters are often criticized as being not proper OO. On the other hand most OO code I've seen has extensive getters and setters. When are getters and setters justified? Do you try to ...