Welcome Guest, Not a member yet? Register   Sign In
Helpers, Libraries, and where to load them..
#1

[eluser]tomclowes[/eluser]
This is a very basic question, but to finally get a grasp on this would help my understanding vastly.

I am using the helpers, and libraries A LOT. They are great.

Firstly, What exactly is the difference between a helper and a library.
Would I be correct to understand that a helper makes mundane task like outputting form inputs simple, and a library is essentially a series of functions that perform specific tasks?

Basically I am running through the user guide here, there, and everywhere. My files load libraries all over the place - if i get an obvious error, I simply include the helper directly in said page and it usually fixes the problem.

As such I am confident I have duplicate 'loads' of various helpers.

If I understand this correctly, is the best place to load helpers and libraries the index function of a controller? Although atm I do, should I NOT load helpers/libraries in view files?

To expand on that, I have made a custom function/callback for my form validation. It relies on sessions. Rather than have to load the session class and define the callback function for use in any/all form pages.. it would seem logical to load these helpers, and define this function in my MY_Controller.php file - would that be a correct assumption.

Thanks !


Messages In This Thread
Helpers, Libraries, and where to load them.. - by El Forum - 08-25-2010, 01:31 PM
Helpers, Libraries, and where to load them.. - by El Forum - 08-25-2010, 02:01 PM
Helpers, Libraries, and where to load them.. - by El Forum - 08-25-2010, 02:11 PM
Helpers, Libraries, and where to load them.. - by El Forum - 08-25-2010, 02:24 PM
Helpers, Libraries, and where to load them.. - by El Forum - 08-25-2010, 07:13 PM
Helpers, Libraries, and where to load them.. - by El Forum - 08-25-2010, 10:12 PM
Helpers, Libraries, and where to load them.. - by El Forum - 08-26-2010, 07:10 AM
Helpers, Libraries, and where to load them.. - by El Forum - 08-26-2010, 07:25 AM
Helpers, Libraries, and where to load them.. - by El Forum - 08-26-2010, 07:30 AM
Helpers, Libraries, and where to load them.. - by El Forum - 08-26-2010, 07:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB