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

Design and Architecture

 
QuestionDownloading URLs with Python ?? Pin
Fuat Mx13-Dec-08 7:25
Fuat Mx13-Dec-08 7:25 
QuestionTDD, Mocks, and Isolating Legacy Application Components? Pin
Philip Laureano8-Dec-08 21:08
Philip Laureano8-Dec-08 21:08 
AnswerRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
led mike9-Dec-08 4:25
led mike9-Dec-08 4:25 
GeneralRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Urs Enzler16-Dec-08 8:49
Urs Enzler16-Dec-08 8:49 
AnswerRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Mark Churchill13-Dec-08 2:35
Mark Churchill13-Dec-08 2:35 
GeneralRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Philip Laureano13-Dec-08 3:24
Philip Laureano13-Dec-08 3:24 
GeneralRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Pete O'Hanlon16-Dec-08 10:07
mvePete O'Hanlon16-Dec-08 10:07 
GeneralRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Philip Laureano16-Dec-08 13:48
Philip Laureano16-Dec-08 13:48 
Pete O'Hanlon wrote:
Have you looked into Pex[^]? It's an interesting concept, to say the least.


From what I can tell, Pex looks like a brute-force solution to unit testing--it solves some of the coverage problems in TDD by attempting to quantify every possible input and output that might come out of a single method. There's two problems to this approach: 1) Observability, and 2) Isolating the component to be tested.

The first problem of observability has a lot to do with the software engineering equivalent of the Uncertainty Principle--how do you observe the behavior of an app without having to modify it? For example, if I wanted to test the DAL of a legacy app and that application has a tightly-coupled architecture, how do you verify the behavior of the DAL without modifying its architecture to support unit testing? With Pex, you can only test the components of an architecture if their behavior can be "observed" by the unit tests generated by Pex; however, in a legacy app, you might not have the luxury of modifying the architecture to support those unit tests.

The isolation problem rears its ugly head when you have legacy code that is ridden with "copy & paste" code. In order to use automated unit testing (much less Pex), you would have to refactor out the duplication and then mock out the components around the component to be tested, and then test the component itself. Once you have the component isolated, it is then (and only then) that you can throw Pex at it and have it do its brute-force approach to finding holes in your code.

The problem with using Pex with legacy apps is that the approach might be too invasive. In the current state of automated unit testing and TDD, this is akin to giving bypass surgery to a patient who just wants a medical checkup. What I want to do is diagnose the patient (per se) without killing them in the process. IMHO, we're practically in the Dark Ages when it comes to diagnosing legacy apps, and that has to change.

Do you know...LinFu?

AnswerRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Jon Rista6-Jan-09 6:37
Jon Rista6-Jan-09 6:37 
GeneralRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Pete O'Hanlon6-Jan-09 8:28
mvePete O'Hanlon6-Jan-09 8:28 
GeneralRe: TDD, Mocks, and Isolating Legacy Application Components? Pin
Jon Rista6-Jan-09 9:11
Jon Rista6-Jan-09 9:11 
QuestionHow this can be done in Atomic way? Pin
paresh_joe8-Dec-08 19:27
paresh_joe8-Dec-08 19:27 
GeneralRe: How this can be done in Atomic way? Pin
led mike9-Dec-08 4:30
led mike9-Dec-08 4:30 
AnswerRe: How this can be done in Atomic way? Pin
CodingYoshi10-Dec-08 3:44
CodingYoshi10-Dec-08 3:44 
GeneralRe: How this can be done in Atomic way? Pin
paresh_joe10-Dec-08 23:36
paresh_joe10-Dec-08 23:36 
GeneralRe: How this can be done in Atomic way? Pin
CodingYoshi11-Dec-08 3:34
CodingYoshi11-Dec-08 3:34 
AnswerRe: How this can be done in Atomic way? Pin
samdevloper8-Mar-09 19:18
samdevloper8-Mar-09 19:18 
GeneralRe: How this can be done in Atomic way? Pin
CodingYoshi11-Mar-09 18:27
CodingYoshi11-Mar-09 18:27 
GeneralRe: How this can be done in Atomic way? Pin
samdevloper5-Mar-09 2:50
samdevloper5-Mar-09 2:50 
AnswerRe: How this can be done in Atomic way? Pin
samdevloper9-Mar-09 2:37
samdevloper9-Mar-09 2:37 
AnswerRe: How this can be done in Atomic way? Pin
samdevloper9-Mar-09 2:38
samdevloper9-Mar-09 2:38 
GeneralRe: How this can be done in Atomic way? Pin
samdevloper5-Mar-09 2:48
samdevloper5-Mar-09 2:48 
QuestionInterprocess communication Pin
carlop()3-Dec-08 22:07
carlop()3-Dec-08 22:07 
AnswerRe: Interprocess communication Pin
Eddy Vluggen16-Dec-08 22:22
professionalEddy Vluggen16-Dec-08 22:22 
QuestionAssertion vs. Exception Pin
CodingYoshi3-Dec-08 11:32
CodingYoshi3-Dec-08 11:32 

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.