View Full Version : Creating an application without using webserver

14 Oct 2012, 9:40 PM
How can i set my application and make it run on my PC without using any web server. A complete example would be appreciated. Thanks in advance.

15 Oct 2012, 12:56 AM
Even though it is possible, it is not recommended. Any way here is the example you asked for.

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Portal Home</title>
<link rel="stylesheet" type="text/css" href="extjs4/resources/css/ext-all.css">
<script src="extjs4/ext-all.js" type="text/javascript" charset="utf-8"></script>
name: 'MyApp',
launch: function() {
Ext.create('Ext.container.Viewport', {
items: {
title:'Simple Application',
html:['This is a simple application created without a web server']

here the unpacked SDK is placed at the folder 'extjs4'. Path is very crucial and also the script, css file inclusions.


15 Oct 2012, 8:49 PM
Thanks. It really helped.

17 Oct 2012, 5:09 AM
Hi there, I have a related question...
about your

Even though it is possible, it is not recommended.

With the webserver running, example apps work very well...
If I try to use them with a double click (from filesystem) they are inusable.

I builded the app ( ./build/ folder) and moved as "www.zip" to phonegapbuild.

If I put a "normal" page it works well.

If I put a "sencha2" page... it works like when it doesn't work as

Why develop on a webserver if smartphones have not it?Any hint? Any link?
Can you help me to understand that?

Otherwise I'll go back to jqtouch.. or jqmobile... :(

Thanks in advance...

James Goddard
17 Oct 2012, 6:20 AM
So your complaint is tha Ext doesn't work and play well with phone gap when Sencha has a MOBILE framework specifically designed to do that?

17 Oct 2012, 6:41 AM
Sorry, the approach it's different, it's not a complain.
I'm just asking because I can't understand. Bit retarded maybe.

I developed some apps with jqtouch, another with jqmobile.

My will is to go further and devel another using sencha2.
Sencha2 has something interesting (app.js) and a really cool interface.

I've already started to devel it, from the sample generated, builded...
The sample generated uses the same localhost call to load.

Btw I'll like to deploy it as standalone on mobile smatphone. Is it possible?
Mobile browsers have not a webserver, so I can't point to localohost for the js calls... and so on... (...)

I just wanna know if it's possible.
Every example I found has some xhr call to load local files...

James Goddard
17 Oct 2012, 6:48 AM
Then you are using Sencha Touch and not ExtJS? You are in the ExtJS forum.

Sencha Touch = mobile
ExtJS = desktop

The answer to your question is, yes, the examples use Ajax requests, which work fine on Safari, fail on Chrome and I have know clue about the sorta browsers when using the file system.

The right answer is to use Sencha Command to generate your app (or the beta of the sdk tools which seemed to work better) to create and build your app. You will need to use a "testing" build to run from Chrome or a "production" build to run from phone gap.

17 Oct 2012, 7:01 AM
Mmmm thx for the clarification.

Here (http://www.sencha.com/products/touch/demos/) is full of sencha examples.
In sdk folder examples too... (sencha-touch-

Every example don't work offline. Going crazy. I go on the right forum, many thanks!

I googled... and searched this forum for "webserver".. I think (maybe) the first poster was here my same reason.