Welcome Guest, Not a member yet? Register   Sign In
Custom Class or new Model?
#1

[eluser]wynnewade[/eluser]
I have been fighting over this for several days and my colleague is as dubious as I am, so I am turning to the experts ...

I am extending an existing accounting application for our company to assist administrators in Payroll Budgeting. Existing employees will be loaded in from a database table to be edited via a series of form fields. New employees can also be added via a wizard-like interface.

Here's the question. With about 16 - 20 pieces of information to be loaded or added/edited by forms, there are at least 40 pieces of information that are computed based on available data and database lookups (i.e., FICA max and rate dependent on employee's state).

In the CI MVC framework, does this sound like a model or a library containing a custom class (Employee)? Any ideas on implementation would also be appreciated. References to applicable articles and tutorials are just as welcome as direct code advice because I am more than willing to do the legwork to learn this. I just need some guidance as to what I should be learning.

Thanks in advance,
Jon
#2

[eluser]mddd[/eluser]
I would say a model, because I feel that libraries are more for general "tools" that could be re-used in other projects. My guess is that this would be specific to your application and not re-used. Therefore I think it's a model. If you made it general enough so use again, you could make it a library. In the end, it's all semantics.. both will do just fine.




Theme © iAndrew 2016 - Forum software by © MyBB