Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6471043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:10:47+00:00 2026-05-25T06:10:47+00:00

If you follow the quickstart guide provided by the official Model-Glue docs, found here:

  • 0

If you follow the quickstart guide provided by the official Model-Glue docs, found here:

http://docs.model-glue.com/wiki/QuickStart/2%3AModellingourApplication#Quickstart2:ModelingourApplication

It will seem like the “model” is a class that performs an application operation. In this example, they created a Translator class that will translate a phrase into Pig Latin. It’s easy to infer from here that the program logic should also be “models”, such as database operation classes and HTML helpers.

However, I recently received an answer for a question I asked here about MVC:

Using MVC, how do I design the view so that it does not require knowledge of the variables being set by the controller?

In one of the answers, it was mentioned that the “model” in MVC should be an object that the controller populates with data, which is then passed to the view, and the view uses it as a strongly-typed object to render the data. This means that, for the Model-Glue example provided above, there should’ve been a translator controller, a translator view, a PigLatinTranslator class, and a Translation model that looks like this:

component Translation
{
    var TranslatedPhrase = "";
}

This controller will use it like this:

component TranslatorController
{
    public function Translate(string phrase)
    {
        var translator = new PigLatinTranslator();
        var translation = new Translation();
        translation.TranslatedPhrase = translator.Translate(phrase);

        event.setValue("translation", translation);
    }
}

And the view will render it like this:

<p>Your translated phrase was: #event.getValue("translation").TranslatedPhrase#</p>

In this case, the PigLatinTranslator is merely a class that resides somewhere, and cannot be considered a model, controller, or a view.

My question is, is ColdFusion Model-Glue’s model different than a MVC model? Or is the quickstart guide they provided a poor example of MVC, and the code I listed above the correct way of doing it? Or am I completely off course on all of this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:10:48+00:00Added an answer on May 25, 2026 at 6:10 am

    I think perhaps you’re getting bogged down in the specifics of implementation.

    My understanding of (general) MVC is as follows:

    • some work is needing to be done
    • the controller defines how that work is done, and how it is presented
    • the controller [does something] that ultimately invokes model processing to take place
    • the model processes handle all data processing: getting data from [somewhere], applying business logic, then putting the results [somewhere]
    • the controller then [does something] that ultimately invokes view processing to take place, and avails the view processing system of the data from the model
    • the view processes grab the data they’re expecting and presents that data some how.

    That’s purposely very abstract.

    I think the example in the MG docs implement this appropriately, although the example is pretty contrived. The controller calls the model which processes the data (an input is converted into an output), and then sets the result. The controller then calls the view which takes the data and displays it.

    I disagree with the premise of this question “Using MVC, how do I design the view so that it does not require knowledge of the variables being set by the controller?” The view should not care where the data comes from, it should just know what data it needs, and grab it from [somewhere]. There does need to be a convention in the system somewhere that the model puts the data to be used somewhere, and the view gets the data it needs from somewhere (otherwise how would it possibly work?); the decoupling is that model just puts the data where it’s been told, and the view just gets the data out from where it’s been told. The controller (or the convention of the MVC system in use) dictates how that is implemented. I don’t think MG is breaking any principles of MVC in the way it handles this.

    As far as this statement goes “In this case, the PigLatinTranslator is merely a class that resides somewhere, and cannot be considered a model, controller, or a view.” Well… yeah… all a model IS is some code. So PigLatinTranslator.cfc models the business logic here.

    And this one: “In one of the answers, it was mentioned that the “model” in MVC should be an object that the controller populates with data, which is then passed to the view”… I don’t think that is correct. The controller just wrangles which models and which views need to be called to fulfil the requirement, and possible interchanges data between them (although this could be done by convention, too). The controller doesn’t do data processing; it decides which data processing needs to be done.

    Lastly, I don’t think the “strongly-typed” commentary is relevant or an apporpriate consideration in a CF environment because CF is not strongly typed. That is a platform-specific consideration, and nothing to do with MVC principles.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

follow the link: http://code.google.com/p/google-api-java-client/wiki/Authentication There are 4 methods there, which are: 1. OAuth 1.0a
I follow the installation guide at http://golang.org/doc/install.html , at first everything goes well, but
i am making a sample program in hibernate follow this tutorial: http://www.myeclipseide.com/documentation/quickstarts/hibernateintroduction/ using reverse
I follow this tutorial to learn some REST services and AJAX calls: http://www.mkyong.com/webservices/jax-rs/integrate-jackson-with-resteasy/ I
Follow up on this post I made earlier on. I found out XML actually
I follow the wizard to create a http service to connect to a php
Follow up to this question . I have the following code: string[] names =
Follow up question from Multi-core usage, threads, thread-pools . Are threads moved from one
Follow up from: Directdraw: Rotate video stream I managed to preview the camera's video
Follow up to this question about GNU make : I've got a directory, flac

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.