Click here to Skip to main content
15,888,286 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor2-Sep-11 3:27
Nilzor2-Sep-11 3:27 
GeneralRe: OO design: Copying data from class A to B Pin
GParkings2-Sep-11 4:16
GParkings2-Sep-11 4:16 
QuestionDifference between Generalization, Abstraction, Encapsulation? Pin
variantseeker19-Jan-11 15:58
variantseeker19-Jan-11 15:58 
AnswerRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Praveen Raghuvanshi19-Jan-11 22:23
professionalPraveen Raghuvanshi19-Jan-11 22:23 
GeneralRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Pravin Patil, Mumbai26-Jan-11 3:39
Pravin Patil, Mumbai26-Jan-11 3:39 
GeneralRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Praveen Raghuvanshi26-Jan-11 5:01
professionalPraveen Raghuvanshi26-Jan-11 5:01 
QuestionHow to package the Factory into separate component assembly? Pin
Chesnokov Yuriy17-Jan-11 20:26
professionalChesnokov Yuriy17-Jan-11 20:26 
AnswerRe: How to package the Factory into separate component assembly? Pin
dasblinkenlight18-Jan-11 4:21
dasblinkenlight18-Jan-11 4:21 
Although it's not stated directly, I assume that your question is about .NET (the word 'assembly' points in this direction).

We solved this problem by creating an extra level of methods around the instantiation points of implementation, like this:
C#
class DbFactory {
    public static InterfaceDb Make(string kind) {
        switch (kind) {
            case "xml": return MakeXmlDb();
            case "sql": return MakeSqlDb();
        }
        throw new ArgumentException("kind");
    }
    private static InterfaceDb MakeXmlDb() {
        return new XmlDb();
    }
    private static InterfaceDb MakeSqlDb() {
        return new SqlDb();
    }
}
This code does not throw an exception when the assembly with SqlDb is missing unless you call Make("sql"); calling Make("xml") runs fine as long as the assembly with the implementation is present.

Note: this functionally equivalent code does not work the same way:
C#
class DbFactory {
    public static InterfaceDb Make(string kind) {
        switch (kind) {
            case "xml": return new XmlDb();
            case "sql": return new SqlDb();
        }
        throw new ArgumentException("kind");
    }
}
This code requires both assemblies to be present.
QuestionVoting Functionality -- Incoming Traffic Pin
Civic0614-Jan-11 4:58
Civic0614-Jan-11 4:58 
AnswerRe: Voting Functionality -- Incoming Traffic Pin
Ray Cassick14-Jan-11 5:49
Ray Cassick14-Jan-11 5:49 
GeneralRe: Voting Functionality -- Incoming Traffic Pin
Civic0619-Jan-11 23:30
Civic0619-Jan-11 23:30 
GeneralRe: Voting Functionality -- Incoming Traffic Pin
Ray Cassick20-Jan-11 8:45
Ray Cassick20-Jan-11 8:45 
QuestionAny good sofwtare design software? Pin
venomation12-Jan-11 15:03
venomation12-Jan-11 15:03 
AnswerRe: Any good sofwtare design software? Pin
Pete O'Hanlon12-Jan-11 21:25
mvePete O'Hanlon12-Jan-11 21:25 
AnswerRe: Any good sofwtare design software? Pin
David Skelly12-Jan-11 22:23
David Skelly12-Jan-11 22:23 
AnswerRe: Any good sofwtare design software? Pin
Stefan_Lang4-Feb-11 0:43
Stefan_Lang4-Feb-11 0:43 
QuestionNeed Design Ideas Pin
Kevin Marois12-Jan-11 10:41
professionalKevin Marois12-Jan-11 10:41 
AnswerRe: Need Design Ideas Pin
Pete O'Hanlon12-Jan-11 21:24
mvePete O'Hanlon12-Jan-11 21:24 
AnswerRe: Need Design Ideas Pin
GParkings2-Sep-11 2:40
GParkings2-Sep-11 2:40 
QuestionApplication design code samples Pin
Chesnokov Yuriy12-Jan-11 4:29
professionalChesnokov Yuriy12-Jan-11 4:29 
AnswerRe: Application design code samples Pin
Eddy Vluggen12-Jan-11 4:52
professionalEddy Vluggen12-Jan-11 4:52 
AnswerRe: Application design code samples Pin
Kevin Marois12-Jan-11 5:54
professionalKevin Marois12-Jan-11 5:54 
QuestionSCRUM Pin
Civic0610-Jan-11 9:44
Civic0610-Jan-11 9:44 
AnswerRe: SCRUM Pin
Praveen Raghuvanshi10-Jan-11 17:47
professionalPraveen Raghuvanshi10-Jan-11 17:47 
GeneralRe: SCRUM Pin
Civic0611-Jan-11 2:10
Civic0611-Jan-11 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.