Welcome Guest, Not a member yet? Register   Sign In
How should one organise controllers and their functions?
#1

[eluser]underskor[/eluser]
This could be a personal preference thing, but I'm just wondering what's considered better.

A)
Code:
//*******controllers/create.php********//
//Blog
function entry() {}
//Gallery
function image() {}
Code:
//*******controllers/edit.php********//
//Blog
function entry() {}
//Gallery
function image() {}

Code:
$route['blog/new/entry'] = 'create/entry';
$route['blog/edit/entry'] = 'edit/entry';
$route['gallery/new/image'] = 'create/image';
$route['gallery/edit/image'] = 'edit/image';

B)
Code:
//*******controllers/blog.php********//
function entry() {}
function edit_entry() {}

Code:
//*******controllers/gallery.php********//
function image() {}
function edit_image() {}

Can anyone point out any dis/advantages of using either scheme?

underskor


Messages In This Thread
How should one organise controllers and their functions? - by El Forum - 01-11-2009, 09:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB