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

  • SEARCH
  • Home
  • 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 86781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:18:00+00:00 2026-05-10T22:18:00+00:00

I’m in the process of extending and improving a website that has quite a

  • 0

I’m in the process of extending and improving a website that has quite a few structural problems. It looks very much like the developers before me had heard of MVC but didn’t understand the ideas of abstraction or modularity. So the MVC ‘framework’ is a) bespoke b) broken c) patched and d) there are several in use all at once. I intend to fix that.

This is not the first time I’ve re-built a site’s framework, BTW, but it is the first time I’ve had to fix an MVC framework. However, I’m coming up against some missing holes in the MVC knowledge here on SO.

The first is how closely programmers seem to tie their SQL database with their models. This doesn’t make sense to me: do programmers normally have the model looking after the data abstraction? (To me this is little better than putting SQL in raw PHP code.) Or is there a data access layer normally employed that ‘Does SQL’? I know from experience that the latter means the calling code doesn’t have to worry about where the data is, or how to get it or how to write it: the API handles that.

But what about the Models? Are they intended to be re-usable amongst different pages? Should they care about just where the data is stored? Shouldn’t they be more concerned with handling the logic between data-fetch and data-show (e.g. turning a contact’s group ID into a displayable name)? And data-save and data-write (e.g. figuring out how to turn $_POST values into savable data)?

Maybe the MVC model really be DMVC – Data-Model-View-Controller.

Lastly, although this is from a PHP point-of-view, how well do these concepts translate to a JSP site?

  • 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. 2026-05-10T22:18:00+00:00Added an answer on May 10, 2026 at 10:18 pm

    But what about the Models? Are they intended to be re-usable amongst different pages?

    Yes.

    Should they care about just where the data is stored?

    No. They need not know it. All this kinda information is necessary for persistence layer or data layer.

    Shouldn’t they be more concerned with handling the logic between data-fetch and data-show (e.g. turning a contact’s group ID into a displayable name)?

    No. They are just concerned about the business logic. Some usual application I have found the folks make the model dumb, just having attributes/properties and nothing else. The typical example in Java would be POJO, with getters/setters. We call them TOs (Transfer Objects), and use them everywhere, as a data holder. I am not really in the accord of this, IMO, there should be some methods, business related, which are appropriate and qualify to be in there. Don’t make it so dumb. The new Entity Beans (EJB3) are the good example of this.

    BTW, data show is the work of a presentation layer. In java JSP is the part of view technology.

    And data-save and data-write (e.g. figuring out how to turn $_POST values into savable data)?

    No. This is generally done in our controllers, most of the time using some utility classes.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I would like to run a str_replace or preg_replace which looks for certain words
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has

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.