Have a interface
class abc {
public:
virtual int foo() = 0;
...
}
class concrete1: public abc {
public:
int foo() {
..
}
class concrete2 : public abc {
public:
int foo() {
..
}
}
Now in my main program I need to construct classes based upon a value of a variable
abc *a;
if (var == 1)
a = new concrete1();
else
a...
After some years of experience in the field, it seems to me that the Factory pattern is one of the less interesting and useful patterns around when not writing frameworks or libraries.
I'm not saying that Factory pattern is unnecessary. For example, the W3C Document interface serves as a factory for various XML nodes (elements, attribut...
Currently I am designing a new website and I want to plan it properly.
The main page consists of a Top Content (Header including logo etc) The body with the menu on the left and obviously the footer at the end of the page.
In the menu I have 50 pages and I want to change ONLY the body content of it.
It is not worth it to replicate all...
Can you describe the pros and cons of including an OID (typically a database row identifier) in a POJO representing an entity in your model?
In fact I'm not talking about issues related to equals/hashcode and so on, I should have described better my problem (my bad :) )...
We've got some of those entity classes which represent business...
In working with objects and interfaces what is the best practice for writing to the database? There is a plethora of opinions regarding the object design but I am unclear about the database end. A simple example:
Suppose a Contact base class that contains the common fields such as contact name (Bill, Fred, Sally) and a location (home, ...
I am thinking about offering two versions for my web application product:
Software As a Service, where people
access my applications via a URL
Download version. They can download
my web app and host it themselves on
their web server.
An example for this business model is FogBugz.
Question: How to design my web application so that i...
I want to load content via the jquery load function however inside the page that is loaded i have other links which I want to load over the top of the previously loaded content.
see the link below for a simple example of what I am trying to achieve but it does not work however. Any pointers/tips would be amazing.
cheers
http://pastebi...
Hi All,
Can anyone tell the reasons for choosing a particular programming language over others for a project. I mean does this thought cross the minds at the design phases of a project, or all this stuff is just theoretical, and in reality people use whatever languages they are conversant with?
Thanks
Aman Jain
...
If my app has been tested in Firefox 3, Safari 3 & IE 7 will it need additional testing for Chrome?
If there are areas that'll need further testing -- then are there any online guides I could share with my designers & developers?
At what point will Chrome be considered to have sufficient market share to be treated as a mainstream brows...
I have the following use case , lot of code which was tightly coupled on a concrete type (say Concrete1). Later figured out the concrete type needs to be changed, so defined an interface . E.g
Class ABC {
virtual int foo() = 0;
virtual int getType() = 0;
}
class Concrete1 : public ABC {
int foo() {
... }
int getType() ...
Let's say you have a form with a component that displays data from a view on an SQL server. The component would be something like a ListView or DataGrid - basically something that can display the data in a 2D grid format. Another application changes the data that the SQL view describes, and does this regularly but at undefined intervals....
Can anyone suggest a good reason to use web services instead of RPC (not xml-rpc) as a comms channel between two C++ processes both of which will be developed by the same team? Note: Web services do not guarantee ordered delivery!
...
Speed and learnability do not directly fight each other, but it seems easy enough to design such a GUI that lacks either (or both) of them. GUI designers seem to prefer 'easy to learn' most of the time even when 'fast to apply' would be wiser.
There's only few UI concepts or programs that are weighted towards maximizing the peak efficie...
I've never written functional specs, I prefer to jump into the code and design things as I go. So far its worked fine, but for a recent personal project I'm writing out some specs which describe all the features of the product, and how it should 'work' without going into details of how it will be implemented, and I'm finding it very valu...
This question is language agnostic but I am a C# guy so I use the term POCO to mean an object that only preforms data storage, usually using getter and setter fields.
I just reworked my Domain Model to be super-duper POCO and am left with a couple of concerns regarding how to ensure that the property values make sense witin the domain. ...
Hi,
What's the best book on designing pretty GUI for .NET applications? like Windows Vista style?
Thank you.
...
For a Website I'm developing, I will need to create some graphics. I haven't yet locked in sizes so I didn't want to generate image files (PNG, GIF, JPG) directly in case I change my mind after I get further along with layout and UI to see what works and what doesn't.
This got me thinking: perhaps I should generate them as vector graph...
I want to create a simple logo and the the logo I have in mind will be a stylized 3D model with "iconic" lighting (front, left, even). The 3D model itself can be defined as a collection of geometric shapes. Programming is more my thing than design so I'm looking for advice on easy-to-use tools to create my 3D model and then create a lo...
I've started learning Perl but most of my former programming experience has been in languages that emphasize object oriented programming such as C# and Java. All the Perl examples I have found tend to be long single function programs and I find my self writing code the same way. Are there any resources or tutorials for writing maintainab...
I got to thinking about font (typeface) selection today. A site I did for work came with this professsionally done style guide that detailed colour selection, font selection, spacing, etc. It's the first time I'd seen anything like that but I have to admit, what they'd chosen did look good.
Now I've previously read about colour theory...