-
16 Mar 2012 8:34 AM #1
Unanswered: How to make offline MVC application?
Unanswered: How to make offline MVC application?
I have a MVC application and I have read this articlehttp://www.sencha.com/learn/taking-s...-apps-offline/I do all steps as the article and I found some troublesomeWhen I write my manifest file like that the app can run and it only download thethe "view" "store"" model "and "controller".
However If I want to make my app totally running offline I write another manifest file like thatHTML Code:CACHE MANIFEST sencha-touch-all.jsexample.csssencha-touch.cssapp.jsNETWORK:app/view/user/card.jsapp/view/user/container.jsapp/view/user/editUser.jsapp/store/user.jsapp/model/user.jsapp/controller/user.js
The app cannot run successfully.When i open the debug tool in chrome there are something wrong with .js file which are get from the Cache.js.jpgi notice that the normal JS file has the TYPE of "application/x-javascript"but the JS file get from the cache has the TYPE of "undefined" and cannot be used.So i want to know where is the problem with my app.And how to make a totally offline application with MVC in ST2.ThanksMartinHTML Code:CACHE MANIFEST sencha-touch-all.jsexample.csssencha-touch.cssapp.jsapp/view/user/card.jsapp/view/user/container.jsapp/view/user/editUser.jsapp/store/user.jsapp/model/user.jsapp/controller/user.js
-
16 Mar 2012 8:43 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3156
That tutorial is for ST1 not ST2.
The way to do this is starting off using Sencha Command to create the app structure (and example files). Then you can build the app into one JS file and it will be saved to localstorage. It will also create a cache manifest file.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Jun 2012 11:55 PM #3
what about sencha architect.
what about sencha architect.
Is there any documentation in how i can do this sencha architect since the folder structure etc is all managed by the UI
-
6 Jun 2012 4:24 AM #4
The way I do it is create the new application directory with the "sencha" command. Then I merge it with my Architect directory. I create the app with Architect and then use "sencha app build..." to build for testing, production...
This is because the build stuff is not available in Architect on Linux at the moment.
Some things to watch out for when merging:- The "sencha app create" process puts Main.js in the "app/view" directory. You should replace with your inital view from Architect.
- The app.js file from the "sencha app create" process has some code to create a loading indicator for while your app is loading. You will need to add this to your Architect project if you want to use it.
Worth
-
7 Jun 2012 2:41 AM #5
Thanks for your feedback. I have gone down the path you suggested.
Thanks for your feedback. I have gone down the path you suggested.
I think i am getting closer to resolve this. After following through on your instructions now I can see the app is complaining about dispatcher.js and dom.js out of the sencha-touch.js.
I am using the latest sencha-touch sdk 2.0.1.1.
could you help me with this?
-
7 Jun 2012 4:34 AM #6
-
7 Jun 2012 6:45 AM #7
The files cannot be found
The files cannot be found
I have found some threads suggesting I should use
sencha-touch-debug-all.js instead of sencha-touch.js
Should I just add that script to my index.html apge to override the sencha-touch.js
The error I am seeing is coming from sencha-touch.js
-
7 Jun 2012 6:50 AM #8
just correct me if I am wrong but I think I figured this out
just correct me if I am wrong but I think I figured this out
I missed the step where you said
" .. and then use "sencha app build..." to build for testing, production..."
I did not build the app yet. I guess that is the problem. I will try that out as soon as i can.


Reply With Quote