Duplicating (with slight modification) a MVC "module" |
For the sake of discussion lets define a module as the model view and controller for a certain category of information displayed.
In my example we have a "Clients" module that I want to replicate into a new module called "Vendors" This would have all the functions of clients, but read/write from a different database. Other than find/replacing all the references to "client/s" to "vendor/s" what would be an easy way to do this? Can I use the client model AS vendor model? I know I will need a new controller, but mostly the code is going to be the same thing. I don't want to reinvent the wheel. Somebody already wrote a great CRM and I'm just trying to modify it to include a separate area for Vendors. I've tried to start rewriting the "module" from scratch but only got to reading/writing to a table and inserting into the database before I realized how much more the original clients "module" does. The CRM is Perfex fyi. It's a great bit of software and well worth the money, but just trying to add a couple custom elements to it. Any help/advice would be greatly appreciate as I am very new to the MVC/CI way of doing things. THANKS! |
Welcome Guest, Not a member yet? Register Sign In |