I am trying to achieve Model-view separation. My airplane is a class. While developing the application, can't I use the console as sort of viewer. Can I spawn the airplane on it's own thread, while the console makes references to the airplane object to retrieve/read it's current altitude. I am trying to make the airplane an Active object, as in Java's runnable interface. How do you achieve this in .NET?
+1
A:
Hey Berlioz...
Assuming that by model view separation you mean something like this, then it is definately possible.
The challenge I would see in using the console as the viewer technology would be replicating the standard application message loop that occurs in a typical windows project.
But other than that, definately possible. Is there any specific reason why you want to use the console as the viewer? I would just go the WPF route personally, so I am interested to see what your motivation for the console approach would be?
Mark Pearl
2009-12-19 09:21:52
Just for simplicity sake. So I don't have to learn WPF just yet. I wanted to learn delegates and events and thought that an airplane could provide the notions of events surrounding the ascent and descent of it's flight path.
Berlioz
2010-04-08 03:57:30