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
6answers
431 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
525 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
441 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
669 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 ...
11
votes
5answers
1k 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 ...
9
votes
4answers
788 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
993 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
1k 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
8k 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
147 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
582 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
231 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
1k 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
181 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 ...
14
votes
4answers
3k 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?
23
votes
9answers
7k 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
203 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
293 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 ...
18
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
852 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
893 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
513 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
609 views

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

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
984 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 ...
106
votes
16answers
57k 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 ...
22
votes
16answers
2k views

How large non-OO code bases are managed?

I always see abstraction is a very useful feature the OO provides for managing the code-base. But how are large non-OO code bases are managed? Or do those just become a "Big Ball of Mud" eventually? ...
4
votes
8answers
10k views

Object Oriented Programming Concepts and Interviews [closed]

I'm an Object Oriented Programming fanatic. I have always believed in modelling solutions in terms of objects. It is something that comes to me naturally. I work with a services start up that ...
11
votes
10answers
5k views

How would you evaluate object oriented design skills? [closed]

what kind of insights or questions would lead you to determine a person's OOAD skills.
18
votes
4answers
4k views

Clarify the Open/Close Principle

As I have had it explained, the open/close principle states that once written code should not be modified (aside from bug fixes). But if my business rules change shouldn't I modify the code ...
8
votes
5answers
4k views

Why C# doesn’t support multiple inheritance?

Even if it could be bad practices, I would say that there is time that it would fulfill its purpose.
37
votes
10answers
3k views

Clarify the Single Responsibility Principle

The Single Responsibility Principle states that a class should do one and only one thing. Some cases are pretty clear cut. Others, though, are difficult because what looks like "one thing" when ...
16
votes
11answers
2k views

What made object oriented programming successful? [closed]

What is that feature according to you that has made object oriented programming so much successful ? Message Passing Inheritance Polymorphism Encapsulation Or some other feature that you may like ...
17
votes
15answers
4k views

Is Object Oriented Programming a solution to complexity? [closed]

Do you think Object Oriented Programming is a solution to complexity. Why? This topic may be a bit controversial but my intentions to know the answer of Why from the experts here !
69
votes
22answers
17k views

Why is OOP difficult?

When I started using an object-oriented language (Java), I pretty much just went "Cool" and started coding. I've never really thought about it until only recently after having read lots of questions ...
8
votes
3answers
179 views

System Decoupled in the Wrong Places: Meta-Problem?

At a meta level, I often find that when I grow a codebase organically, parts of the system that I eventually find need to know about each other (at least through some interface) have been mercilessly ...
14
votes
8answers
3k views

Is the GoF book still the one to read? [duplicate]

Possible Duplicate: Is there a canonical book on design patterns? I'd like to read a design patterns book. GoF for sure is the one to read. But after 15 years is it still valid, I mean ...
38
votes
9answers
6k views

Code Smell: Inheritance Abuse [duplicate]

It's been generally accepted in the OO community that one should "favor composition over inheritance". On the other hand, inheritance does provide both polymorphism and a straightforward, terse way of ...
11
votes
4answers
1k views

FP and OO orthogonal?

I have heard this time and again and I am trying to understand and validate the idea that FP and OO are orthogonal. First of all, what does it mean for 2 concepts to be orthogonal ? FP encourages ...
5
votes
2answers
248 views

What level of understanding should programmers have about OO? [closed]

More specifically, what do you feel Junior, Intermediate, and Senior programmers should know about OO design and programming? I'm hoping that having some appropriate expectations will help us during ...
25
votes
12answers
2k views

How large is ok for a Class?

I’m a long time developer (I’m 49) but rather new to object oriented development. I’ve been reading about OO since Bertrand Meyer’s Eiffel, but have done really little OO programming. The point is ...
74
votes
6answers
14k views

Functional Programming vs. OOP

I've heard a lot of talk about using functional languages such as Haskell as of late. What are some of the big differences, pros and cons of functional programming vs. object-oriented programming?
17
votes
5answers
823 views

Is loose coupling w/o use cases an anti-pattern?

Loose coupling is, to some developers, the holy grail of well-engineered software. It's certainly a good thing when it makes code more flexible in the face of changes that are likely to occur in the ...
35
votes
18answers
9k views

Does OOP fulfill the promise of code reuse? What alternatives are there to achieve code reuse?

Perhaps the greatest promise of using object-oriented paradigm is the code reuse. Some dispute that this was achieved. Why was it (not) achieved? Does code reuse as OOP defines it, make projects more ...
7
votes
4answers
2k views

Why do so many programmers absolutely hate object prevalence layers?

Prevalence is a simple technique to provide ACID properties to an in-memory object model based on binary serialization and write-ahead logging. It works like this: Start with a snapshot. Serialize ...
7
votes
1answer
174 views

Separation of Concerns when adding new types

I have a system I've been working on this week where I'm having a hard time balancing separation of concerns with easy extensibility. I'm adding new types to the system, and it feels like shotgun ...
15
votes
11answers
836 views

Have objects delivered in terms of code reuse?

I have often heard it said that objects have not delivered in terms of code reuse. Do you agree? If you believe that they haven't, why not?