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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:10:41+00:00 2026-05-25T23:10:41+00:00

CakePHP doesn’t seem to ever mention separating the business logic and data access layers

  • 0

CakePHP doesn’t seem to ever mention separating the business logic and data access layers of an app. This is my first MVC app and my “fat models” are turning out to be very fat because they contain all kinds of business logic whose only real thing in common is requiring access to the same database.

When you hear the suggestion to move your business logic from controllers into the model, is it really acceptable to wind up in such a state? Does CakePHP provide any structure for a separate business logic layer as part of their framework?

Thanks, Brian

  • 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-05-25T23:10:42+00:00Added an answer on May 25, 2026 at 11:10 pm

    No. It sounds to me that what you are running into is the classic downside of the Active Record pattern. Also, it doesn’t help that CakePHP is all based around result associative arrays instead of object instances. I suggest that you take a look at packages like Doctrine 2. It implements a DataMapper pattern instead of an ActiveRecord pattern. It keeps your business logic completely separate from your data access layer.

    There are CakePHP extensions to integrate Doctrine into CakePHP.

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

Sidebar

Related Questions

I am writing a CakePHP app but it doesn't seem to be showing flash()
my CakePHP (1.2.5.) doesn't validate my form correct. $this->UserData->save($this->data); gives me always a true
I'm wondering why $this->Form->select() in CakePHP 2.1 doesn't come with a wrapping div and
On cakephp 2.1, I've used this structure to intercept data upon saving: $this->request->data['Setup']['active'] =
I'm using the CakePHP blog example: function add() { if (!empty($this->data)) { if ($this->Post->saveAll($this->data))
I'm creating an RSS feed out of some articles using CakePHP, but it doesn't
CakePHP Newbie :) I am having trouble accessing another controller and passing that data
In CakePhp 1.3: orry if this question is stupid, but I really don't know
I'm using CakePHP for the first time and inside my controller I need to
I am learning cakephp, and I was just doing a simple Todo list app

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.