Asp.net mvc, jQuery mobile, best practices for working with the telephone network

I am developing a mobile application using ASP.Net MVC to create HTML 5 pages. HTML 5 pages will use jQueryMobile loadPage to call ASP.Net MVC to load pages in the DOM. He will then use jQueryMobiles changePage to make the page active in the DOM based on user interactions with the application. Calls to the MVC application will invoke various web services to retrieve the source data for building the HTML.

We plan to use PhoneGap with the application so that we can send the finished application to the Apple and Android stores. My application does not need to interact with the device’s own functionality (contacts, geolocation, etc.). Since we do not need to interact with the real operating system (except for making jQuery ajax calls in an MVC application), is PhoneGap really necessary? Is the above described a suitable way to make a web application viable on mobile devices?

Since my application is asp.net mvc and will be hosted on my servers, what will be sent to the Android and Apple stores? This is where PhoneGap comes into play? Does PhoneGap allow any executable file to be sent to Android and Apple stores? Then this executable is downloaded to client devices? I assume the executable will make calls to the MVC site via the URL to retrieve the HTML application?

Am I looking right? Thank you for your help.

+6
source share
1 answer

A phone saver (or some kind of wildcard) is not entirely necessary, but very useful for creating an application package from your HTML / JS / CSS source. Phonegap does not create an executable file (your IDE does this), but it is Java functionality for JavaScript (which allows you to run Java code from your JavaScript).

Telephone communication basically wraps your HTML / JS / CSS webview in webview so that your code can be interpreted by the device’s browser (sometimes in the form of webview than a regular browser, for example, pre-iOS-5 webview instances do not receive the Nitro JS engine, therefore, they are slower than websites in the Mobile Safari browser).

You can create your own webview if your site is so simple that it does not use any other Phonegap features, but since it is already baked into Phonegap and the device does not have to download Phonegap. You can also use Phonegap.

Phonegap Build ( https://build.phonegap.com/ ) is a program that you can purchase so that your application packages are created and sent to the Apple / Google / RIM / Windows app store. Typically, you just use your own IDE to do this. For example, to create an application for iOS you need to use a new Apple computer (to create the latest versions of iOS packages, you need to have the latest version of the OS). IOS application packages are created in Xcode, and the Eclipse IDE is a very common environment for creating Android application packages: http://developer.android.com/sdk/eclipse-adt.html

I noticed that you said that you use $.mobile.loadPage() to load pages in the DOM and $.mobile.changePage() to navigate these pages. If you just use $.mobile.changePage() , then it will automatically capture the page with loadPage() . If you use loadPage() to preload the content, then you can check the jQuery Mobile prefetch capabilities: http://jquerymobile.com/demos/1.1.0-rc.1/docs/pages/page-cache.html

UPDATE 2014

I recently created some applications using Cordova 3.5, and the build process has been greatly simplified. The process of building the package is now controlled through your system console, and everything from installing plugins to rebuilding the application package is much simpler.

+5
source

Source: https://habr.com/ru/post/911968/


All Articles