Questions tagged [object-oriented]

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

Filter by
Sorted by
Tagged with
1 vote
3 answers
495 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)-> size(Business::SIZE_SMALL)-&...
user avatar
  • 3,211
3 votes
3 answers
1k 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 ...
user avatar
  • 133
2 votes
5 answers
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 ...
user avatar
  • 193
12 votes
5 answers
2k 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 ...
user avatar
6 votes
3 answers
4k 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 ...
user avatar
  • 697
17 votes
4 answers
2k 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 approaches,...
user avatar
8 votes
10 answers
3k 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 ...
user avatar
  • 708
7 votes
6 answers
10k 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 ...
user avatar
  • 1,025
2 votes
4 answers
194 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 ...
user avatar
  • 123
27 votes
10 answers
12k views

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

Is it a code smell to call public method in private method of the same object instance?
user avatar
  • 1,026
9 votes
4 answers
3k 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 ...
user avatar
  • 570
6 votes
5 answers
658 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 ...
user avatar
10 votes
12 answers
127k views

How to explain OOP concepts to a non technical person?

I often try to avoid telling people I'm a programmer because most of the time I end up explaining to them what that really means. When I tell them I'm programming in Java they often ask general ...
user avatar
4 votes
4 answers
301 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 ...
user avatar
11 votes
4 answers
3k 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 ...
user avatar
10 votes
4 answers
211 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 ...
user avatar
57 votes
5 answers
41k 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?
user avatar
  • 2,999
47 votes
10 answers
26k 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 ...
user avatar
  • 15.4k
3 votes
1 answer
374 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 ...
user avatar
  • 2,961
2 votes
1 answer
440 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 ...
user avatar
21 votes
11 answers
4k 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 ...
user avatar
  • 853
11 votes
4 answers
2k 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 ...
user avatar
1 vote
5 answers
1k 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 ...
user avatar
5 votes
2 answers
561 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 ...
user avatar
  • 6,490
4 votes
5 answers
708 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 ...
user avatar
  • 746
5 votes
2 answers
2k 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 ...
user avatar
197 votes
13 answers
138k 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 ...
28 votes
14 answers
4k 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
8 answers
16k 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 ...
user avatar
  • 149
11 votes
10 answers
7k 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.
user avatar
36 votes
5 answers
8k views

Clarify the Open/Closed Principle

As I have had it explained, the open/closed 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 ...
user avatar
10 votes
5 answers
6k 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.
user avatar
  • 10.9k
75 votes
14 answers
8k 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 ...
user avatar
  • 17.1k
17 votes
11 answers
4k 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 to ...
user avatar
  • 603
18 votes
15 answers
11k 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 !
user avatar
  • 603
101 votes
22 answers
55k views

Why is OOP difficult? [closed]

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 ...
7 votes
3 answers
218 views

System Decoupled in the Wrong Places: Meta-Problem? [closed]

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 ...
user avatar
  • 17.1k
21 votes
8 answers
11k 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 isn't ...
user avatar
57 votes
9 answers
22k 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 ...
user avatar
  • 17.1k
13 votes
4 answers
2k 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 ...
user avatar
  • 481
30 votes
12 answers
6k 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 ...
user avatar
96 votes
5 answers
31k views

Functional Programming vs. OOP [closed]

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?
user avatar
  • 8,451
22 votes
6 answers
2k 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 ...
user avatar
  • 17.1k
59 votes
19 answers
21k 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 ...
35 votes
11 answers
20k views

Advantages of object-oriented programming [closed]

Note: this question is an edited excerpt from a blog posting I wrote a few months ago. After placing a link to the blog in a comment on Programmers.SE someone requested that I post a question here so ...
user avatar
9 votes
4 answers
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 ...
user avatar
7 votes
1 answer
242 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 ...
user avatar
17 votes
11 answers
1k 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?
user avatar
  • 7,612
45 votes
10 answers
60k views

What's the difference between "use case", "User Story" and "Usage Scenario"?

Is there an exact, but simple and understandable defintion of the distinction between "use case", "User Story" and "Usage Scenario"? there are quite a bunch of explanation, but right now, I see no ...
user avatar
  • 551

1
61 62 63 64
65