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 67503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:16:12+00:00 2026-05-10T19:16:12+00:00

I am just getting started with MVC, and it seems like it will be

  • 0

I am just getting started with MVC, and it seems like it will be a great way to go, once I manage to switch my thinking to it.

Most of the material I have come across seems to have a 1-1 relationship between models, views, and tables – ie each model represents a table and allows CRUD, plus more complex functions.

What if I have an Account Model, which would allow account creation and updating.

I would want to use a /signup view and controller to create() the account, but would want to use a /members/account view and controller to update, change pw, etc.

Would it be better to have a Signup Model, or am I ok with just using whatever model I need from multiple locations?

Also, say an account can have many users, but I want to create the first user at signup. I would like to run the account setup and user creation as a transaction. Should I have an Account Model and User Model, and work with both, or just have the signup create() function for Account create the default user?

I am using PHP with CodeIgniter

  • 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. 2026-05-10T19:16:13+00:00Added an answer on May 10, 2026 at 7:16 pm

    In general, what you want to do is most likely to consider your tables to be an additional ‘layer’ below your model; the MVC concept generally doesn’t deal too much with the implementation of backing issues; i.e. whether or not you’re using DB tables or flat file storage or in-memory data representations.

    What I would suggest is to look at the problem as one of having one layer that does interaction between your tables and your application; your ‘data objects’ layer. Think of this as pure serialization. If you’re using an object model, this will be your ORM layer.

    Then you want to have another layer that defines the ‘business logic’; i.e. the interaction of your data with your data. This has to do with things such as how the Account interacts with the User, etc. The encapsulation here basically takes care of your high-level interactions. In this way, you can define the abstractions that make the most sense for your business requirements without needing to depend on implementation; for example, you can define a ‘UserAccount’ Model, that will do all the things that you need to do to handle User Accounts; define all the things that you want that abstraction to do. Then, once you’ve got that abstraction down, that is your Model; you can then define, in the internal workings of that model, how the interactions occur with your persistence code.

    In this way, you abstract out the persistence and implementation of your Model from the actual Model interface. So you can define your model as doing the things you want it to do without concern for the underlying implementation. The benefits of this are significant; the process of thinking about what you want your Model to do, in isolation from the way in which it will be doing it, can be very instructional; as well, if your backing data layer changes, your Model doesn’t need to change; so you can prototype with a flat file, for example.

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

Sidebar

Ask A Question

Stats

  • Questions 137k
  • Answers 137k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's very simple to do those these days with open… May 12, 2026 at 7:17 am
  • Editorial Team
    Editorial Team added an answer You can update a shortcut using WshShell object (to identify… May 12, 2026 at 7:17 am
  • Editorial Team
    Editorial Team added an answer Problem solved! My other view was blocking the mapview. [self… May 12, 2026 at 7:17 am

Related Questions

I am just getting started with Microsoft's Entity Framework, using it for an MVC
I've had been hearing about test driven development for a couple years now, and
I'm a Ruby on Rails / PHP guy, and my company got me to
I am just getting started with Silverlight and have recently added a Silverlight project

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.