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

Design and Architecture

 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Wauna18-Apr-08 3:39
Wauna18-Apr-08 3:39 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
ghle18-Apr-08 3:52
ghle18-Apr-08 3:52 
JokeRe: Design Coaching Needed - I'm in over my head Pin
ghle18-Apr-08 4:06
ghle18-Apr-08 4:06 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Wauna18-Apr-08 4:35
Wauna18-Apr-08 4:35 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Wauna18-Apr-08 4:38
Wauna18-Apr-08 4:38 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Pete O'Hanlon18-Apr-08 4:54
mvePete O'Hanlon18-Apr-08 4:54 
AnswerRe: Design Coaching Needed - I'm in over my head Pin
RiskFactor23-May-08 4:57
RiskFactor23-May-08 4:57 
GeneralUI creation patterns Pin
martin_hughes11-Apr-08 6:31
martin_hughes11-Apr-08 6:31 
The last couple of days I have been recreating Pong in Silverlight. The reasons for this are threefold:

1) I'm on holiday, and have little better to do (well, actually I have lots better to do, but no motivation to do them).
2) I wanted to play around with the Silverlight 2.0 beta
3) I wanted to investigate a UI pattern, so I picked on MVP although I realise now it has been deprecated.

All-in-all the process was extremely easy, despite a few quirks in the SL 2.0 beta, however one issue popped up related to MVP - possibly due to my naivety - which I thought I'd run past you folks.

In a business application that collects various data from various textboxes and other controls the model and the view can be cleanly separated via the presenter as the way in which the data are displayed is unimportant to the model, and the way in which the data is handled by the model is unimportant to the view.

Whilst some of this holds true for my Pong game I found - naivety again? - that there exists a coupling between the view and the model. This in my mind is because the objects involved - bat, ball etc. - do not hold data themselves as a textbox would, but because the model holds data about the position and size of these objects.

Quick aside: The reason this situation occurred is because I drew the court etc. in Expression Blend first and then came to the coding in a simulated designer + programmer type environment.

Now I could take this up a level and say well the Canvas - ie the court the game is played on - contains these objects and it should be relatively trivial, except that we might reasonably want to change the size of court and again we run into the same issues of that dependency existing between the model and the view.

By now I'm thinking whilst MVP is a powerful technique - and offered a number of benefits, including the removal of all game logic from the view - it needs tweaking for this problem domain.

So basically I think what I'm looking for is either a method of defining the game elements from the model and building the UI on the fly - which completely does away with the idea of Expression Blend, graphic designers and arty-types, or a sensible approach to sending the details of the UI (court size, ball size, bat size and position &tc.) into the model without creating a huge dependency between the two... thinking about it, this second could quite easily be accomplished by the Presenter, couldn't it - but would that create another dependency issue, or would having a SilverlightPongPresenter tied to Silverlight (and maybe a WinformsPongPresenter and a...) which implements IPongPresenter be acceptable?

/me Goes off to fiddle.
GeneralRe: UI creation patterns Pin
Oakman17-Apr-08 12:58
Oakman17-Apr-08 12:58 
GeneralRe: UI creation patterns Pin
martin_hughes17-Apr-08 13:01
martin_hughes17-Apr-08 13:01 
GeneralRe: UI creation patterns Pin
Oakman17-Apr-08 13:06
Oakman17-Apr-08 13:06 
GeneralException Tolerance Pin
Brady Kelly10-Apr-08 22:33
Brady Kelly10-Apr-08 22:33 
GeneralRe: Exception Tolerance Pin
Pete O'Hanlon10-Apr-08 23:22
mvePete O'Hanlon10-Apr-08 23:22 
GeneralRe: Exception Tolerance Pin
Brady Kelly11-Apr-08 3:42
Brady Kelly11-Apr-08 3:42 
GeneralRe: Exception Tolerance Pin
Pete O'Hanlon11-Apr-08 4:33
mvePete O'Hanlon11-Apr-08 4:33 
GeneralRe: Exception Tolerance Pin
Brady Kelly11-Apr-08 4:59
Brady Kelly11-Apr-08 4:59 
GeneralRe: Exception Tolerance Pin
Pete O'Hanlon15-Apr-08 23:16
mvePete O'Hanlon15-Apr-08 23:16 
GeneralRe: Exception Tolerance Pin
PIEBALDconsult16-Apr-08 4:30
mvePIEBALDconsult16-Apr-08 4:30 
Questionhow to: Pass status information through tiers? Pin
theitmueller10-Apr-08 5:01
theitmueller10-Apr-08 5:01 
AnswerRe: how to: Pass status information through tiers? Pin
Luc Pattyn10-Apr-08 6:42
sitebuilderLuc Pattyn10-Apr-08 6:42 
AnswerRe: how to: Pass status information through tiers? Pin
Mark Churchill10-Apr-08 20:10
Mark Churchill10-Apr-08 20:10 
AnswerRe: how to: Pass status information through tiers? Pin
Member 9611-Apr-08 8:43
Member 9611-Apr-08 8:43 
AnswerRe: how to: Pass status information through tiers? Pin
Member 247162112-Apr-08 1:00
Member 247162112-Apr-08 1:00 
AnswerRe: how to: Pass status information through tiers? Pin
stavinski12-Apr-08 11:55
stavinski12-Apr-08 11:55 
AnswerRe: how to: Pass status information through tiers? Pin
Oakman17-Apr-08 14:10
Oakman17-Apr-08 14: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.