Hello,
I am a little bit lost. I haven't got ideas for a new projects. If I get a task or already written specifications of project, then I can develop it from the scratch. But when I have to come with idea. I have none... How do developer should come with an idea? Maybe someone has a tactic or some great approaches to overcome this "lac...
I'm having some issues with my code. This is probably due to some design fault. I've tried several things. Here are two.
Issue: I have a 1 (lending) - N (contracts) relation. I'd like to call lending.current_contract which would return the last relevant contract.
Optimization is also an issue. I'd like to call :lending, :include => :con...
Dofactory has a 3.5 framework for developing software and includes some design patterns which are explained in a document. There's a sample app built using the framework which has user interfaces for WinForm, WPF, ASP.NET (WebForms), ASP.NET MVC, plus DAL's using Linq & ADO.NET which makes it a candidate for a learning tool and a framewo...
If a view needs to acces data from a model, do you think the controller should:
a) pass the model to the view
b) pass the data of the model to the view
c) neither; it shouldn't be the controllers concern. Let the view access the model directly to retrieve the data. Only let the controller give some parameters the view needs to filter th...
Consider an application that generates production plans (simplified code sample below) . There's a big list of products and we call product.GetProductionTime() many times while doing complex calculations in the production plan. We need product.GetProductionTime() to behave differently based on the planning algorithm we are using or the s...
Here at SO there's a lot of focus on designing web applications but I seem to be missing something in all these discussions. It seems as if everyone is focusing the design of their site to allow lots and lots of visitors to visit it, thus putting a huge strain on the server. But what if someone is designing a site just for friends and fa...
Is it possible to do DI without any third party tools? I've read about people doing it with an abstract class and interface before they discovered some DI framework. How is ID done in that very basic form?
...
There's lots of good material on Design Patterns out there that covers how you should be doing things; better know as...best practices.
What about the opposite though? Some times it can be more detrimental if you're doing things that are dangerous to stability, or unmaintaneable, or just plain wrong. So, are there any good books tha...
I tryed to create new components from one base Windows Form, also I found difficulties when I worked with toolstrip components, for example :
how to bind a datagrid.datasource on a child form using events from a button (clicks) on the parent toolstrip?
I have to use some snippets on each child form for doing this, btw why?
// btnSear...
I know from wikipedia for example that exception handling is used in an application to custom handle certain errors in a fail-safe manner. However, I'm not sure why in those cases in general the developer would want the user to experience the error to be reset in a fail-safe manner. The following is a pseudocode of what I'm doing (but I'...
What I'm looking right now is a set of classes derived from a common base class. Most, but not all, of the classes require some input parameters which are obtained through modal dialogs. Those dialogs are set up and executed in the constructor of the classes. As long as the dialog isn't finished, the object isn't constructed completely. ...
I am new to programming and am having difficulty with understanding object lifetime / instantiation.
I have a windows from with a datagridview and a panel.
The datagridview has a checkbox column and a list of names which is populated from a database.
The panel has a few text boxes (e.g. name, age, favourite sports team) and a 'save c...
I am creating a website and using Linq to SQl as a data access layer, and i am willing to make the website can work on both linq to sql and ado entity framework, without changing many things in the other layers: business logic layer or UI layer,
Whats the recommended pattern to achieve this goal? can you explain in brief how to do that...
Hi
I need to copy an object that has a pretty deep hierarchy of member variables (i.e., the object has several members of various types, each of which has several members of various types, etc.). Doing a deep copy would require implementing a clone() method in many classes, which seems overkill for my application.
The solution I've com...
Continuing on previous questions (here, and here), I implemented a basic command pattern, created my command classes and coded to an interface, so when any command is used, to call the execute() method.
However, I am still finding myself unable to shake those case statements: I am reading each character from a master/decision String, w...
I've already implemented, using macros, a C++ property system that satisfied the following requirements:
Property can be referenced using a integeral key
Property can be accessed via a generic Set/Get
Properties (and property keys) must be inheritable
Properties can be registered with getters/setters
and is implemented as follows
E...
Going through the mvc section at the chapter on compound pattern in the head first design pattern book, i came across the following thing that makes me uneasy. As per the description of mvc , model should have implementation of observer pattern and upon any change of its state it is supposed to notify all its observer of the event and as...
Hi Experts,
I am creating a web application which has a few management screens, where a user can go to edit records (for example, changing the contact details of a user). Access to these managements screens are controlled by roles, with multiple users possibly having access. The problem now arises of what to do if two users simultaneous...
The Holy Grail of programming is to solve a problem once and make continual reuse of that solution forevermore. And, yet, despite my best efforts I find that I am often reworking familiar problems. So GoF design patterns aside, there have been several times that I've designed calendaring, content management, and person/organization add...
My application uses a large amount of Panda objects. Each Panda has a list of Bamboo objects. This list does not change once the Panda is initialized (no Bamboo objects are added or removed). Currently, my class is implemented as follows:
class Panda
{
int a;
int b;
int _bambooCount;
Bamboo* _bamboo;
Panda (int c...