Exforsys

Online Training

General Question!

This is a discussion on General Question! within the Software Patterns forums, part of the Testing category; Hi! I have one general question. The question I ask is because I just have some basic understanding of patterns (...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-28-2005, 11:38 AM
Joerg Simon
Guest
 
Posts: n/a
General Question!

Hi!

I have one general question.
The question I ask is because I just have some basic understanding of
patterns (I just know Singelton, Factory, Builder and Command) and not
sooo much time... [like ever...]

I need to build a prototype for a software for visualization. Generally
we visualize graphs. One Person is currently working on getting a
software-representation of some data in form of graphs, then he should
give that intermediate represenation of the graphs to the UI, which
visualizes that. However there is too a communication in both directions
between UI and intermediate represenstion (the model ).
This communication is in form of configuration settings from the UI
which affects the modell and in form of the modell changing itself
(which has to be communicated to the UI and the whole visual part).

The Question:
o What is the common solution for such a problem, and where to I find an
example?
o At wich Patterns shuld I look at? I have the GoF Book, so I can
possibly find them there.

Thanks for any reply!
Yours,
Jörg Simon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-23-2005, 04:44 AM
Nick Malik [Microsoft]
Guest
 
Posts: n/a
Re: General Question!

Hello Joerg,

>
> I need to build a prototype for a software for visualization. Generally we
> visualize graphs. One Person is currently working on getting a
> software-representation of some data in form of graphs, then he should
> give that intermediate represenation of the graphs to the UI, which
> visualizes that. However there is too a communication in both directions
> between UI and intermediate represenstion (the model ).
> This communication is in form of configuration settings from the UI which
> affects the modell and in form of the modell changing itself (which has to
> be communicated to the UI and the whole visual part).
>
> The Question:
> o What is the common solution for such a problem, and where to I find an
> example?



Normally, the model is not aware of how an item is to be displayed. I find
your problem a bit perplexing.

However, it is perfectly appropriate for an object to be interpreted
differently based upon dynamic data settings. Look at the decorator pattern
to see if the model can be decorated with functionality that is derived from
the configuation settings before you attempt to display the data using the
view.

You can also consider the command pattern, since it allows the view to hold
it's own configuration while the data calls are actually made in the command
processor (the controller object in the MVC pattern).

You could also use an observer pattern if you want to inform the model when
information in the view changes which could affect the way that the model
data should be represented.

Without more details, I cannot help more.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.