Tagged Questions

Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem.

learn more… | top users | synonyms

3
votes
5answers
313 views

What can go wrong if Liskov substitution principle is not followed while coding?

I was following this highly voted question on possible violation of Liskov Substitution principle . I know what Liskov Substitution principle is but what is still not clear in my mind is what might ...
36
votes
5answers
1k views

Is this a violation of the Liskov Substitution Principle?

Say we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure ...
1
vote
1answer
54 views

Object behaviour or separate class?

When it comes to OO database access you see two common approaches - the first is to provide a class (say "Customer") with methods such as Retrieve(), Update(), Delete(), etc. The other is to keep the ...
26
votes
9answers
700 views

My proposed design is usually worse than my colleague's - how do I get better? [closed]

I have been programming for couple of years and am generally good when it comes to fixing problems and creating small-to-medium scripts, however, I'm generally not good at designing large scale ...
0
votes
2answers
154 views

How to avoid javascript becoming spaghetti code?

I've done quite a lot of javascript over the years and I'm using a more object-oriented approach, specifically with the module pattern. Which kind of approach do you do use to avoid a bigger code-base ...
1
vote
2answers
43 views

Making a design for a Problem [closed]

I have written many codes using OOPS and I am still to understand when is a code good enough to be accepted by experts. The thought procedure of every man is different and so is the design. My ...
1
vote
3answers
117 views

Any tips/tricks/resources on actually TEACHING a class on OOP? [closed]

I may slowly be getting into teaching an Object-Orientated Programming class at my school in a year or two. I just graduated and work at my school as an Application Programmer. I'd first start off as ...
2
votes
1answer
66 views

How can I design my classes to include calendar events stored in a database?

I'm developing a web calendar in php (using Symfony2) inspired by iCal for a project of mine. At this moment, I have two classes: a class "Calendar" and a class "CalendarCell". Here you are the two ...
2
votes
1answer
91 views

Finding the best practice for a game simulating tool

I'm studying Java right now, and I'm thinking of this tool as my practice project. The game is "League of Legends" in case anyone knows it, I'm not actually simulating the game as in simulating game ...
3
votes
1answer
81 views

The Meaning of Unified in UML

UML and other related modelling languages are exists in most of the system engineering fields to represent the system, flow, relations in a structured way. UML also is one of the modelling language ...
4
votes
3answers
173 views

What is a good design model for my new class?

I am a beginning programmer who, after trying to manage over 2000 lines of procedural php code, now has discovered the value of OOP. I have read a few books to get me up to speed on the beginning ...
16
votes
6answers
685 views

Should an object know its own ID?

obj.id seems fairly common and also seems to fall within the range of something an object could know about itself. I find myself asking why should my object know its own id? It doesn't seem to have a ...
9
votes
3answers
309 views

Where to put business logic in MVC design?

I have created a simple MVC java application that adds records through data forms to a database. my app collects data, it also validates it and stores it. This is because the data is being sourced ...
1
vote
1answer
80 views

design pattern advice: graph -> computation

I have a domain model, persisted in a database, which represents a graph. A graph consists of nodes (e.g. NodeTypeA, NodeTypeB) which are connected via branches. The two generic elements (nodes and ...
3
votes
1answer
139 views

Domain Models (PHP)

I have been programming in PHP for several years and have, in the past, adopted methods of my own to handle data within my applications. I have built my own MVC, in the past, and have a reasonable ...

1 2 3 4 5 7
15 30 50 per page