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.
Best way to load application settings
A simple way to keep the settings of a Java application is represented by a text file with “.properties” extension containing the identifier of each setting associated with a specific value (this value may be a number, string, date, etc..). C# uses a similar approach, but the text file must be named “App.config”. In both cases, in source code you must initialize a specific class for reading settings: this class has a method that returns the value (as string) associated with the specified setting identifier.
Object-Oriented Design: What to do when responsibility of the class is big
I applied principles of the GRASP and ended up having a class called Environment.
This class’s responsibilities are to:
How to use the unit of work and repository patterns in a service oriented enviroment
I’ve created an application framework using the unit of work and repository patterns for it’s data layer. Data consumer layers such as presentation depend on the data layer design. For example a CRUD abstract form has a dependency to a repository (IRepository).
Dealing with units in arithmetic operations (multiplication and division)
I need to design a function to perform the basic arithmetic operations that are addition (+)
, subtraction (-)
, multiplication (x)
, and division (/)
between 2 numbers.
Build filter conditions for entities on client side
I have the requirement that users should be able to specify filter conditions for one kind of entity through a GUI on a thin client. These conditions must be
Would this be considered dependency injection? [closed]
Closed 12 years ago.
When designing an enterprise API, what level is appropriate for separating libraries?
Assume we are developing a REST system for an enterprise company to expose the companies resources in a Java based application. Ultimately you have one web application, and domain libraries. My question is to where components and services should live in these domain libraries and what should exist in the application itself.
Low Coupling: Single Responsibility Principle vs Cohesion
I’ve read several articles on SRP and cohesion, and they seem to contradict each other as far as low coupling is concerned.
How essential is it to make a service layer?
I started building an app in 3 layers (DAL, BL, UI) [it mainly handles CRM, some sales reports and inventory].