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
356 views

As a tooling/automation developer, can I be making better use of OOP?

My time as a developer (~8 yrs) has been spent creating tooling/automation of one sort or another. The tools I develop usually interface with one or more API's. These API's could be win32, WMI, ...
2
votes
3answers
257 views

Turning your code inside out (functional style) compared to a OO paradigm

I have find this article Turning Your Code Inside Out and I want to know how this approach described in article is for OO programmers/languages. Is this style of design used in OO ...
4
votes
4answers
356 views

How to decide whether to implement an operation as Entity operation vs Service operation in Domain Driven Design?

I am reading Evans's Domain Driven Design. The book says that there are entity and there are services. If I were to implement an operation, how to decide whether I should add it as a method on an ...
20
votes
1answer
5k views

What did they call Object-Oriented Programming before Alan Kay invented the term?

Alan Kay claims that "I made up the term "object-oriented", and I can tell you I did not have C++ in mind." What he had in mind, of course, was Smalltalk. But he did not make up object-oriented ...
16
votes
8answers
29k views

Web Developer interview questions [closed]

I read an article today that listed some basic questions about web development: Describe how POST data was submitted to a server by a browser. Explain a number of HTTP status codes (except maybe 404 ...
1
vote
2answers
594 views

What is classic object oriented programming?

I heard the phrase classic object oriented programming. Is it different from present object oriented programming, like classic ASP and ASP.net?
2
votes
1answer
347 views

Are there design patterns or generalised approaches for particle simulations?

I'm working on a project (for college) in C++. The goal is to write a program that can more or less simulate a beam of particles flying trough the LHC synchrotron. Not wanting to rush into things, ...
7
votes
3answers
3k views

Should main method be only consists of object creations and method calls?

A friend of mine told me that, the best practice is class containing main method should be named Main and only contains main method. Also main method should only parse inputs, create other objects and ...
2
votes
2answers
278 views

Does SRP with ORM provoke SOA?

Sorry about the many abbreviations in the title... My observation is that applications built with an object-relational mapping like Hibernate tend to follow a service-oriented architecture instead of ...
73
votes
15answers
30k views

What makes C so popular in the age of OOP? [closed]

I code a lot in both C and C++, but did not expect C to be the second most popular language, slightly behind Java. TIOBE Programming Community Index I'm curious as to why, in this age of OOP, C is ...
1
vote
2answers
375 views

how should I design Objects around this business requirement?

This is the business requirement: " A Holiday Package (e.g. New York NY Holiday Package) can be offered in different ways based on the Origin city: From New Delhi to NY From Bombay to NY NY itself ...
0
votes
4answers
2k views

How to store a list of Objects that might change in future?

I have set of Objects of the same class which have different values of their attributes. and I need to find the best match from a function under given scenarios out of these objects. In future these ...
0
votes
3answers
296 views

Any language where every class instance is a class too?

Taking inspiration from Javascript prototypes, I had the idea of a language where every instance can be used as a class. Before I potentially reinvent the wheel, I would like to ask if there is a ...
4
votes
4answers
261 views

How do I handle priority and propagation in an event system?

Let's say I have a simple event system with the following syntax: object = new Object(); object.bind("my_trigger", function() { print "hello"; }); object.bind("my_trigger", function() { print ...
21
votes
3answers
30k views

what is message passing in OO?

I've been studying OO programming, primarily in C++, C# and Java. I thought I had a good grasp on it with my understanding of encapsulation, inheritance and polymorphism (as well as reading a lot of ...
2
votes
5answers
3k views

Criteria for a language to be considered “object oriented”

I had a discussion about OO programming today and by browsing the internet I found a lot of different specifications for object oriented languages. What are the requirements for a language to be ...
1
vote
3answers
512 views

Extra class for writing data to some backend?

What is the common practice to write classes which take some data class and store it to some backend? In my case I have table classes (columns, headers, etc.) which are written to Excel. So I have a ...
3
votes
1answer
581 views

Which one is a better practice a static factory method of the same class or a separate factory class with methods?

I have seen this at many places. a Parent class has a static method to create objects of the right subclass and at times we have a dedicated factory class with instance methods to create object of ...
2
votes
2answers
179 views

design for supporting entities with images

I have multiple entities like Hotels, Destination Cities etc which can contain images. The way I have my system setup right now is, I think of all the images belonging to this universal set (a table ...
2
votes
4answers
2k views

Looking for a better Factory pattern (Java)

After doing a rough sketch of a high level object model, I am doing iterative TDD, and letting the other objects emerge as a refactoring of the code (as it increases in complexity). (That whole ...
8
votes
2answers
3k views

Should we do entity-relationship modeling or object-oriented modeling first?

When building an application from scratch, should I start with the object-oriented (OO) model or the entity-relationship (ER) model?
12
votes
3answers
2k views

Why should we preferably use first class collections?

As per rule number 4 of Object Calisthenics by Jeff Bay (RTF) in The ThoughtWorks Anthology, it is recommended that one should "Use first-class collections". Rule 4: First class collections ...
3
votes
4answers
3k views

What are the most important OO skills to show off in the job hunt? [closed]

I am in the market for new employment, and found a position were they asked me to create a programming sample based off an assignment. I blew the sample trying to get it done quickly one night, and ...
4
votes
2answers
273 views

Help needed with class design and structure

This question is mostly about the best way to approach this problem. Any input is appreciated. The Problem In my application i need to send some data to a number of different destinations (we will ...
1
vote
4answers
3k views

About shared (static) Members and its behavior

I just realized that I can access shared members from instances of classes (probably this is not correct, but compile and run), and also learn/discover that, I can modify shared members, then create a ...
43
votes
20answers
11k views

Does Object Oriented Programming Really Model The Real World? [closed]

I've seen it commonly repeated the object oriented programming is based on modelling the real world, but is it? It seems to me that is not true of anything outside of the business layer. My GUI ...
1
vote
1answer
421 views

Is Rule 9 of Object Calisthenics applicable in Objective C?

Rule 9 in Object Calisthenics by Jeff Bay (RTF) is: Rule 9: No getters/setters/properties The last sentence of the previous rule leads almost directly to this rule. If your objects are now ...
16
votes
8answers
2k views

A Class named Class?

This is more of a style question, but it is something I am currently pondering for a project of mine. Assume that you're creating an application which is modeling a school. So there are entities like ...
24
votes
5answers
8k views

should I throw exception from constructor?

I know I can throw exception from constructor in PHP but should I do it? For example, if a parameter's value is not as I expected it. Or should I defer throwing an exception till a method is invoked. ...
0
votes
2answers
612 views

Is this bad design for a Shape interface?

I'm creating a vector editing program in C++, and I need a Shape interface which other concrete classes will implement. There is a requirement that no implementation inheritance is allowed. The design ...
9
votes
7answers
2k views

Checking if a method returns false: assign result to temporary variable, or put method invocation directly in conditional?

Is it a good practice to call a method that returns true or false values in an if statement? Something like this: private void VerifyAccount() { if (!ValidateCredentials(txtUser.Text, ...
4
votes
2answers
4k views

Is this a proper implementation of an iOS MVC pattern?

After browsing the apple docs, I came across this sample of their MVC pattern: Using NSNotificationCenter and without using KVO, would this diagram below represent a correct implementation of the ...
2
votes
1answer
3k views

Object orientated data structures in database driven applications

I've started working for a company that maintains a small/medium sized commercial website. The website is written in c# asp.net, and uses SQL Server as a database. The structure of the code is very ...
5
votes
2answers
4k views

Why multiple calls to same classes' Constructor from within a Constructor wouldn't work?

Please have a look at following snippet: public class Foo { int digit; String name; Foo (int d, String n) { this(d); // cannot do following. //compile-time error: Constructor call must ...
3
votes
2answers
900 views

Using Map in Java (or other strongly-typed languages) to work with unstructured data

After looking at the core data type for frameworks that deal with unstructured data in java: json java library: JsonObject Mongodb java api: BasicBSONObject SolrJ (Solr java client): SolrDocument ...
8
votes
6answers
915 views

Static functions vs classes

Let's say that I want to build some utility functions to do some basic maths with the BigDecimals, for example I want to have a function that computes the average of a List<BigDecimal>. What is ...
4
votes
1answer
694 views

Rewriting a Procedural PHP App - Should we use a framework?

We have an app that's currently only got about 120 users. The userbase will probably grow by 50% over the next 12 months - but we're going to have to separate storage etc. because we're looking at ...
19
votes
4answers
6k views

How should I add functionality to an object that already exists?

I have an interface that has a certain amount of well-defined functionality. Let's say: interface BakeryInterface { public function createCookies(); public function createIceCream(); } This ...
6
votes
3answers
6k views

When is method overloading appropriate?

Suppose I am working on an existing, reasonably large system. I have an object, myObject of class MyClass (for the example's sake, suppose I'm working in Java). myObject is a composition containing a ...
67
votes
12answers
11k views

New to TDD. Should I avoid private methods now?

I'm just now learning TDD. It's my understanding that private methods are untestable and shouldn't be worried about because the public API will provide enough information for verifying an object's ...
5
votes
3answers
514 views

Is there a specific term for an accessor method that returns a boolean value?

I seem to recall that there is a specific term for an accessor method that returns a Boolean value but it escapes me. For example: typical methods such as: class Example { bool isDirty(); ...
4
votes
2answers
515 views

Program more professionally (planning, notation, …) [closed]

I program a data-analysis framework for my company (20000LOCs by now). There are 2 programmers who help writing individual module for interfaces I have predefined. So far I haven't used much planning ...
70
votes
14answers
28k views

What is the ideal length of a method for you? [closed]

In object-oriented programming, there is of course no exact rule on the maximum length of a method , but I still found these two quotes somewhat contradicting each other, so I would like to hear what ...
3
votes
5answers
708 views

Using XML field Vs. creating a table for unstable organization

I am in the middle of design an application to issue and store invoices for an organization. The problem is the organization is not stable at all. There are many types of invoices and they may ...
0
votes
3answers
173 views

Roadblock-confused about structure of program

I'm new to programming, and I'm working in C. I know that this is structured programming but if I use blocks, say for local variables: { int i; for(i=0; i<25; i++){ printf("testing...\n"); ...
10
votes
4answers
739 views

What's wrong in returning hashtable from public method and when does it make sense to do so?

What are the design problems in returning a hashtable from a public method when you want to return multiple items instead of creating a class and returning object of that? If it does have problems ...
10
votes
7answers
3k views

What are the features required for Object Orientation?

I am just wondering, what exactly are the features a language or a library must provide in order for it to be defined as 'Object Oriented'. Is Object Orientation something that can, more or less, be ...
13
votes
4answers
10k views

How did you get good practices for your OOP designs?

I realized I have a difficulty creating OOP designs. I spent many time deciding if this property is correctly set it to X class. For example, this is a post which has a few days: ...
6
votes
3answers
4k views

Should I use friend classes in C++ to allow access to hidden members?

Here is my situation (a simple example). Say I have a class called HiddenData Then I have another class called StoreHiddenData And finaly a class called OperateHiddenData Here's the thing, my ...
6
votes
4answers
850 views

Object-oriented design question

I am using a class through a dll to which I do not have direct control. So in effect, I am only a client of this class. The class represents a form that can be printed, sent to clients and tracked ...