Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Measuring Effectiveness of a ParadigmmemberKenneth Haugland7 Oct '12 - 2:10 
I definitely think you are right. However I think its much more efficient way of designing the layout of an application than WinForms, not to mention the ease the design team were they now could do while you are constructing the code behind. That must have been a real nightmare in WinForms...
GeneralRe: Measuring Effectiveness of a Paradigmmember_Maxxx_7 Oct '12 - 2:51 
When you say "in the main windows class" are you talking the 'code behind' cs file of your view?
 
If so, be prepared to be flamed for having any code there at all!
MVVM# - See how I did MVVM my way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
 
.\\axxx
(That's an 'M')

GeneralRe: Measuring Effectiveness of a ParadigmmvpJohn Simmons / outlaw programmer7 Oct '12 - 4:41 
Yes, that's what I meant, and the code in that file merely kicks things off for a game. Everything else is handled in the view model, even the timer thread.
 
And I was correct about the timer code - there was no code added at all in the window.cs file.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

GeneralRe: Measuring Effectiveness of a ParadigmmemberJimmyRopes7 Oct '12 - 5:42 
John Simmons / outlaw programmer wrote:
the code in that file merely kicks things off for a game.

 
Old habits linger on. Sigh | :sigh:

The report of my death was an exaggeration - Mark Twain

Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes


GeneralRe: Measuring Effectiveness of a ParadigmmvpJohn Simmons / outlaw programmer7 Oct '12 - 6:30 
All it does is create the DataContext.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

GeneralRe: Measuring Effectiveness of a ParadigmmemberJimmyRopes7 Oct '12 - 12:24 
John Simmons / outlaw programmer wrote:
All it does is create the DataContext.

 
Like I said, old habits linger on.

The report of my death was an exaggeration - Mark Twain

Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes


GeneralRe: Measuring Effectiveness of a ParadigmmvpJohn Simmons / outlaw programmer8 Oct '12 - 0:51 
I really don't understand what your point is. When a user interface has controls that require interaction from the user, exactly HOW does one NOT put code in the cs file?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

GeneralRe: Measuring Effectiveness of a Paradigm [modified]memberJimmyRopes8 Oct '12 - 4:23 
Putting logic in the view violates the principle of separation of concerns and makes it impossible to write automated tests for that logic.
 
Of course you can still manually test that logic by interacting with the view, but I prefer to automate my testing before I write the code to accomplish the desired goal.
 
How to do it specifically should not be addressed in the lounge. Perhapse you should ask the question of how to accomplish this in another forum.

The report of my death was an exaggeration - Mark Twain

Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes



modified 8 Oct '12 - 10:35.

GeneralRe: Measuring Effectiveness of a ParadigmmemberBillWoodruff8 Oct '12 - 8:44 
Hi Khun Jimmy,
JimmyRopes wrote:
Putting logic in the view violates the principle of separation of concerns and makes it impossible to write automated tests for that logic.
I am curious about the above statement: the principle of "separation of concerns" has been around a long time in computer science, and has a meaning quite independent of MVC, MVVM "design philosophy."
Of course you can still manually test that logic ... snip ... How to do it specifically should not be addressed in the lounge. Perhapse you should ask the question of how to accomplish this in another forum.
How about you writing an article for CP that explains/demonstrates what you mean, and gives examples, demonstrating the value of what you advocate, and how it enables testing automation, etc. ?
 
best, Bill
~
Confused by Windows 8 ? This may help: [^] !

GeneralRe: Measuring Effectiveness of a ParadigmmemberJimmyRopes8 Oct '12 - 9:56 
Sa wat dii krap kuhn Bill;
 
BillWoodruff wrote:
I am curious about the above statement: the principle of "separation of concerns" has been around a long time in computer science, and has a meaning quite independent of MVC, MVVM "design philosophy."

 
Yes it has and has been incorporated, more recently, into MVC and MVVM. What I was trying to say was that if you code application logic into the view you will not be able to automate the testing of that logic.
 
I try to have test cases for all logic in the application so I can actively test to see that the code I write is implementing the specified application. Additionally, if I make changes to the application I can run the automated test suite to see if the change in fact worked and if it caused any unintended consequences (unadvertised features if you will).
 
I do admit that I need to mock the user input to accomplish this but it is better than manually testing through the UI as manual testing is sometimes NP Complete unless you follow a scripted test sequence religiously. More often than not a developer will just test to see that the logic just added works and not so much that all previous logic still functions properly.
 
BillWoodruff wrote:
How about you writing an article for CP that explains/demonstrates what you mean, and gives examples, demonstrating the value of what you advocate, and how it enables testing automation, etc. ?

 
I don't see that happening in the next year because I am under contractual agreement to not disclose information related to the work I do for the client, and am too busy to make up a project outside of work to use in an article.
 
My target date for giving it all up and moving back home is next year, ga ra ga daa khohm 2556. Maybe when I settle in at home I will have more time to write an article.

The report of my death was an exaggeration - Mark Twain

Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes


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


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 23 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid