Skip navigation
wannab0133
Currently Being Moderated

moble site architecture

Aug 27, 2013 6:43 AM

I have an coldfusion application in production.  I am getting more and more requests for certain functions to be available in a mobile friendly format.  I do not need the entire site to be mobile friendly, just certain parts.  I have researched and determined how to detect the devices and how to redirect mobile users.  2 questions:

1. What is the typical architecture for what I am needing.  For example....currently I have:

 

webroot/mycfapp

 

Should I do this?:

webroot/mycfapp/mycfmobileapp  Just add a subfolder?  I am wanting to keep using the original authentication and other processes from mycfapp, but just have a section seperated that includes the mobile features.

 

What is a light weight accepted way to do this?  I typically develop desktop apps so this is new for me.

 

2. Where should I store the variable that tells the application which format(desktop or mobile)?  Should I keep that flag or variable in  a session variable or cookie?

 

It seems the prevailing wisdom to keep the apps seperate and I am all for that.  I just would like to design it with some thought before I begin coding anything.

 

Thanks

 
Replies
  • Currently Being Moderated
    Aug 27, 2013 10:05 AM   in reply to wannab0133

    The most common two ways of doing this are:

     

    1. Use a separate site or subdirectory like you described -- one for mobile, one for desktop (or "full" site).
    2. Use a MVC framework like FuseBox or Mach II and have separate views for the different formats.

     

    I lean toward the second option but if your site does not already use a MVC framework, this is a huge undertaking and most likely not an option.

     

    As to you second question, I would store it in a cookie and allow the user to toggle between the two.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2013 11:01 AM   in reply to wannab0133

    I would probably create two login pages, one in the root (which you probably already have) and another in the mobile subdirectory. Then modify the logic in the onRequestStart to detect which to use. I do it this way because it gets very ugly having big cfif or cfcase blocks with similar functionality but very different html and javascript based on the device.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points