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

  • Home
  • SEARCH
  • 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 8225151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:19:06+00:00 2026-06-07T15:19:06+00:00

I have a question about developing for mobile and desktop. i need offer a

  • 0

I have a question about developing for mobile and desktop.
i need offer a mobile and other content for desktop… The idea is the following:
[mobile] text content only with a few menu items
[desktop] content complete with text and pictures, with all menu items

to solve this problem, I have the idea that the controller identifies the request, then it will load the model_mobile / model_desktop and view_mobile / view_desktop… is that correct?

basically would be in the controller:

if ($ request-> ismobile () === true)
{
include 'model_mobile.php';
include 'view_mobile.php';
}
else
{
include 'model_desktop.php';
include 'view_desktop.php';
}
  • 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-07T15:19:08+00:00Added an answer on June 7, 2026 at 3:19 pm

    Presentation logic is the purview of View instances ( fyi, views are not dumb templates ).

    Just because you decided to interact with the site via mobile device instead of desktop does not change the domain business logic. Model stays the same. This change affects only view and depends on how well written your views are. Basically there are two options:

    1. View uses different templates for desktop and mobile; requests required information from model layer; renders templates. This relies on fact, that most of the information will be the same for both mobile and desktop clients.

    2. You have different view for mobile and desktop, and it is already known which templates are available for each view. In this case view requests on very specific information from model layer, before rendering it with templates.

    The second way would be better for high-load systems (you might save a little by having more precise interaction with storage), but come with some code duplication.

    Of course you could have such precise requests in option nr.1, but that would require to have a if ($desktop) .. else block repeating though-out the view, and would be a clear sign, that code has to be split in two classes and polymorphism employed.

    What about the controllers ?

    In both options controller stays the same. It only affects view by either changing a state of view (in first case) or deciding, which type of view will be created (in second case).

    If you need to hide some controller actions from mobile users (which would be already partially accomplished by having different templates), you could implement some sort of ACL, which lets you decide, if user is allowed to access specific method on the controller.

    Of course, this all depends on your understanding of MVC.

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

Sidebar

Related Questions

I'm thinking about developing a streaming server and I have the following question, do
I have a few questions about developing mobile substrate tweaks. First of all, how
I have a question about a site I'm developing. It is a database driven
I have a question about implementing WYSIWYG editors into CakePHP. I'm developing an intranet
I'm currently developing some things in Python and I have a question about variables
I'm developing an iPhone app and have a question about memory management. Let's say
I have a question about implementing OnClickListeners for developing with the ADT. I'm unsure
I have a general question about DB synchronisation. So, I'm developing a website locally
I have few question in xcode 4.2 developing.In that i create one application for
I'm developing an android that integrated with the facebook. I have a question about

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.