Welcome Guest, Not a member yet? Register   Sign In
Breaking the MVC convention, I think
#1

[eluser]stevefink[/eluser]
Hi all,

I just realized I"m working on a simple application where I'm completely breaking the MVC convention. I keep doing everything using just controller/view, but lack models. I'm certain my views are okay as they're all just markup and have a few foreach clauses using very light PHP. Can anyone take a look at this controller class and tell me if any of it belongs in the model according to good practices?

---

<?php

class Meduser extends Controller {

// db resource handlers
private $db_users;
private $db_notes;

function Meduser()
{
parent::Controller();
$this->db_users = $this->load->database('medusers', TRUE);
$this->db_notes = $this->load->database('mednotes', TRUE);
}

function index()
{
// load view.
$this->load->view('default/meduser_view');
}

function check_pending_users()
{
// retrieve all records.
$data['query'] = $this->db_users->query('select * from tbl_signups
where hostname = \'\''
);

// view for pending users container div.
$this->load->view('default/meduser_pu_view', $data);
}
}

?>

--

Thank you kindly.


Messages In This Thread
Breaking the MVC convention, I think - by El Forum - 08-10-2007, 08:55 PM
Breaking the MVC convention, I think - by El Forum - 08-11-2007, 12:52 AM
Breaking the MVC convention, I think - by El Forum - 08-11-2007, 06:38 PM
Breaking the MVC convention, I think - by El Forum - 08-12-2007, 01:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB