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
1answer
332 views

Do “Builder” static methods violate SOLID?

I am writing a class which consists mostly of data storage responsibilities. The context for the use of this class will, in general, be retrieving an array of objects of this type for display later. ...
3
votes
4answers
705 views

Using lambdas to improve encapsulation

Just as many people believe tenaciously in small functions, some people believe lambdas should only contain small code fragments. An often overlooked advantage of lambdas however, is using them you ...
10
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 ...
1
vote
2answers
244 views

What it is a data structure of a certain type called?

I'll try to keep this as much language agnostic as I can but I'll give the examples in C# since I now know how to solve it that language. The question came to mind when I was thinking of how could I ...
6
votes
8answers
3k views

Which is best programming style to start learning to programm POP or OOP? [closed]

If somebody has to start learning to program, where should he/she start? Should he start to write procedure-oriented programs or jump to OOP?
6
votes
4answers
240 views

Injecting properties/settings into an application

In applications that I write at work, I often need to have an external properties/settings file so that certain parameters can be configurable after the application is deployed with the end-user. The ...
2
votes
3answers
434 views

Want to know performance issues of Class types & access modifiers

Someone suggested me to mark classes as SEALED that are not being inherited anywhere. I was using default style and was not concerned with the type of class. At present I don't have a benchmark tool ...
10
votes
3answers
2k views

Applying SOLID principles

I am quite new to the S.O.L.I.D. design principles. I understand their cause and benefits, but yet i fail to apply them to a smaller project which I want to refactor as a practical exercise to use the ...
6
votes
4answers
1k views

Why were concepts (generic programming) conceived when we already had classes and interfaces?

Also on stackoverflow.com: I understand that STL concepts had to exist, and that it would be silly to call them "classes" or "interfaces" when in fact they're only documented (human) concepts and ...
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? ...
5
votes
1answer
2k views

Is functional decomposition really an antipattern?

While I was reading The worst anti-patterns you have came across, I clicked on the link in this post to land on the web site about anti-patterns. And the http://sourcemaking.com/antipatterns/...
2
votes
1answer
256 views

How to best annotate MVC custom action filters?

As I get deeper into the area of ASP.NET MVC 3, I feel like I'm finding a lot of very nice technical nuggets as well as new ways of doing things versus classic ASP.NET. One of those "nuggets" is ...
1
vote
3answers
851 views

How do you manage cross-class dependencies on destruction/design (more of a C++ question)

So if I understand correctly, from SOLID design principles, every class should keep a single responsibility. So there should be one class that creates and manages a resources, a second class that ...
5
votes
1answer
336 views

Influences on the design of Dynamic objects by Alan Kay

Alan kay in his paper, The power of Context pdf link, page 8, enumerates some of his motivations for dynamic objects. Some of the influences like Paper on lisp, early paper on the design of functional ...
18
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 ...
8
votes
3answers
1k views

Keeping an MVC model loosely coupled from the DB?

I like to keep my code testable and have decided to go with the Dependency-Injection strategy for my current MVC framework, which definitely has proven to be a great way to ensure loosely coupled code,...
5
votes
2answers
4k views

Best JavaScript Coding Structure Using Object Literal?

Object Literal has no doubt been established in recent years as one of the essential components to best JavaScript coding practices. However, I am not very sure about what is the best way to structure ...
16
votes
5answers
1k views

Is SRP (Single Responsibility Principle) objective?

Consider two UI designers who want to design "user attractive" designs. "User attraction" is a concept that is not objective and only resides in the mind of designers. Thus designer A could for ...
3
votes
3answers
2k views

How to handle large scale js+jquery projects using well written, Object-Oriented JavaScript and jQuery code? [closed]

I love the whole user experience/interface thing and put a lot of jQuery and JavaScript (pure JavaScript for HTML5 stuff, like canvas, file API, etc). The problem I face now is that my codes are ...
3
votes
5answers
1k views

How to convince my boss to switch to OOP PHP? [closed]

We have been trying for months to convince my boss to switch to OOP php, but each time, he takes out his previous experience with programming and convinces us other wise. i need to talk like a boss ...
5
votes
4answers
730 views

What is this called? [closed]

I'm hoping there's a book or something out there for me to get... If I have a class that has Collection as an instance variable, what is that method of coding called? A design pattern? If so, where ...
11
votes
3answers
2k views

generic programming, how often is it used in industry

I do programming in an academic setting at the moment, so I can use whatever I want. I'm using the boost graph library for a few things, and I'm wondering whether investing effort in understanding GP ...
4
votes
9answers
1k 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 Mammal....
1
vote
1answer
562 views

Views, View Controllers, Properties and Object-Oriented Programming

I'm new to OOP, having been a procedural programmer for many years. I'm learning iOS development in Objective-C and could use some clarity on when and how objects and properties are used. Say I have ...
4
votes
2answers
363 views

Polymorphism and the potential security issues

I just read an article on MSDN about reasons for declaring classes as sealed. In the last paragraph, Eric Lippert says: 4) Secure. the whole point of polymorphism is that you can pass around ...
7
votes
3answers
2k 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 ...
4
votes
4answers
1k views

