Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Sharing desktop and mobile code?

Is it realistic to think I can build and app for Desktop and Mobile and have them share much of the same UI code?

Or am I going to have better luck with a desktop app that's JavaScript/CSS/HTML and a mobile app that's mostly JavaScript, using native controls?

So far I haven't had much luck with webview in mobile – I can't even get it to load images.

— asked March 30th 2010 by Zach Copley
  • desktop
  • interface
  • mobile
  • sharing
  • user
0 Comments

2 Answers

  • Much of the non UI code should probably work on both platforms. The UI paradigms are currently different between Desktop and Mobile. Also, given this disparity in screen size, connectivity, memory, and storage between the platforms, your best bet is to treat the two separately so that you can provide the best experience for your users.

    — answered April 1st 2010 by Don Thorp
    permalink
    0 Comments
  • Thanks Don!

    That's sort of what I had sussed out. Here's an ancillary question (let me know if you think it merits its own Dev Center Q&A post): What's the best way to share JavaScript library code between a Desktop and Mobile app? Is there a way to have Titanium Desktop projects link to an external library, outside of a normal Titanium project tree?

    In other words, I want to have a Desktop app and a Mobile app share the exact same library source files. Is there a good method of doing that, other than having multiple copies of those library files – one in each project?

    — answered April 2nd 2010 by Zach Copley
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.