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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:32:12+00:00 2026-06-16T03:32:12+00:00

As a mostly self-taught programmer I’m late to the game when it comes to

  • 0

As a mostly self-taught programmer I’m late to the game when it comes to design patterns and such. I’m writing a labor management webapp using CodeIgniter.

I did a bit of MVC ASP.NET/C# and Java at school, and the convention was that your model mainly consisted of classes that represented actual objects, but also abstracted all the database connection and such…which is pretty standard MVC stuff from what I’ve gathered.

I imagine I’m right in saying that CI abstracts the database connection completely out of sight (unless you go looking), which is par for the course, and the models you can create can abstract the ‘generic’ CRUD methods a bit more to create some methods that are more useful for the specific model.

The thing I have a problem with, because it’s different to what I’m used to with MVC, is that whenever you say…return a row from a database, the convention is to just put it in an associative array or standard object with the properties representing the data from the row.

In ASP you’d have actual classes that you could construct to store this information. For example you’d have a House class and the data would be stored as properties (e.g. bedrooms, bathrooms, address) and the methods would represent useful things you could do with the data (e.g. printInfo() may print("$address has $bedrooms bedrooms and $bathrooms bathrooms!')).

I’m getting the impression — just from code I’ve seen around the Internet — that this isn’t the standard way of doing things. Are you supposed to just use arrays or generic objects, and say…do $this->house_model->print_info($houseobject) instead of $houseobject->print_info();?

Thanks.

  • 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-06-16T03:32:14+00:00Added an answer on June 16, 2026 at 3:32 am

    Despite its claims to the contrary, Codeigniter does not use MVC at all (In fact, very few web frameworks do!) it actually uses a PAC (Presentation-abstraction-control) architecture. Essentially, in PAC the presentation layer is fed data by a presenter (which CodeIgniter calls a controller) and in MVC the View gets its own data from the model. The confusion exists because of this mislabeling of MVC.

    As such, CodeIgniter (and most of the other popular web frameworks) don’t encourage a proper model but just use very rudimentary data access its place. This causes a large set of problems because of “fat controllers”. None of the code which relates to the domain becomes reusable.

    Further reading:

    • MVC vs. PAC

    • The M in MVC: Why Models are Misunderstood and Unappreciated

    • Model-View-Confusion part 1: The View gets its own data from the Model

    • The Fat Controller

    This is a widespread point of confusion in the PHP Community (The MVC vs. PAC article identifies the problem as stemming from the PHP community. that was written in 2006 and nothing has changed, if anything it’s got worse because there are more frameworks and tutorials teaching an erroneous definition of MVC.) and why people looking at “MVC” PHP code who have come from a background outside web development understandably become confused. Most “MVC” implementations in PHP are not MVC. You are correct in thinking models should be properly structured, it’s CodeIgniter that’s wrong to label itself as MVC.

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

Sidebar

Related Questions

I am a mostly self taught programmer. When I learn a new language it
I'm a mostly self taught programmer and one aspect I've never really understood is
As a mostly self-taught programmer, I have never really had anyone explain why certain
Being mostly self-taught freestyle developer and having no experience of working in teams of
I have 2 1/2 years experience of VB.Net, mostly self taught, so please bear
In algorithms, I've mostly been self-taught and that's largely been fine. However, I'm having
I am a self-taught embedded developer. I mostly use AVRs programmed in C and
So I'm somewhat new to programming and mostly self-taught, so sorry if this question
I am a self taught developer. I use the term loosely because I only
Mostly self-explanatory, but I just want the song title and artist sent as 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.