Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sproutcore + PhoneGap/Titanium? [closed]

I'm learning Sproutcore at the moment to write my application on it.

The backend will only be a server that pushes json out to the frontend Sproutcore application.

I wonder how it will be when I use PhoneGap or Titanium to port my app to the mobile phones.

How much of the current Sproutcore application do I have to rewrite? Is it only the views and thus leaving the controllers and models untouched?

Cause Sproutcore offers a lot of UI and I guess I have to replace those if I want my app to look native (iPhone buttons, lists etc).

Any guides/tutorials on how it will look like when I combine Sproutcore with Phonegap or Titanium?

like image 954
never_had_a_name Avatar asked Oct 25 '22 05:10

never_had_a_name


2 Answers

I wouldn't expect to just be able to merge your Sproutcore projects and Titanium. Titanium is 'javascript' but you aren't building a website on the iphone / ipad.

Only way you could do integration there is to fire up he Webview on the mobile device and have your Sproutcore files show up within that.

like image 183
Ryan Doom Avatar answered Nov 04 '22 00:11

Ryan Doom


As Ryan said, Titanium is only a JavaScript framework without a DOM.

PhoneGap integration is more approachable. It expects to have a single index.html as an entry point and expects relative paths instead of absolute ones. Peter Wagenet wrote a script to do the necessary transformation. See also SproutCore mailing list thread

If you don't need any native capabilities (Accelerometer, Contacts, etc), you could stick to a standard web app and not worry about Titanium or PhoneGap to transform it to a native mobile app.

Also, I expect we'll hear something from Strobe in the near future about SproutCore (or a descendent) and mobile.

like image 30
Paul Beusterien Avatar answered Nov 04 '22 00:11

Paul Beusterien