Click here to Skip to main content
16,009,643 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionDocument Management Syatem Pin
Odd Arne17-Nov-09 7:16
Odd Arne17-Nov-09 7:16 
AnswerRe: Document Management Syatem Pin
Sir Dot Net19-Nov-09 7:58
Sir Dot Net19-Nov-09 7:58 
AnswerRe: Document Management Syatem Pin
Robin_Roy2-Dec-09 18:42
Robin_Roy2-Dec-09 18:42 
AnswerRe: Document Management Syatem Pin
Eddy Vluggen6-Dec-09 2:11
professionalEddy Vluggen6-Dec-09 2:11 
AnswerRe: Document Management Syatem Pin
puri keemti7-Dec-09 0:34
puri keemti7-Dec-09 0:34 
AnswerRe: Document Management Syatem Pin
David Lario22-Jan-10 9:12
David Lario22-Jan-10 9:12 
QuestionDoes a developer need local administrator rights? Pin
Windswept13-Nov-09 21:55
Windswept13-Nov-09 21:55 
AnswerRe: Does a developer need local administrator rights? Pin
Pete O'Hanlon15-Nov-09 9:36
mvePete O'Hanlon15-Nov-09 9:36 
GeneralRe: Does a developer need local administrator rights? Pin
Windswept16-Nov-09 9:32
Windswept16-Nov-09 9:32 
AnswerRe: Does a developer need local administrator rights? Pin
Ian Shlasko16-Nov-09 10:41
Ian Shlasko16-Nov-09 10:41 
GeneralRe: Does a developer need local administrator rights? Pin
Windswept16-Nov-09 21:41
Windswept16-Nov-09 21:41 
GeneralRe: Does a developer need local administrator rights? Pin
Ian Shlasko17-Nov-09 3:32
Ian Shlasko17-Nov-09 3:32 
AnswerRe: Does a developer need local administrator rights? Pin
Sir Dot Net19-Nov-09 7:50
Sir Dot Net19-Nov-09 7:50 
AnswerRe: Does a developer need local administrator rights? [modified] Pin
Flint-Bear8-Dec-09 5:14
Flint-Bear8-Dec-09 5:14 
QuestionEmpty IEnumerable or null Pin
Gideon Engelberth10-Nov-09 9:19
Gideon Engelberth10-Nov-09 9:19 
AnswerRe: Empty IEnumerable or null Pin
Luc Pattyn10-Nov-09 13:36
sitebuilderLuc Pattyn10-Nov-09 13:36 
GeneralRe: Empty IEnumerable or null Pin
Gideon Engelberth16-Nov-09 5:21
Gideon Engelberth16-Nov-09 5:21 
AnswerRe: Empty IEnumerable or null Pin
David Skelly10-Nov-09 22:47
David Skelly10-Nov-09 22:47 
GeneralRe: Empty IEnumerable or null Pin
Gideon Engelberth16-Nov-09 5:22
Gideon Engelberth16-Nov-09 5:22 
QuestionRun to Completion Pin
Leslie Sanford4-Nov-09 13:51
Leslie Sanford4-Nov-09 13:51 
The concept of Run to Completion means, at least as it pertains to classes, that a method must run to its end before another method can be called on the same object. Adhering to this rule makes it easier to reason about a class's state.

I've often seen examples of this rule being broken or just ignored. How often does a class call one of its methods in the middle of another method? I've done this many times, and I've seen code authored by others do the same thing. As long as the method being called is read-only, I don't think RTC is being violated. But when it's a write method, I've wondered if this isn't an indication of a code smell.

I was looking at Sams Teach Yourself Object Oriented Programming in 21 Days. In the book is a step-by-step example of designing an object oriented blackjack game. Here's an excerpt of part of the code from that example:

// In the Player class
public void play(Dealer dealer)
{
    while(!isBusted() && hit())
    {
        dealer.hit(this);
    }
}

public void addCard(Card card)
{
    hand.addCard(card);
    notifyListeners();
}

public boolean isBusted()
{
    return hand.isBusted();
}

// In the Dealer class
public void hit(Player player)
{
    player.addCard(cards.dealUp());
}


There's a circular nature to this design which doesn't sit well with me. But setting that aside, what I want to get at is what the player class is up to in the play method. This method passes its instance to the Dealer which in turn calls the Players addCard method. This method adds a card to the player's hand. Back in the play method, the loop checks to see if the hand is busted. It's depending on the Dealer to make a change in its state elsewhere.

I don't know; maybe there's nothing wrong with this approach. It just seems fragmented to me. The play method is depending on state changes made via another method that it expects to be called while it (the play method) is still executing.

I'm not sure how I would approach this, but I was curious as to whether anyone else sees anything wrong with this.
QuestionWindows Service Pin
Archimedes2427-Oct-09 22:13
professionalArchimedes2427-Oct-09 22:13 
AnswerRe: Windows Service Pin
Covean27-Oct-09 23:07
Covean27-Oct-09 23:07 
AnswerRe: Windows Service Pin
Sir Dot Net19-Nov-09 8:01
Sir Dot Net19-Nov-09 8:01 
AnswerRe: Windows Service Pin
puri keemti7-Dec-09 0:39
puri keemti7-Dec-09 0:39 
QuestionUsing MSMQ along with BizTalk Pin
Member 188237827-Oct-09 9:18
Member 188237827-Oct-09 9:18 

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.