hi
1) As far as I’m aware, each domain object instance ( at BLL layer ) should completely represent an element of the domain ( an employee, book, car etc ).
So what is an advantage of having two types of domain objects, say one type representing a particular forum and other type representing a thread(s) in that forum, over having ...
I'm not sure if there is a pattern that should be used here but here is the situation:
I have a number of concrete classes that implement an interface:
public interface IPerformAction
{
bool ShouldPerformAction();
void PerformAction();
}
I have another class that checks input to determine if ShouldPerformAction should be execut...
I have a problem about structures of the complex applications .Because my knowledge background does not come from education , i have had always problem about application's layers , design patterns and programing structures.First of all , I can do whatever I want with php , because I know common functions and I have experience with php. B...
I am developing a class library which will include the object Car.
The dilemma is, Car itself will be a class with fields such as Registration Number, and other general information on the car.
But a car has an engine, chassis, etc. These objects need to be modelled too. Should they be classes embedded within Car? If not, what is the us...
What is the right code pattern for NSNumberFormatter?
There are many example on the Internet (including this one: http://mac-objective-c.blogspot.com/2009/04/nsnumberformatter-some-examples.html) where the NSNumberFormatter is allocated and initialized each time it is needed.
Yet some other examples in the Apple Documentation (includi...
Hey,
I have been designing a site locally in PHP 5, but have come across a few design issues I'd like advice now.
Currently there are three features of the site and each feature has a class . These features are as follows :
a blog
a friends list
a set of images
I have a class for each but in each class I basically define a similar...
I am developing a "dumb" front-end, it's an AIR application that interacts with a "smart" LiveCycle server. There are currently about 20 request & response pairs for the application. For many reasons (testing, developing outside the corporate network, etc), we have several XML files of fake data, and if a certain configuration flag is se...
I'm currently writing a little C# library to simplify implementing little physical simulations/experiments.
The main component is a SimulationForm that runs a timer-loop internally and hides boilerplate-code from the user. The experiment itself will just be defined through three methods:
Init() (Initialize everything)
Render(Graphics ...
What OOP principles, if any, don't apply or apply differently in a dynamically typed environment as opposed to a statically-typed environment (for example Ruby vs C#)? This is not a call for a Static vs Dynamic debate, but rather I'd like to see whether there are accepted principles on either side of that divide that apply to one and not...
Anyone care to shed some light on why UITableView makes so many repeat calls to its delegate & datasource as it's being setup? Just looking at one I'm working on now I see that numberOfSectionsInTableView is called 3 times and then viewForHeaderInSection cycles through 3 more times for each section (I have 2 sections so total of 6 times ...
Hello.
Part of our core product is a website CMS which makes use of various page widgets. These widgets are responsible for displaying content, listing products, handling event registration, etc. Each widget is represented by class which derives from the base widget class. When rendering a page the server grabs the page's widget from th...
I'm looking to improve the standard of my javascript as I'm moving beyond simple AJAX forms towards much richer interactions and it's quickly getting out of hand.
There's lots of resources about how to write proper javascript, many of the best are from Douglas Crockford, but very little about relevant design patterns and how to implemen...
I'm working on a PHP application, and I'd like to add access control to some of my objects. I didn't tag this question as PHP, as I feel this question is not language specific.
Say I have a 'Service class'
abstract class Service {
}
Many services use this as a baseclass. One pseudo example would be:
class Companies extends Servic...
Hi all,
So this question is a sort of follow on from here (http://stackoverflow.com/questions/1914097/how-to-deal-with-multiple-event-args). That question led me onto thinking about this but is different enough to warrant its own thread.
I am creating a game (for fun and learning purpose) and would like to know if I am using good sta...
i am a newbie to the design patterns and here is my question
if we have an abstract class with few classes that implement it and each of this classes has different attributes.
now i have another (Manager class) that holds an array of the abstract class and i want to put a search method in it ... how can i do that without casting to the...
Hello all,
We are creating a system in Ruby on Rails and we want to be able to offer our users a bit of control about notifications and actions that can take place when some pre-defined trigger occurs. In addition, we plan on iterating through imported data and allowing our users to configure some actions and triggers based on that data...
Hi everyone:
Just assume I have some class Foo, that has two dependencies: an ISerializer and an IFileAccessHandler.
Now this class also has other depedencies, functional dependencies. I don't want anyone instantiating this class in an invalid state, so I'd also need to pass a domain object in the constructor.
But how can I have tha...
Here's a specific problem that I run into when creating objects, such as collections, that need to be available through the whole scope of the application.
I have the following class:
class UserDataCollection
{
List<UserData> Collection = new List<UserData>();
UserData current;
public UserData Current
...
Suppose I have two classes
class A
{
b bInstance;
public A ( b newb )
{
this.bInstance = newb;
}
}
class B
{
// some data and methods go here
}
class List<A>
{
// list of A objects also holding reference to a B object
}
For every one object of A, there is a related object B.
Now I want to do some op...
Could someone please explain MVC to me in Ruby on Rails, in layman terms. I am especially interested in understanding the Model in MVC (Can't get my head around the model)
Thank you in advance.
...