Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hierarchy]

The tag has no usage guidance.

0
votes
1answer
99 views

Express unique recursive task system

I would like to express a task as either itself or a container for other tasks (recursively). The problem is that each task has to be one of two fundamental types: a goal or a routine. And, children ...
1
vote
3answers
1k views

DDD: Is an aggregate root responsible for deleting its child entities from their repository?

I am developing a large software project using DDD (Domain-Driven Design). I have an entity that acts as an aggregate root, let's call it Root. This entity refers to a collection of child entities of ...
95
votes
12answers
16k views

My client wants 25% of comments in my current project, how to react? [closed]

junior developer here. I am currently working alone on a web application for a big client of my company. I started last month. The client wants at least 25% of comments in each of its software ...
1
vote
2answers
111 views

Abstract composition hierarchy with multiple implementations

I need to implement a class hierarchy and be able to implement it in multiple ways. I want to create a logical representation of a query language, and then be able to parse it to/from different ...
2
votes
2answers
409 views

WPF/C#: What is the accepted way for a lower level object to notify the UI?

Setting Let's take the following example: We have a series of entertaining events on the television with each lasting only an hour and this goes on for 3 weeks. We want to create a simple App that ...
1
vote
2answers
620 views

How to design the datamodel of nested categories connected to a note?

I am building a personal app to store my notes in. It is not a new concept, of course, but it is giving me a great project to learn Node.JS together with trying out a graph database: Neo4j. What I am ...
3
votes
4answers
94 views

Structure when I need multiple “copy” instances of a common base class?

So I'm building a card game where each card has cost, damage, and durability, as well as name and description. Obviously one would think of creating a Card class: class Card { int cost int ...
0
votes
1answer
52 views

How to organise tree of sub-classes which should interact?

I'm writing a trading framework in MQL and I'm confused how I should organise my class hierarchy. |-- Terminal (Log) | |-- Market | | |-- Chart | | | |-- Draw | |-- Account | | | |...
1
vote
0answers
53 views

Hierarchical data structure: pull requests + pull request reviews + pull request review comments

GitHub has: pull requests pull request reviews pull request review comments BitBucket has only: pull requests pull request comments So there are three kinds of objects. I write code ...
1
vote
0answers
118 views

Should all classes and interfaces ultimately derive from one Class, and how does this affect type safety?

