English 中文(简体)
Turning Sencha Touch-based app into a true native iPhone app?
原标题:

As I understand, Sencha Touch is just a javascript library that lets you create websites that respond to multitouch and other features you find in native iPhone apps. So... Your end result is accessed on Safari on the iPhone, and not as a native iPhone app. Is there a way to convert this to a native app?

问题回答

Yes, you can convert a Sencha Touch app to native. You have to use PhoneGap, or Nimblekit to do so. You can also write your own native wrappers - it s not very hard on iPhone, but more of a challenge on Android. We don t have a tutorial on this yet, but the phonegap guys have done this with at least one sencha app that they built. [I work for sencha]

Update: Here is a crazily detailed tutorial on using PhoneGap with Sencha

In principle yes. You could write some kind of a wrapper application. This application would have an ‘UIWebView‘ as the main view which is then used to browse the web. This would allow you to keep your HTML5-based app and wrap it in a native objective-c app.

If you want to write a "real" native app your would have to switch languages from HTML5, CSS and JS to Objective-C, which is really different.

So here is a question for the Sencha guys here, is there other documentation for Sencha Touch available beyond the API reference and sample apps on your site?

We are currently trying to switch a prototype application from JQTouch to Sencha, but are finding it challenging to get going with Sencha Touch; while there is a lot of documentation it doesn t seem to be the right documentation.

A really simple solution would be to make the API reference online allow comments so as we and others figure out how to use Sencha touch we could provide comments (look at php.net s manual to see how this worked for them.)

While I don t know exactly how Sencha works, if you just want to be able to take advantage of the multitouch features of the iDevices in a native application, this is very well documented in Apple s portal, including sample code; and even third party resources which you can find by using google.

In iOS 3.2 and higher, Apple has made handling touch events easier with introducing gesture recognizers, and they re simply wonderful to use.

Have a look over these resources, http://developer.apple.com/iphone will get you started. There are links to videos, text resources, and sample code as I mention that will give you a solid foundation to do what you need to.

Why would you want to convert? If you are writing successful apps with Sencha then stay with it. There are advantages to web based apps.

  • You can build them in a more accessible toolkit html/css/javascript.
  • You can deploy them more easily and quickly by setting them up on a web server.
  • You can update them on the fly etc.

If you produce a "native" app then you need to register with and pay for the Apple dev programme and the process for submitting an app is quite laborious and of course it might get rejected.

Apple themselves use the web based applications route, look up AdLib and PastryKit here on Stackoverflow. THese two libraries are Apples version of Sencha.

There are of course advantages to writing native apps. They have a very rich development set of tools and (in my opinion) will always function better then most web based apps and there is the marketing machine of the app store you can plug into.

But you can successfully go either way.





相关问题
ExtJS load form items/fields from database

I am using ExtJS 3 here. I would like to populate a formpanel from database with fields to be submitted. Basically, I don t know witch fields my form will have and I want to generate all formpanel ...

How to use Ext JS for role based application

I am planning to use Ext JS for a large application. The application s features are role based. When user login, they only see menu and screen features related to them. My server side technology will ...

Dynamically adding a TabPanel to a Panel Region

I have a Panel layout with a TreePanel in one region. A user clicks on an node in the tree and a TabPanel should be displayed in another region with information, editing tools etc. for that tree node....

How to embed Json result within Extjs Panel?

I have some issues with Json result and embed it within the html of the Extjs Panel. Here s that I have managed to get so far. myPanel is embedded within a mainPanel, and I have some shows/hide of ...

Ajax data update. Extjs

I need to keep certain data ( in a grid) up to date and was gonna do a poll to the server every 15 seocnds or so to get the data and refresh the grid, however it feels a bit dirty ( the grid will have ...

Better way to call superclass method in ExtJS

All the ExtJS documentation and examples I have read suggest calling superclass methods like this: MyApp.MyPanel = Ext.extend(Ext.Panel, { initComponent: function() { // do something MyPanel ...

Merged Headers in Ext JS Grid

Is it possible to have two headers in Ext JS grids? I have to show my grid as grouped data.. for example product types and products. In my case I need a grid like this: Field | Product Type A ...

热门标签