[eluser]James Pax[/eluser]
Hey guyz,
I'm
trying to make my code more
organized and
efficient so I don't end up badly when the classes and methods are to many to cope with.
So I thought I might split a
Controller into different sectionslike this
Code:
public function section1($type)
{
switch($type)
case 'addItem':
#code
break;
...
default:
break;
}
instead of:
Code:
public function addItem($item)
{
#code
}
...
I intend on passing the variables though post method to the controller,
my thoughts are will it be more efficient like Binary Search Tree or is it just useless spaghetti coding lol
good tips on organizing my code are very very welcome