Welcome Guest, Not a member yet? Register   Sign In
General library question
#1

[eluser]xadio[/eluser]
Right now I am working on, what I would call, a series of libraries. These libraries are really classes that are working together, in the background, to aid my controllers. So following are some of the general questions I have.

1) Is it recommended to place all classes into libraries or should I create a separate directory and require_once()?

2) The following line $this->load->library(); initializes the library when called. This defeats the purpose of the library I am designing which happens to be a Singleton. Would you recommend initializing the library by hand or modifying the Loader library to handle design patterns?

3) Is it proper to have libraries require each other or do they need to encapsulate multiple classes? For instance I have a class Animal and a child Cat, do they need to be in the library Animals or in separate libraries Animal and Cat, respectively?

4) Is it preferred to keep helpers as a series of functions or can they be classes?

I guess where I am really confused is what to do when I want CI to use my classes, yet remaining within the framework and using the benefits it offers.

Thanks for your thoughts!


Messages In This Thread
General library question - by El Forum - 02-05-2008, 05:11 PM
General library question - by El Forum - 02-05-2008, 08:31 PM
General library question - by El Forum - 02-05-2008, 09:03 PM
General library question - by El Forum - 02-05-2008, 10:02 PM
General library question - by El Forum - 02-05-2008, 10:58 PM
General library question - by El Forum - 02-06-2008, 09:41 AM
General library question - by El Forum - 02-06-2008, 10:40 AM
General library question - by El Forum - 02-06-2008, 11:13 AM
General library question - by El Forum - 02-06-2008, 11:26 AM
General library question - by El Forum - 02-06-2008, 11:37 AM
General library question - by El Forum - 02-06-2008, 12:00 PM
General library question - by El Forum - 02-06-2008, 12:05 PM
General library question - by El Forum - 02-06-2008, 05:08 PM
General library question - by El Forum - 02-06-2008, 05:25 PM
General library question - by El Forum - 02-06-2008, 05:26 PM
General library question - by El Forum - 02-06-2008, 11:14 PM
General library question - by El Forum - 02-07-2008, 07:06 PM
General library question - by El Forum - 02-07-2008, 07:27 PM
General library question - by El Forum - 02-10-2008, 11:24 AM
General library question - by El Forum - 02-10-2008, 10:31 PM
General library question - by El Forum - 02-10-2008, 10:34 PM
General library question - by El Forum - 02-11-2008, 08:52 AM
General library question - by El Forum - 02-11-2008, 10:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB