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 5969303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:12:39+00:00 2026-05-22T20:12:39+00:00

this is a General Question about MVC .. I wrote a PHP Class that

  • 0

this is a General Question about MVC ..

I wrote a PHP Class that send an Array with Core JsonData Strings to Jquery .. and on Jquery i´m accessing the data and add them to my views ( .append(“htm stuff”+jsondata) )

now the Jquery is calling the data from a between.php page that has a catch block with many cases, and upon the called case/function , the between page is calling a function from the php class that sends the json data ..

so i have my oop php model that send the core jsondata , a controller ( catch block), and the view ( the jquery page) .. is this kind of MVC ? or i did miss understand it ?

an example of my code was posted on a previous Question here

  • 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-22T20:12:39+00:00Added an answer on May 22, 2026 at 8:12 pm

    Looking at the code you posted in your other post it is not a MVC implementation. Or at least it is a bad implementation.

    The MVC is about seperating your presentation from your business logic. Looking at your POST class you don’t seperate your business logic from your view:

    public static function readPosts(){
        $query = new Post_db("SELECT * FROM pmessage
                              ORDER BY p_id DESC
                             ");
    
        $posts = array();
        while($row = $query->fetchRow()){
            $posts [] = new Post($row);
        }
    
        foreach($posts as $item){
            echo $item;
        }
    }
    

    In this function you get information from your database (business logic) and print content (view). In other words, you combine your MV in one method. So I would say: No, this is not MVC.

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

Sidebar

Related Questions

This is a general question about MVC as a pattern, but in this case
Quick question about general MVC design principle in PHP, using CodeIgniter or Kohana (I'm
Ok this is a general question about how to solve this issue, not to
For desktop application that is. This is just a general question that maybe only
In @mmalc's response to this question he states that In general you should not
This is a general question about how limiting are web development frameworks such as
I've been asked this question about distributed source control in general by someone who's
This is not a theoretical or general question about when to use pass by
So this is a pretty general question, but I've been wondering about it for
This is just a general question - I was sitting and waiting for a

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.