If I have "Object" as the top level class, then I have various interfaces, ISomething, ISomethingB, ISomethingC, then I have Class x,y,z, all ultimately deriving from the class Object (these ...
0
votes
2answers
603 views

Designing Table To Store Hierarchy

I have a table Company and User like below... Company Table: CompanyID CompanyName etc... User Table: UserID Email UserType CompanyID etc... First I must tell you that, ...
1
vote
1answer
1k views

Managing permissions in hierarchical groups

I'm currently writing a web application for our small company which was originally just planned to organize appointments more efficiently by displaying our customer structure and automatically plan ...
3
votes
1answer
598 views

RESTful nested resources

I have a profile resource. Profiles can have a parent and an arbitrary number of child profiles. What's the best way to model this in a RESTful scenario? I thought of a number of different solutions,...
0
votes
1answer
66 views

Reflexive calls of objects in the same hierarchy

I am not sure how to phrase this. I believe this should have been asked somewhere, but I am unable to find it because I don't know the keywords. Basically, I have some types like this: interface Foo ...
1
vote
1answer
545 views

Data Storage Architecture: Storing Hierarchical Data (JSON/BSON)

Say you have the hierarchical storage concept of "Foo." "Foo" holds an id, various values, and zero to many "Foo." Obviously, in turn, the child elements can hold zero to many Foos. The data is purely ...
1
vote
3answers
478 views

How can one think of a relational schema in terms of storing it in a NoSQL database?

Recently I've been wanting to experiment with NoSQL databases, especially document store ones. After reading, I still don't understand how one might model information that is contained in a relational ...
1
vote
1answer
31 views

Approach for comparing versions of hierarchy

I'm looking for a language agnostic approach for the following. We are prototyping this in both relational and graph DBs, so, again I'm open to hearing all opinions with respect to those. Here is ...
6
votes
3answers
152 views

Handling retroactively adjusted data that is reported hierarchically

Several of our customers have come to us with an interesting problem that involves adjusting data that occurred in the past which is rolled up and reported based on an org hierarchy. For example: If ...
-1
votes
2answers
213 views

Per my design requirements, does this design hierarchy seem reasonable?

Background Construction Note that I am using C# here, but it may not be necessary to provide input to my conceptual questions about design. Consider the following design methodology... I work at a ...
0
votes
0answers
273 views

Hierarchies and Inter-process communication between microservices

I have an interesting problem. I have a micro-service which manages corporate hierarchy. A user in the hierarchy has permissions to nodes, which cascade down to children of those nodes. Now, the ...
7
votes
3answers
411 views

What would be a good approach to generate a tree of folders?

Say I have an array of strings, like this: var folders = new[] { "Foo", "Bar", "Foo\Bar" "Foo\Bar\Baz" }; And that I have an object that represents a folder - something like this: ...
16
votes
5answers
688 views

How to make a datatype for something that represents either itself or two other things

Background Here's the actual problem I'm working on: I want a way to represent cards in the card game Magic: The Gathering. Most cards in the game are normal-looking cards, but some of them are ...
0
votes
3answers
944 views

Multi inheritance in Java

Let's say I've got a generic java class Filter<InputType, OutputType> which receives an input object and transforms it to an output object. Now I've got two other classes (NoInputFilter<...
4
votes
3answers
2k views

Is this OOP class hierarchy too deep?

So I am making a Super Mario Bros NES clone in pygame and for all enemies that are drawn to the window, I have a class hierarchy that is 5 classes deep. Going in the order of: Object (A base class ...
6
votes
1answer
366 views

Should I always throw the most specific or should I try to generalize exception types?

Say you normally have FooException. /** * @throw FooException If Foo is invalid for searching. */ public bool exists(Foo a) But at some point you need to have two more specific exceptions for Foo. ...
0
votes
1answer
87 views

Where should I put (wrapper) scripts in my source tree? [closed]

I have this software package which installs itself to /usr/local/mypackge, with a bunch of subdirs. In bin/ I have linked code, as ELF executables, in /share/doc I have documents, etc. Now suppose I'...
8
votes
1answer
2k views

In MVC should a model contain subview models?

Some background: A colleague and myself have different interpretations of MVC which means, given the same problem, we are coming up with radically different solutions. He comes from a Java background ...
5
votes
3answers
981 views

Reducing dependency cycles and reducing coupling

I'm trying to learn how to produce quality object-oriented code and have been studying concepts like SOLID. I'm currently working on an entity-component-process system for a small game engine. ...
0
votes
0answers
102 views

How to structure my java packages [duplicate]

I have a Java library, quite a huge one. I'm asking regarding Best Practices of structuring the source. For example, the logging sybsystem: Option 1: All in one package, named to sort nicely Log - ...
0
votes
2answers
1k views

Is hierarchical product backlog a good idea in TFS 2012-2013?

I'd like to validate I'm not in the wrong way. My team project is using Visual Studio Scrum 2.x. Since each area/product has a lot of kind of requirements (security, user interface, HTTP/REST ...
3
votes
2answers
739 views

HMVC and Database Connections

Whilst I have good experience with OOP, I'm fairly new to the concept of (H)MVC. I understand the basic concept of modular design that comes with HMVC, it's the great attraction of it. But one thing ...
7
votes
2answers
544 views

Are there established algorithms for spacing out objects of unequal size?

I'm working on visualizing a hierarchy. There will be clusters of objects, each cluster containing rectangles of fixed width but variable height. I'd like to arrange these within a rectangular space ...
4
votes
2answers
157 views

Should package structure closely resemble class hierarchy?

Pretty simple question. Should package structure closely resemble class hierarchy? If so, how closely? Why or why not? For instance, let's say you've got class A and class B, plus class AFactory ...
-1
votes
1answer
130 views

How to write a program that diffs on hierarchy changes? [closed]

Why is it that diff programs work on a line-by-line basis instead of a hierarchal one? All code can be expressed in a hierarchy, even though it's not immediately apparent. Most of the data we work ...
1
vote
2answers
842 views

Scrum Master in the organization

I'm wondering how to set up the organization with Scrum Masters. I would prefer to see real examples of where the scrum masters are located in the organization's hierarchy and how report-to / chain-of-...
3
votes
1answer
2k views

How to organize my site's file system properly?

Doing some reading on Stack Overflow, I've found a lot of information suggesting that proper organization of a file system is crucial to a well-written web app. One of the key pieces of evidence is ...
5
votes
1answer
293 views

Contract / Project / Line-Item hierarchy design considerations

We currently have an application that allows users to create a Contract. A contract can have 1 or more Project. A project can have 0 or more sub-projects (which can have their own sub-projects, and so ...
14
votes
3answers
2k views

How can you tell whether to use Composite Pattern or a Tree Structure, or a third implementation?

I have two client types, an "Observer"-type and a "Subject"-type. They're both associated with a hierarchy of groups. The Observer will receive (calendar) data from the groups it is associated with ...
1
vote
1answer
477 views

How should the cppcms template hierarchy be used

I understand that the hierarchy, in cppcms for templates, goes skin (topmost, representing a namespace), then view (representing a class) and finally template (representing a function). I want to ...
1
vote
1answer
63 views

Can thesaurus items have more than one USE relation?

I want to model a Thesaurus using the ANSI/NISO standard relation description like "broader term", "narrow term", etc. (see this Wikipedia article for details). Is it valid for a Thesaurus item in ...
6
votes
2answers
1k views

Should exceptions of a subclass extend the superclass exceptions or my own namespace?

Our library extends another (third-party) library. When we create a child class in our library, and want to throw exceptions, should those exceptions extend the exceptions from the parent class or ...
3
votes
1answer
333 views

The usual metadata objects or: How to move a typical ExtJS App to jQuery, and: What's missing in the middle?

I have entered into an existing project that is all about maintaining nested data structures. You have companies which are assigend to accounts, and contacts and notes and... basically the usual bunch ...
2
votes
3answers
179 views

Separating the database, API, and the interface

Most of my projects start small. Many times I start with a web page (1 file) that has the code to... select stuff from the database => display it to the user and offer editing => receive the edits (...
2
votes
4answers
280 views

How can I make tagging work for the concept of “all”?

There's an approach to organising information that says that hierarchy is a tool of the devil, or at least is overrated. I've embraced this understanding for a data-driven site I'm working on which ...