NON-GUI MVC Examples

T

Tim Smith

Dear All:

Will anyone please direct me to some solid samples of non-ui samples
implementations of the MVC design pattern in C++. TIA

Tim
 
P

Phlip

Tim said:
Will anyone please direct me to some solid samples of non-ui samples
implementations of the MVC design pattern in C++. TIA

Could you start with the Observer Pattern, from /Design Patterns/?
 
A

Andrew Au \(Newsgroup\)

Why do you want MVC for non-ui?
MVC is Model View Controller, V means ui.
 
P

Phlip

Andrew said:
Why do you want MVC for non-ui?
MVC is Model View Controller, V means ui.

A "Representation Layer" is a layer that converts one data format to
another, possibly including its event driving paradigm. So if some other
module "views" the view, then MVC could be a fat Representation Layer.

(I, too, can't think of a reason to do this. But it can be done!)
 
T

Tim Smith

V does not mean UI it means view, a mode or manner of looking at or
regarding something. I am looking for direction on how to decouple the way
data is presented from they way the data is stored. MVC is typically used
in UI contexts, but IMHO its not and exclusive UI pattern.
 
A

Andrew Au \(Newsgroup\)

Tim Smith said:
V does not mean UI it means view, a mode or manner of looking at or
regarding something. I am looking for direction on how to decouple the way
data is presented from they way the data is stored. MVC is typically used
in UI contexts, but IMHO its not and exclusive UI pattern.

Thanks for clarification. I knew V stands for view. Just somehow "view" is
too close to "UI" and is actually often interpreted as UI, therefore I make
such a claim. If view is after all another representation, then I personally
believe the MVC pattern do not help much if your purpose is to isolate data
storage from data presentation. You may want to look at something such as
Builder/Memento to separate the storage of data from the presentation of the
data. For example, you might want to have a Parser/Write (i.e. A builder) to
parse/write a XML file and represent the data as plain C++ object.
 
T

Tim Smith

The intent is to have a rather thin View that could be nested (MVCs on
MVCs). That is, the View is the Model of the next. Essentially, I am trying
to decouple along three different aspects. HTH
 
T

Tim Smith

Now the Observer is an enhancement to the MVC in that the views subscribe to
the controller?

(Sorry, fat fingered the post, didn't mean to reply to you!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top