ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

strict separation of model and view in EE

October 30, 2007 3:01pm

Subscribe [0]
  • #1 / Oct 30, 2007 3:01pm

    vinividivici

    11 posts

    Hi there,

    I was reading a templating engine article (http://www.artima.com/weblogs/viewpost.jsp?thread=210724) and I was wondering whether a StringTemplate strict separation of model and view is possible within ExpressionEngine.  I’m trying to evaluate different CMSes and model/view coupling seems to be quite a problem for many frameworks.

    I’d appreciate any info on this.

  • #2 / Oct 30, 2007 3:42pm

    Paul Burdick

    480 posts

    Yes.  ExpressionEngine does not actually use an MVC pattern in how it creates a site and is a CMS and not a framework (our framework is CodeIgniter.  Instead it relies on three things to display a site.  Templates, Trigger Words, and Pages.

    In the Templates area are template groups and templates, so that they will show up on a site as index.php/template_group/template/, and you display content in those templates based off tags, so any content or data from the site can be displayed anywhere.

    Trigger Words apply to the Member and Forum module, where instead of tags in templates, there is a trigger word (index.php/forums/) that triggers the loading of the forum module or member module.  That is probably as close to MVC as EE gets at this time.

    And then, there are Pages.  Where you can specify a URI and it will redirect to any template and display a single entry.  (index.php/personal/about/me/cool_dude/)

  • #3 / Oct 30, 2007 3:42pm

    Derek Allard

    3168 posts

    Hi vinividivici.  The EE view engine is primarily laid out in terms of “template groups” and “templates” which allows separation of view from logic to a degree, in the MVC style, but isn’t true “MVC”.  You can read about it in our userguide.

    If you want a more traditional MVC system, you may be interested in our open source PHP framework, http://www.codeigniter.com.

  • #4 / Oct 30, 2007 3:54pm

    vinividivici

    11 posts

    Hello Paul and Derek,

    Thank you for the rapid response.  This clears up EEs approach.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases