Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7988639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:31:03+00:00 2026-06-04T12:31:03+00:00

I am building a CRM using a framework (codeigniter) for the first time and

  • 0

I am building a CRM using a framework (codeigniter) for the first time and I am having trouble determining where a certain module should go while maintaining the MVC methodology. The module automatically generates a new user (when a new company is created) and emails the log in details out to the supplied email address.

I am familiar with the idea of skinny controllers and fat models but to compile all the information needed the module must request data from several different tables as well as inserting data into several tables.

The scenarios I have considered so far:

  1. The logic is in the model where most of the information comes from.
  2. Create a totally new model that deals with just this module and the multiple tables required.
  3. Place the logic in the controller that deals with creating a company.
  4. Create a new library or helper and call the module when it is needed.

Skinny controllers and fat models seem to suggest that one or two are the right options but I was lead to believe that a model should only deal with one table in the database.

What is the right approach to ensure adherence with MVC?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:31:05+00:00Added an answer on June 4, 2026 at 12:31 pm

    Codeigniter allows you to be flexible with your MVC approach. So the answer is which option is:

    • Easiest for you (or your team) to understand
    • Easiest to code maintain
    • Easiest for someone else to understand

    There’s no point putting your code into a library, if you dont have any other libraries and dont understand libraries. Same as if all your models are “fat”, but only point to one table, do you want this model to be the only one that also points to 4 other tables?

    Personally, if this “logic” only ever happens in one place, then I would place it into the controller, and call the 4x models you need to do each bit of the code.

    If this “logic” occurs in multiple places, I would place it into a library and call it when needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building custom reports in Microsoft CRM and am using the CRM_URL parameter
Building my first web app using Yii and wondering if it is best to
building a site using PHP and MySQL that needs to store a lot of
Building my first SL MVVM application (Silverlight4 RC) and have some issues i don't
When building a Delphi 2009 component package, how do you specify which directory should
Building a sample ASP.NET MVC app. Using the Membership API for authentication. For whatever
Building an app using android.support.v4.app , targeting API level 8. Everything's working as planned
Building a site super quick and having it work on all my Mac browsers,
Building a website using a PHP based Ecommerce product Magento. The problem I have
I'm building a web service which receives emails from a number of CRM-systems. Emails

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.