I'm refactoring one of my projects - a shopping cart. One of the tightly coupled areas of my code is the "Viewer" class - to generate information for the user to see, it often needs a combination of two or more of the following objects:
The store catalog.
The customer's order.
The customer's mailing information.
I can't really brea...
Hello,
Have a class Hero. Sometimes I need a deep copy (when all members are copied by value) of this class as a kind of some derived class:
class Hero
{
public:
// members, w/o getters/setters
public:
// Constructors
Hero();
Hero(...)
~Hero();
inline SuperHero* asSuperHero() {
...
Hi,
I'm writing a software that appears to be quite a lot more complex than I realized earlier. It performs several sub-tasks, has a set of entirely different tasks and integrates itself to other applications, modules and programming languages. There are hundreds of todo's I need to do, and everything seems a bit too complex to think st...
Dear all, which one is the best practice using C# and why?
1.
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
2.
public string Name { get; set; }
3.
protected string name;
public string Name
{
get { return name; }
set { name = value; }
}
4.
Please add ...
...
Suppose you have a class Foo with private member of type Bar. You don't want users to know that Foo's implementation contains a Bar and you don't want users to be able to create their own Bar and pass it through Foo's constructor, any other method, or a configuration file.
Edit: Bar is also problematic in that it accesses resources ...
Hello;
my company is thinking about implementing a new financial compliance trading application which is an application that would check all trades that would be executed by the company. A very simple check might be "Don't Invest in Stocks that sell Alcohol" for example.
We need to define a financial business object model and then d...
Small question about C# language design :))
If I had an interface like this:
interface IFoo {
int Value { get; set; }
}
It's possible to explicitly implement such interface using C# 3.0 auto-implemented properties:
sealed class Foo : IFoo {
int IFoo.Value { get; set; }
}
But if I had an event in the interface:
interface IFoo ...
I have to design a traffic database which includes data from different towns (8 towns) 2mb in a period of 10 min for each town 24h. The incoming data is the same for all Town. So my first question is what is better on the performance side: design one database for all towns with many tables (one table for each town) or design many databas...
Hi,
I'm working on my first project using an external supplier, who will develop some web services for the company I work for.
My question is - at what stage of the project lifecycle would you expect the WDSL (and any associated Schemas) to be delivered?
Personally, I think it's a service contract, so I wouldn't expect it to be unre...
Does anybody know of any free Web UI design software?
EDIT: I am looking for a UI mockup tool (that is freeware) to create stuff like this:
http://blogs.atlassian.com/jira/Mockups%20UI.jpg
I works a developer with the task to design the UI of an application. I want to draw some examples of how the webpages can look and show it to the r...
Whenever I create an abstract class I tend to create an interface to go along with it and have other code refer to the interface and not the abstract class. Usually when I don't create an interface to start with I regret it (such as having to override all implimented methods to stub the class for unit testing or later down the line new ...
How i must design my grails application? My business rules must be implemented only within services (with anemic domain classes, only with getters and setters) or must exist a consensus, putting domain business rules in domain classes and services?
...
I am re-reading Code Complete (Second Edition) since I read it in College. I got to the Second Chapter about the importance of metaphors and was curious what metaphor is/was most helpful to you in understanding software design/construction? I was looking for metaphors focused on Polymorphism, Inheritance, Encapsulation and Design Patter...
According to this post, there is a stretchable UIButton image that is red.
Does anyone have a green one? (My Photoshop skills are very poor.)
...
Hello all.
I have found myself responsible for carrying on the development of a system which I did not originally design and can't ask the original designers why certain design decisions were taken, as they are no longer here. I am a junior developer on design issues so didn't really know what to ask when I started on the project which...
Assume I have a feed of data ordered by an "ordering" field. This data is fed to a consumer via API, and the consumer caches it locally.
Now, let's say I correct a typo in an entry that has already been cached by the consumer, but need the consumer to pick it up. The content I'm feeding them is ordered by "ordering", and they won't be...
I am working on a project where I will have to regularly justify and explain my code and design decisions to team members who are not directly involved in the same area of the project as I am.
How can I best explain my technical design decisions to team members in a different location? Are code walkthroughs worth the time for team memb...
Hey guys,
I'm building a Volunteer Management System and I'm having some DB design issues:
To explain the process:
Volunteers can sign up for accounts. Volunteers report their hours to a project (each volunteer can have multiple projects). Volunteer supervisors are notified when a volunteers number of hours are close to some specified ...
I have a small community of members inside a forum. For the sake of entertainment, I a planning to introduce a small game based on reputations. The idea is that send updates to a user (X) about another user (Y) based on how much X ranks Y. This is just a fun game, but the way I thought of implementing it was in one of the following ways:...
This question was asked to me in MS interview. I wanna know the exact design issue in this piece of code. Code was already given, needed to find the design issue.
I have class MyHashMap which extends java HashMap class. In MyHashMap class I have to keep some information of employees. Key in this map will be firstName+lastName+Address...