Welcome Guest, Not a member yet? Register   Sign In
Is a library appropriate?

Hello all,

I recently started working with CodeIgniter and I am obsessed. I have become fairly comfortable with the idea of a framework and the MVC style in general. One of the points that initially confuses me, however, is when a library would be more appropriate compared to just a model.

My scenario:

My system manages a large set of customers. Some of the various aspects of a customer are
-Basic biographical and contact info
-A set of preferences
-A set of billing information (including calculating billing cycles, etc)
-Billing history
-Site visit history
-Lead submission history
-sales rep information
-login history

There are several other aspects as well. My initial thought was that, because a client will show up on many different pages, it would be best to create a Client library that will build all these various parts of a client object. As I was building the library, I realized that it was mostly just making calls to the Client model. I started thinking that maybe I don't even need a library and that everything should be done in the model itself.

Can anyone provide any insight/suggestion as to when a library is worthwhile compared to a well-designed model? I would appreciate the help as I try to learn how to best utilize CodeIgniter. So far I am unbelievably impressed by the CodeIgniter community and I hope to become a productive member of it.

Thank you,


Messages In This Thread
Is a library appropriate? - by El Forum - 08-29-2010, 12:09 PM
Is a library appropriate? - by El Forum - 08-29-2010, 07:31 PM
Is a library appropriate? - by El Forum - 08-30-2010, 04:34 AM
Is a library appropriate? - by El Forum - 08-31-2010, 10:40 PM
Is a library appropriate? - by El Forum - 09-01-2010, 12:45 AM

Theme © iAndrew 2016 - Forum software by © MyBB