Hello,

I have a question regarding the best approach to accomplish the goal of 
having a Desktop and Mobile version of an app.

So far the best way I have been able to get it working is creating two 
separate apps and reloading the entire app when switching between Mobile 
and Desktop.

The problem is both apps many resources that are included in both apps 
and it becomes a pain to update both.

My current strategy is trying to create the main app as an extension of 
qx.core.Object and using the following code to determine which interface 
to load on default:

         if (qx.bom.Cookie.get("AppI") == null)
         {
             if (qx.core.Environment.get("engine.name") != "webkit" || 
!qx.core.Environment.get("event.touch"))
             {
                 qx.bom.Cookie.set("AppI", "Desktop");
             } else {
                 qx.bom.Cookie.set("AppI", "Mobile");
             }
         }
While still letting the user change the application version via a button.

The problem I am having is that when trying to build this as one 
complete app with only the UI being different I can't figure out how 
best to make it load either my Desktop app or Mobile App which are 
declared as:

qx.Class.define("myApp.Desktop",
{
     extend : qx.application.Standalone,

and

qx.Class.define("myApp.Mobile",
{
     extend : qx.application.Mobile,

respectively.

can I do it this way, or should I stick with keeping Desktop and Mobile 
separate and using the server to generate the proper HTML with the call 
to the proper script?

I like the second approach better, but I need to be able to load the 
application class for the UIs based on the cookie selected, and I just 
don't know how to make that work.

Thanks,

-- 
Matt Cavins


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to