Overview
Features
Download
Documentation
Community
Add-Ons & Services
The POCO C++ Libraries Blog

Model View Controller

Filed under: Uncategorized by alex at 17:11

Prompted by Kai Londenberg’s post, I’ve decided to actually sit down and read Terence Parr’s papers.

As we all know, the MVC pattern is a classic, right? According to Parr’s articles, a vast majority of the modern incarnations claiming to be designed after it are actually blatantly violating it. In his paper, he fails to mention Google’s CTemplate, which is attempting something along his lines (I’m not quite clear whether CTemplate is actually used anywhere – the code is quite messy, but the idea behind it is sound). According to author, the StringTemplate is [quote] “a general purpose text generation engine with a functional language that strikes a balance between power and enforcement of model-view separation” [/quote].

From the theoretical standpoint, Parr appears to be right. I do not have any experience with StringTemplate or CTemplate to be able to make a valid judgment about practical use, but Parr has some good testimonials and few real world projects (jGuru and other web sites, ANTLR3) to back up his theory.
In any case, I have found the mentioned material very educational and definitely worth reading.

3 Comments »
  1. Apparently CTemplate is indeed used somewhere … at Google ;-) They say so here http://google-ctemplate.googlecode.com/svn/trunk/docs/howto.html
    Funny there was a time I was looking desperately for a templating system written in c++ and never got to this link; mainly because I didn’t use the right search terms it appears. Thanks for the link.

    Comment by paschal on February 14, 2007, 15:10

  2. Somehow, I did not expect the multi-billion$ web site to be running on top of something versioned 0.4. Also, as I mentioned, I was not at all impressed with the code appearance. But, what do you know – one learns as long as one lives.
    Here’s an attempt to do something similar in Javascript.

    Comment by alex on February 14, 2007, 21:43

  3. This might explain why many parts of Google are still labelled “beta” ;-) SCNR.
    They should be using POCO. That would be cool!

    Greetings from Embedded World in Nürnberg,

    Günter

    Comment by guenter on February 14, 2007, 22:22

RSS RSS feed for comments on this post. TrackBack URI

Leave a comment