Click here to Skip to main content
15,887,585 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Refactoring the code or dessign? Pin
fateme_developer30-Jun-08 22:57
fateme_developer30-Jun-08 22:57 
GeneralRe: Refactoring the code or dessign? Pin
led mike1-Jul-08 4:38
led mike1-Jul-08 4:38 
AnswerRe: Refactoring the code or dessign? Pin
Scott Dorman30-Jun-08 23:30
professionalScott Dorman30-Jun-08 23:30 
GeneralRe: Refactoring the code or dessign? Pin
led mike1-Jul-08 4:41
led mike1-Jul-08 4:41 
GeneralRe: Refactoring the code or dessign? Pin
Scott Dorman1-Jul-08 6:20
professionalScott Dorman1-Jul-08 6:20 
GeneralRe: Refactoring the code or dessign? Pin
led mike1-Jul-08 7:28
led mike1-Jul-08 7:28 
GeneralRe: Refactoring the code or dessign? Pin
dojohansen22-Jul-08 23:00
dojohansen22-Jul-08 23:00 
GeneralRe: Refactoring the code or dessign? Pin
led mike23-Jul-08 5:57
led mike23-Jul-08 5:57 
dojohansen wrote:
There are many cases where constructing unit tests would in itself represent a huge development effort


Therefore your conclusion is to not do it? OMG | :OMG: WTF | :WTF: That's going to make reading the rest of your post difficult, but I will try.

dojohansen wrote:
because intrinsic asp.net objects (request, response, session state, application state, httpserverutility) are used indiscriminately anywhere


Bad, bad design, period.

dojohansen wrote:
so to make a unit test for some business class you need to make mocks of these


No you don't, well you do apparently but I don't because I don't tightly couple business objects to ASP.NET intrinsics that are Presentation Layer objects. See Separation of Concerns[^], Isolation and Object Oriented Design Principles and Best Practices.

dojohansen wrote:
So I don't get it.


Clearly.

dojohansen wrote:
What would be the great benefit of developing tests to know that some code you're about to change works, when those tests cannot be reused to test the code after the changes?


Once again it's about how you Design your Unit Tests, it's about the cases, the cases should be able to be reused on the new Unit Test code you write for the new refactoring of things. This way you have the same test coverage of the new code as you did on the old code.

Final note: Avoiding work is NOT a valid excuse for not testing. If it were, software in general would be a lot worse quality than it already is. Wink | ;)


led mike

GeneralRe: Refactoring the code or dessign? Pin
dojohansen24-Jul-08 0:22
dojohansen24-Jul-08 0:22 
GeneralRe: Refactoring the code or dessign? Pin
led mike24-Jul-08 6:35
led mike24-Jul-08 6:35 
GeneralRe: Refactoring the code or dessign? Pin
Pete O'Hanlon24-Jul-08 8:45
mvePete O'Hanlon24-Jul-08 8:45 
GeneralRe: Refactoring the code or dessign? Pin
led mike24-Jul-08 8:58
led mike24-Jul-08 8:58 
GeneralRe: Refactoring the code or dessign? Pin
Pete O'Hanlon24-Jul-08 9:05
mvePete O'Hanlon24-Jul-08 9:05 
GeneralRe: Refactoring the code or dessign? Pin
led mike24-Jul-08 9:25
led mike24-Jul-08 9:25 
GeneralRe: Refactoring the code or dessign? Pin
Pete O'Hanlon24-Jul-08 9:42
mvePete O'Hanlon24-Jul-08 9:42 
GeneralRe: Refactoring the code or dessign? Pin
led mike24-Jul-08 10:18
led mike24-Jul-08 10:18 
GeneralRe: Refactoring the code or dessign? Pin
dojohansen25-Jul-08 2:04
dojohansen25-Jul-08 2:04 
GeneralRe: Refactoring the code or dessign? Pin
led mike25-Jul-08 4:46
led mike25-Jul-08 4:46 
GeneralRe: Refactoring the code or dessign? Pin
dojohansen25-Jul-08 4:53
dojohansen25-Jul-08 4:53 
GeneralRe: Refactoring the code or dessign? Pin
led mike25-Jul-08 5:18
led mike25-Jul-08 5:18 
GeneralException Handling in Desktop Application Pin
Brady Kelly25-Jun-08 2:54
Brady Kelly25-Jun-08 2:54 
GeneralRe: Exception Handling in Desktop Application Pin
Steven A. Lowe13-Sep-08 17:06
Steven A. Lowe13-Sep-08 17:06 
QuestionObject Composition Pin
Leslie Sanford24-Jun-08 17:27
Leslie Sanford24-Jun-08 17:27 
AnswerRe: Object Composition Pin
led mike25-Jun-08 4:30
led mike25-Jun-08 4:30 
GeneralNatural vs Surrogate Keys [modified*2] Pin
Brady Kelly20-Jun-08 10:15
Brady Kelly20-Jun-08 10:15 

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.