Welcome Guest, Not a member yet? Register   Sign In
Application structure question
#17

[eluser]Rick Jolly[/eluser]
[quote author="beemr" date="1216818578"]Have your library's methods return views, and you will keep the impact on your controllers down to one or two lines.

Code:
$this->load->view('header');
$this->load->my_library;
$this->my_library->user_status();
$this->load->view('footer');
[/quote]

Beating a dead horse here. That code could also be in the view, with a couple minor mods:
Code:
<?php $this->load->view('header'); ?>
<?=module('my_library','user_status');>
<?php $this->load->view('footer'); ?>

Where the module() method is a helper that just loads libraries and calls methods. That's HMVC if you think of the library as "controller-like" interface between a view partial and (optionally) models.


Messages In This Thread
Application structure question - by El Forum - 07-20-2008, 09:54 PM
Application structure question - by El Forum - 07-20-2008, 10:33 PM
Application structure question - by El Forum - 07-20-2008, 10:58 PM
Application structure question - by El Forum - 07-21-2008, 10:01 PM
Application structure question - by El Forum - 07-22-2008, 10:35 PM
Application structure question - by El Forum - 07-22-2008, 11:39 PM
Application structure question - by El Forum - 07-23-2008, 02:09 AM
Application structure question - by El Forum - 07-23-2008, 02:36 AM
Application structure question - by El Forum - 07-23-2008, 02:48 AM
Application structure question - by El Forum - 07-23-2008, 03:26 AM
Application structure question - by El Forum - 07-23-2008, 03:42 AM
Application structure question - by El Forum - 07-23-2008, 10:45 AM
Application structure question - by El Forum - 07-23-2008, 11:00 AM
Application structure question - by El Forum - 07-23-2008, 11:49 AM
Application structure question - by El Forum - 07-23-2008, 12:08 PM
Application structure question - by El Forum - 07-23-2008, 12:57 PM
Application structure question - by El Forum - 07-23-2008, 01:55 PM
Application structure question - by El Forum - 07-23-2008, 02:59 PM
Application structure question - by El Forum - 07-27-2008, 09:51 PM
Application structure question - by El Forum - 10-01-2008, 02:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB