Skip to main content
added 62 characters in body
Source Link

I am building a small website, in PHP and I am using MVC design pattern for the UI.
In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone.

All the web is new for me, and I am new with MVC too. I did for each page View, Model and Controller. The Views and the Models are in some internal directory, and the controller is in the public directory of the server (the servers root directory).

My Questions:

  1. Do I need to create a new MVC design for the mobile pages, or can I use the Model of the regular website?

  2. Most of sites have "m" sub-domain for mobile web pages. But the only thing that need to change is the View part. If the public page is the Controller, why not to create only Views for the mobile pages, and the Controller will decide which View will present? Like:

    if ($isMobile) {  
        include 'mobiles\main.php';  
    } else {  
        include 'web\main.php';  
    }
    

With the "m" sub-domain, you must have different Controller. Not so?

I am building a small website, in PHP and I am using MVC design pattern for the UI.
In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone.

All the web is new for me, and I am new with MVC too. I did for each page View, Model and Controller. The Views and the Models are in some internal directory, and the controller is in the public directory of the server (the servers root directory).

My Questions:

  1. Do I need to create a new MVC design for the mobile pages, or can I use the Model of the regular website?

  2. Most of sites have "m" sub-domain for mobile web pages. But the only thing that need to change is the View part. If the public page is the Controller, why not to create only Views for the mobile pages, and the Controller will decide which View will present? Like:

    if ($isMobile) {  
        include 'mobiles\main.php';  
    } else {  
        include 'web\main.php';  
    }
    

I am building a small website, in PHP and I am using MVC design pattern for the UI.
In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone.

All the web is new for me, and I am new with MVC too. I did for each page View, Model and Controller. The Views and the Models are in some internal directory, and the controller is in the public directory of the server (the servers root directory).

My Questions:

  1. Do I need to create a new MVC design for the mobile pages, or can I use the Model of the regular website?

  2. Most of sites have "m" sub-domain for mobile web pages. But the only thing that need to change is the View part. If the public page is the Controller, why not to create only Views for the mobile pages, and the Controller will decide which View will present? Like:

    if ($isMobile) {  
        include 'mobiles\main.php';  
    } else {  
        include 'web\main.php';  
    }
    

With the "m" sub-domain, you must have different Controller. Not so?

Code needs another level of indentation for a numbered list.
Source Link
user40980
user40980

I am building a small website, in PHP and I am using MVC design pattern for the UI.
In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone.

All the web is new for me, and I am new with MVC too. I did for each page View, Model and Controller. The Views and the Models are in some internal directory, and the controller is in the public directory of the server (the servers root directory).

My Questions:

  1. Do I need to create a new MVC design for the mobile pages, or can I use the Model of the regular website?

  2. Most of sites have "m" sub-domain for mobile web pages. But the only thing that need to change is the View part. If the public page is the Controller, why not to create only Views for the mobile pages, and the Controller will decide which View will present? Like:

    if ($isMobile) {
    include 'mobiles\main.php';
    } else {
    include 'web\main.php';
    }

    if ($isMobile) {  
        include 'mobiles\main.php';  
    } else {  
        include 'web\main.php';  
    }
    

I am building a small website, in PHP and I am using MVC design pattern for the UI.
In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone.

All the web is new for me, and I am new with MVC too. I did for each page View, Model and Controller. The Views and the Models are in some internal directory, and the controller is in the public directory of the server (the servers root directory).

My Questions:

  1. Do I need to create a new MVC design for the mobile pages, or can I use the Model of the regular website?

  2. Most of sites have "m" sub-domain for mobile web pages. But the only thing that need to change is the View part. If the public page is the Controller, why not to create only Views for the mobile pages, and the Controller will decide which View will present? Like:

    if ($isMobile) {
    include 'mobiles\main.php';
    } else {
    include 'web\main.php';
    }

I am building a small website, in PHP and I am using MVC design pattern for the UI.
In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone.

All the web is new for me, and I am new with MVC too. I did for each page View, Model and Controller. The Views and the Models are in some internal directory, and the controller is in the public directory of the server (the servers root directory).

My Questions:

  1. Do I need to create a new MVC design for the mobile pages, or can I use the Model of the regular website?

  2. Most of sites have "m" sub-domain for mobile web pages. But the only thing that need to change is the View part. If the public page is the Controller, why not to create only Views for the mobile pages, and the Controller will decide which View will present? Like:

    if ($isMobile) {  
        include 'mobiles\main.php';  
    } else {  
        include 'web\main.php';  
    }
    
Fixed spelling in the title.
Link
Giorgio
  • 19.7k
  • 16
  • 87
  • 137

Web design paternpattern

Source Link
Loading