
- Forum
- Testing
- Software Patterns
- General Question!
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 ...
-
07-28-2005, 10:38 AM #1Joerg Simon Guest
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
-
08-23-2005, 03:44 AM #2Nick Malik [Microsoft] Guest
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.
--

Reply With Quote