Can the strategy pattern be overused?

Example: A file, representing a serialized version of an object, needs to be read and deserialized. It would simple to implement this if we only cared about a single serialization format, but many ...
7
votes
4answers
540 views

OOP design question

I'm working on an application written in PHP using OOP principles. The classes in my application usually represent a table in the database; for instance, 'student', 'teacher', 'class', 'schedule', etc....
9
votes
3answers
2k views

How do you approach class design in OOPs?

When I try to design an OO solution ,I generally use the CRC modelling wherein I list the class names (nouns), what they do(verbs) and how they collaborate with other classes. This blog has the below ...
26
votes
9answers
6k 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 ...
3
votes
1answer
93 views

Test interface implementation

I have a interface in our code base that I would like to be able to mock out for unit testing. I am writing a test implementation to allow the individual tests to be able to override the specific ...
9
votes
8answers
3k views

OOP technology death [closed]

I've heard many times about the aspect-oriented programming, mostly that it is the "next generation" technology in programming and is going to 'kill' OOP. Is it right? Is OOP going to die or what ...
9
votes
2answers
1k views

Paradigms fit for UI programming

This is a more specific question (or actually two, but they are related) coming from the comments of OOP technology death where someone stated that OOP is not the right paradigm for GUI programming. ...
12
votes
7answers
886 views

Getting My Head Around Immutability

I'm new to object-oriented programming, and one concept that has been taking me a while to grasp is immutability. I think the light bulb went off last night but I want to verify: When I come across ...
4
votes
3answers
615 views

Metaobject protocol:Why is it known as an important concept

Metaobject protocol is protocol for metaobjects in a programming languages. Although I understand it on simple terms, I want to know the reason and a summary of real world usage patterns of this ...
12
votes
9answers
1k views

Avoiding Object Oriented Pitfalls, Migrating from C, What Worked for You?

I've been programming in procedural languages for quite some time now, and my first reaction to a problem is to start breaking it down into tasks to perform rather than to consider the different ...
3
votes
1answer
118 views

Objected oriented application exit

We are writing a program that does a standard "auto update software on startup". If the software finds an update ready, it will start the update process and then exit (and not run the program). We ...
11
votes
5answers
2k views

Advantages to Multiple Methods over Switch

I received a code review from a senior developer today asking "By the way, what is your objection to dispatching functions by way of a switch statement?" I have read in many places about how pumping ...
5
votes
6answers
3k views

Is java a good start to learn OOP? [closed]

I have good teacher who understands OOP. However, the language which he is expert in is Java and I don't want to learn Java. My question is, do you think if I learn OOP using Java I will waste my ...
0
votes
3answers
867 views

Improving Cohesion and Coupling of Classes

I am given this set of code and need to suggest ways to improve the code's cohesion and coupling of the classes. But I thought these classes are quite well de-coupled since it looks like they are ...
4
votes
4answers
618 views

Should strategy objects have state?

I have an application object that needs to validate some data. The particular validation algorithm isn't known until runtime, so I pass a validation object to it, using the strategy pattern. The ...
39
votes
2answers
6k views

What did Alan Kay mean by “assignment” in The Early History of Smalltalk?

I have been reading The Early History of Smalltalk and there are a few mentions of "assignment" which make me question my understanding of its meaning: Though OOP came from many motivations, two ...
11
votes
7answers
2k views

From a design perspective, what are the best practices for logging? [closed]

I want to add logging to an application I'm currently working on. I've added logging before, that's not an issue here. But from a design perspective in an object-oriented language, what are the best ...
2
votes
4answers
310 views

Function locals: variable used in just one function

In OOP, static scope means the scope is linked to the class, and instance scope is linked to a specific instance of the class. Some languages support static locals, which allow a value to be retained ...
6
votes
1answer
4k views

Python programming patterns and practices? [closed]

What are the best python programming patterns and practices you are using every day? I don't mean only design patterns (there are lot of OO design patterns that can be used in python), I mean pure ...
1
vote
1answer
2k views

Python Class Layout - Conventions

What is the proper or standard way to layout a class. If a class where to have attributes, methods, private attributes, private methods, class property (methods), and class methods. I am done 99% of ...
12
votes
6answers
2k views

How to implement only a part of an interface

When developing in OOP, sometimes an interface / contract is given by a library that you cannot alter. Let's call this interface J. Now you have an object of class A that consumes objects that ...
11
votes
4answers
2k views

How do I pass data the object-oriented way in PHP?

I find that even when working with a MVC framework (e.g. CodeIgniter), I regularly resort to passing nested arrays rather than objects. This doesn't follow my understanding of object-oriented well. ...
4
votes
4answers
215 views

Parameterize Agent Based Simulation (OOP-Question)

I'd like to hear my fellow programmer's thoughts on the issue of parametrizing agent based simulations: Consider: Simulation core, including geometry, collision tests, some rules Different agents (...
5
votes
2answers
2k views

What to do with private fields with getters and setters in Java [duplicate]

When are Getters and Setters Justified is an excellent question which focuses on using getters and setters as part of the external interface. What I am struggling with is ... by having getters and ...